Disabled state of host is not updated when reason is not provided.

Bug #1623738 reported by Giridhar Jayavelu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Giridhar Jayavelu

Bug Description

When _set_host_enabled() in virt/libvirt/driver.py
is called to disable service status of a host without
providing disabled_reason, then "TypeError: cannot concatenate 'str' and
'NoneType' objects" is raised. This prevents the disabled state getting updated.

Before concatenating disable_reason with DISABLE_PREFIX,
disabled_reason should be checked if it is defined or not.

Tags: libvirt
Changed in nova:
assignee: nobody → Giridhar Jayavelu (gjayavelu)
Changed in nova:
status: New → In Progress
melanie witt (melwitt)
tags: added: libvirt mitaka-backport-potential
Changed in nova:
importance: Undecided → Medium
melanie witt (melwitt)
tags: removed: mitaka-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/290919
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0683fcd3f551dc55438d9f8415b8931f22635bd5
Submitter: Jenkins
Branch: master

commit 0683fcd3f551dc55438d9f8415b8931f22635bd5
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
    Change-Id: Ib131f73444234723ef8bbb15bb4bd4a62a83320d

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b1

This issue was fixed in the openstack/nova 15.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.