We have an API for setting the admin password for an already created
instance and we have a metadata API for retrieving the encrypted
password. In the libvirt driver, when a request to set the admin
password is received, it is indeed set in the guest but the instance
system metadata is never updated with the encrypted password, so
attempts to retrieve the password via the metadata service API result
in an empty string returned instead of the encrypted password.
This has been broken in the libvirt driver since the set admin password
password feature was added, as far as I can tell. The xen api driver,
however, handles the same thing correctly and this adds similar logic
to the libvirt driver to fix the problem.
Closes-Bug: #1748544
Change-Id: Icf44c4c94529cb75232abe1f3ecc5a4d3646b0cc
(cherry picked from commit 715a3cadb07fb92cc11542cfb5001844122b6f60)
(cherry picked from commit 6ed7fc11459eb5a69088630e5ea4d12e441f80f2)
Reviewed: https:/ /review. openstack. org/550498 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=685f174eaa2 086166b04dcb6b4 9bb0b1a7c23642
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 685f174eaa20861 66b04dcb6b49bb0 b1a7c23642
Author: melanie witt <email address hidden>
Date: Fri Feb 9 19:43:30 2018 +0000
Save admin password to sysmeta in libvirt driver
We have an API for setting the admin password for an already created
instance and we have a metadata API for retrieving the encrypted
password. In the libvirt driver, when a request to set the admin
password is received, it is indeed set in the guest but the instance
system metadata is never updated with the encrypted password, so
attempts to retrieve the password via the metadata service API result
in an empty string returned instead of the encrypted password.
This has been broken in the libvirt driver since the set admin password
password feature was added, as far as I can tell. The xen api driver,
however, handles the same thing correctly and this adds similar logic
to the libvirt driver to fix the problem.
Closes-Bug: #1748544
Change-Id: Icf44c4c94529cb 75232abe1f3ecc5 a4d3646b0cc cc11542cfb50018 44122b6f60) 69088630e5ea4d1 2e441f80f2)
(cherry picked from commit 715a3cadb07fb92
(cherry picked from commit 6ed7fc11459eb5a