-
Notifications
You must be signed in to change notification settings - Fork 1.3k
server: fix reset sshkey is broken in master/4.16 #5390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@nvazquez @GutoVeronezi @rhtyd |
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1063 |
nvazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @weizhouapache just a minor comment
| throw new CloudRuntimeException("Failed to reset SSH Key for the virtual machine "); | ||
| } | ||
|
|
||
| _vmDao.loadDetails(userVm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer moving this line into the removeEncryptedPasswordFromUserVmVoDetails method if the VM details are empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nvazquez done.
details are loaded but not updated, therefore it does not contain the new ssh key.
This reverts commit db278cf.
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1072 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
|
||
| final boolean canHandle = canHandle(network.getTrafficType()); | ||
|
|
||
| if (canHandle) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since password is not reset when reset sshkey (in #4819 ), it is not needed to save password in vm details.
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1079 |
|
@blueorangutan test |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1872)
|
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1108 |
|
@blueorangutan test |
|
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-1938) |
|
@blueorangutan test |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1940)
|
|
Trillian test result (tid-1942)
|
nvazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Trillian test result (tid-1939)
|
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1125 |
|
@blueorangutan test |
|
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1960)
|
|
Ping @rhtyd @davidjumani @sureshanaparti @shwstppr can you please review? |
| } | ||
|
|
||
| protected void removeEncryptedPasswordFromUserVmVoDetails(UserVmVO userVmVo) { | ||
| _vmDao.loadDetails(userVmVo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weizhouapache I'm not sure but instead of loading all details, removing one detail and then storing all details, can we do:
userVmDetailsDao.removeDetail(userVmVo.getId(), VmDetailConstants.ENCRYPTED_PASSWORD);
_vmDao.loadDetails(userVmVo);
Also in the caller of this method we load details (ln 859), not sure if that is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shwstppr
user vm details is updated in line 883 (ssh key is added), but userVmVo does not contain it.
boolean result = resetVMSSHKeyInternal(vmId, sshPublicKey);
therefore we need to reload the details.
it is good idea to use userVmDetailsDao.removeDetail. I will change the code and test it. thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weizhouapache yes, VM details are updated by resetVMSSHKeyInternal and that is why I feel loadDetails at 859 can be removed as I don't see it being used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shwstppr removed line 859.
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1147 |
|
@blueorangutan test |
|
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1979)
|
|
Trillian test result (tid-1978)
|
Description
This PR fixes the issue that reset sshkey is broken in master/4.16 branch.
It is a regression issue of #4819
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?