Update host allows to update host name for any non-existing compute host in nova

Bug #1814656 reported by jayashri bidwe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
masakari
Fix Released
Medium
jayashri bidwe

Bug Description

Allow to update host name only if it is configured in nova.

Update a host using host-update command:

$ masakari host-update --segment-id 16226f8f-6100-48aa-b1fd-8662c291511d --id 2ea73557-bedf-4f77-8a4e-abd4317bfc58 --name non-existing

Here, I’m passing –name as ‘non-existing’ host but it still updates host successfully

Actual Result: It updates host successfully.
Expected Result: It should fail if name specified doesn’t exists in nova.

Similar issue was reported for host-create in LP bug [1] which has been fixed in patch [2] but the update case wasn’t handled at that time.

[1]: https://bugs.launchpad.net/masakari/+bug/1800073
[2]: https://review.openstack.org/#/c/621535/

Changed in masakari:
assignee: nobody → jayashri bidwe (jayashrib)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to masakari (master)

Fix proposed to branch: master
Review: https://review.openstack.org/635710

Changed in masakari:
status: New → In Progress
Tushar Patil (tpatil)
Changed in masakari:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to masakari (master)

Reviewed: https://review.openstack.org/635710
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=de2f4d637d43e5c26631a1a2bb06506bb658069d
Submitter: Zuul
Branch: master

commit de2f4d637d43e5c26631a1a2bb06506bb658069d
Author: jayashri bidwe <email address hidden>
Date: Tue Feb 5 15:59:24 2019 +0530

    Allow updating host name only if it exists in nova

    Presently, you can update host name with any non-existing host name.
    It doesn't check whether this host exists or not in nova. This patch
    fixes this issue by checking whether the host name exists in nova or
    not before updating it. If it doesn't exists, it will raise 400 error.

    APIImpact
    BadRequest(400) is returned if host doesn't exists in nova instead of
    200 during host update.

    Closes-Bug: #1814656

    Change-Id: Ibd113f2328deae0f1114544436631bdc434eff92

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

This issue was fixed in the openstack/masakari 7.0.0.0rc1 release candidate.

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.