cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Sorensen" <shadow...@gmail.com>
Subject Re: Review Request: fix resetPasswordForVirtualMachine false negative
Date Wed, 22 Aug 2012 04:46:34 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6720/
-----------------------------------------------------------

(Updated Aug. 22, 2012, 4:46 a.m.)


Review request for cloudstack.


Changes
-------

Clarifying description.


Description (updated)
-------

Latest master and 4.0 both successfully set VM password but can report false, leading to no
password returned. The code tries to save the password to every userdata provider element
(routers providing userdata service), and if any attempt fails it reports an overall failure.
The first thing that the savePassword method does is to see if the supplied network is applicable
to the given userdata element, returning false if it doesn't, so result is set to false pretty
much every run of the for loop. 

Since it only needs to succeed on the one router that provides userdata for that VM, I'm changing
it to return success if any attempt succeeds. The only attempt that matters is the one router
that is on the VM's default network, and if savePassword succeeds then we've accomplished
that.


Diffs
-----

  server/src/com/cloud/vm/UserVmManagerImpl.java 6f6a754 

Diff: https://reviews.apache.org/r/6720/diff/


Testing
-------

Tested latest 4.0 and master as of ce54bfa7fae560470d82f6d22545398cecb5294b, UI now reports
password rather than 'undefined'. 


Thanks,

Marcus Sorensen


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message