← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1470341] Re: Cannot remove host from aggregate if host has been deleted

 

Reviewed:  https://review.openstack.org/306192
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1abac25fd2967be00c4d584c06ba15ca4e8d04cc
Submitter: Jenkins
Branch:    master

commit 1abac25fd2967be00c4d584c06ba15ca4e8d04cc
Author: Danil Akhmetov <dakhmetov@xxxxxxxxxxxx>
Date:   Fri Apr 29 11:45:28 2016 +0300

    Remove compute host from all host aggregates when compute service is deleted
    
    Nova currently does not check if compute host included in host-aggregates
    when user deletes compute service. It leads to inconsistency in nova host
    aggregates, impossibility to remove compute host from host-aggregate or
    remove host aggregate with invalid compute host.
    
    Change-Id: I8034da3827e47f3cd575e1f6ddf0e4be2f7dfecd
    Closes-Bug: #1470341


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1470341

Title:
  Cannot remove host from aggregate if host has been deleted

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Kilo code

  Reproduce steps:

  1. Assuming that we have one nova-compute node named 'icm' which is
  added into one aggregate named 'zhaoqin'

  [root@icm ~]# nova aggregate-details zhaoqin
  +----+---------+-------------------+-------+--------------------------------+
  | Id | Name    | Availability Zone | Hosts | Metadata                       |
  +----+---------+-------------------+-------+--------------------------------+
  | 1  | zhaoqin | zhaoqin-az        | 'icm' | 'availability_zone=zhaoqin-az' |
  +----+---------+-------------------+-------+--------------------------------+
  [root@icm ~]# nova service-list
  +----+------------------+------+------------+---------+-------+----------------------------+-----------------+
  | Id | Binary           | Host | Zone       | Status  | State | Updated_at                 | Disabled Reason |
  +----+------------------+------+------------+---------+-------+----------------------------+-----------------+
  | 1  | nova-conductor   | icm  | internal   | enabled | up    | 2015-06-30T14:04:25.828383 | -               |
  | 3  | nova-scheduler   | icm  | internal   | enabled | up    | 2015-06-30T14:04:24.525474 | -               |
  | 4  | nova-consoleauth | icm  | internal   | enabled | up    | 2015-06-30T14:04:24.640657 | -               |
  | 5  | nova-compute     | icm  | zhaoqin-az | enabled | up    | 2015-06-30T14:04:19.865857 | -               |
  | 6  | nova-cert        | icm  | internal   | enabled | up    | 2015-06-30T14:04:25.080046 | -               |
  +----+------------------+------+------------+---------+-------+----------------------------+-----------------+

  
  2. Remove the nova-compute using service-delete command. However, the host is still in aggregate.

  [root@icm ~]# nova service-delete 5
  [root@icm ~]# nova service-list
  +----+------------------+------+----------+---------+-------+----------------------------+-----------------+
  | Id | Binary           | Host | Zone     | Status  | State | Updated_at                 | Disabled Reason |
  +----+------------------+------+----------+---------+-------+----------------------------+-----------------+
  | 1  | nova-conductor   | icm  | internal | enabled | up    | 2015-06-30T14:05:35.826699 | -               |
  | 3  | nova-scheduler   | icm  | internal | enabled | up    | 2015-06-30T14:05:34.524507 | -               |
  | 4  | nova-consoleauth | icm  | internal | enabled | up    | 2015-06-30T14:05:34.638234 | -               |
  | 6  | nova-cert        | icm  | internal | enabled | up    | 2015-06-30T14:05:35.092009 | -               |
  +----+------------------+------+----------+---------+-------+----------------------------+-----------------+
  [root@icm ~]# nova aggregate-details zhaoqin
  +----+---------+-------------------+-------+--------------------------------+
  | Id | Name    | Availability Zone | Hosts | Metadata                       |
  +----+---------+-------------------+-------+--------------------------------+
  | 1  | zhaoqin | zhaoqin-az        | 'icm' | 'availability_zone=zhaoqin-az' |
  +----+---------+-------------------+-------+--------------------------------+

  
  3. Then, attempt to remove the host from aggregate, but fails. And we can not remove this aggregate either, because it is not empty.

  [root@icm ~]# nova aggregate-remove-host zhaoqin icm
  ERROR (NotFound): Cannot remove host icm in aggregate 1: not found (HTTP 404) (Request-ID: req-b5024dbf-156a-44ee-b48e-fc53a331e05d)
  [root@icm ~]# nova aggregate-delete zhaoqin
  ERROR (BadRequest): Cannot remove host from aggregate 1. Reason: Host aggregate is not empty. (HTTP 400) (Request-ID: req-a3c5346c-9a96-49f4-a76d-a7baa768a0ef)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1470341/+subscriptions


References