VR: Send VM password to all Running VRs in network/vpc#3903
Conversation
|
@ravening it looks the title is not correct. vm password is sent to all Running VRs , not MASTER VR. |
DaanHoogland
left a comment
There was a problem hiding this comment.
looks ok, just one question to author (and one to reviewer)
116e7e9 to
bd06e68
Compare
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-935 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Thanks for the PR @ravening.
Just one point that I got concerned. Please correct me if I am wrong, but in case the savePasswordToRouter method fails (and therefore returns false), savePasswordResult will be set to false and will stay false during the whole loop (due to &&).
Is it OK to have one of the routers returning false? Would it make sense do break de loop and log an error/warn/debug message?
|
Additionally to what I mentioned on the previous comment:
Again, overall it looks OK :) |
@GabrielBrascher good point. if result is false, we can simply log a error message and return false. |
@GabrielBrascher Looked at the code and the function I have made the necessary changes. Please review it again |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-952 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1133)
|
| } | ||
| return result; | ||
| isVrRunning = true; | ||
| savePasswordResult = savePasswordResult && result; |
There was a problem hiding this comment.
@ravening it seems savePasswordResult is not needed any more, because it is always true.
Description
Currently, the cloudstack sends VM password only to the first
router in the network even if its the backup and return the result.
In some cases the first router will be back up and the second will be master.
Since password server is not running in backup, when the user resets the password,
it is sent to the first router which can be backup.
In that case, the new password is not stored in the password server and users cant log in with a new password.
This change ensures that we send the password to both the routers instead
of the first router so that a new password is stored in the master router.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
1 . Create and isolated network with redundant VR and a VM in it.
2 . Note down the password of the newly created and try to ssh to it from VR
3 . Ssh works with the existing password.
4 . Now reboot the master VR so that it will become BACKUP and the BACKUP will become MASTER
5 . Now stop the VM and reset it's password.
6 . Try to login to VM using the new password
Expected Result:
Ssh should work with new password
Actual result:
Ssh wont work