When _set_host_enabled() in virt/libvirt/driver.py
is called to change service status of a host from
enabled to disabled without providing disable_reason, then
a TypeError occurs while concatenating disabled_reason with
DISABLE_PREFIX. This prevents the service status of the host
from being updated.
This patch handles the case when disable_reason is None.
Also, unit tests have been fixed to validate the code path for
changing the disabled state of a host.
Reviewed: https:/ /review. openstack. org/290919 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0683fcd3f55 1dc55438d9f8415 b8931f22635bd5
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0683fcd3f551dc5 5438d9f8415b893 1f22635bd5
Author: Giridhar Jayavelu <email address hidden>
Date: Wed Mar 9 14:10:49 2016 -0800
Handle TypeError when disabling host service
When _set_host_enabled() in virt/libvirt/ driver. py
is called to change service status of a host from
enabled to disabled without providing disable_reason, then
a TypeError occurs while concatenating disabled_reason with
DISABLE_PREFIX. This prevents the service status of the host
from being updated.
This patch handles the case when disable_reason is None.
Also, unit tests have been fixed to validate the code path for
changing the disabled state of a host.
Closes-Bug: #1623738 23ef8bbb15bb4bd 4a62a83320d
Change-Id: Ib131f734442347