test_aggregate_add_host_create_server_with_az fails if all hosts are in other zones

Bug #1748377 reported by zhufl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
zhufl

Bug Description

1. Problem
Running test_aggregate_add_host_create_server_with_az fails if all hosts are already in other zones,

409 POST http://10.43.200.228:8774/v2.1/08a1316ec64d4acea99def94bf40d062/os-aggregates/62/action 0.070s
Request-Head: {'X-OpenStack-Nova-API-Version': '2.1'}
               Request-Body: {"add_host": {"host": "compute09"}}

Response-Head: {'status': '409', u'content-length': '159', u'vary': 'X-OpenStack-Nova-API-Version', u'openstack-api-version': 'compute 2.1', u'x-openstack-nova-api-version': '2.1'}
                  Response-Body: {"conflictingRequest": {"message": "Cannot add host to aggregate 62. Reason: One or more hosts already in availability zone(s) [u'rally_test'].", "code": 409}}

[tecs@controller01 ~(keystone_admin)]$ nova availability-zone-list
+------------------------+----------------------------------------+
| Name | Status |
+------------------------+----------------------------------------+
| internal | available |
| |- compute09 | |
| | |- nova-storage | enabled :-) 2018-02-09T06:41:51.000000 |
| |- compute11 | |
| | |- nova-storage | enabled :-) 2018-02-09T06:41:52.000000 |
| |- controller01 | |
| | |- nova-conductor | enabled :-) 2018-02-09T06:41:58.000000 |
| | |- nova-consoleauth | enabled :-) 2018-02-09T06:41:55.000000 |
| | |- nova-monitor | enabled :-) 2018-02-09T06:41:57.000000 |
| | |- nova-scheduler | enabled :-) 2018-02-09T06:41:54.000000 |
| |- controller02 | |
| | |- nova-conductor | enabled XXX 2018-02-09T05:38:32.000000 |
| | |- nova-consoleauth | enabled XXX 2018-02-09T05:38:40.000000 |
| | |- nova-monitor | enabled XXX 2018-02-09T05:38:36.000000 |
| | |- nova-scheduler | enabled XXX 2018-02-09T05:40:11.000000 |
| |- compute12 | |
| | |- nova-storage | enabled :-) 2018-02-09T06:41:53.000000 |
| rally_test | available |
| |- compute09 | |
| | |- nova-compute | enabled :-) 2018-02-09T06:41:57.000000 |
| |- compute11 | |
| | |- nova-compute | enabled :-) 2018-02-09T06:41:57.000000 |
| dvs_test | available |
| |- compute12 | |
| | |- nova-compute | enabled :-) 2018-02-09T06:41:56.000000 |
+------------------------+----------------------------------------+

2. Analysis
If a host is already in other zone(default is nova), it can't be added to another zone.

3. Solution
If all hosts in the system are already in other zones, then adding host to aggretate can no longer be tested, so the testcase should be skipped in this situation.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
assignee: nobody → zhufl (zhu-fanglei)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/542653
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=34afeb295a8c99846144abfd78fab6e5a9b4121f
Submitter: Zuul
Branch: master

commit 34afeb295a8c99846144abfd78fab6e5a9b4121f
Author: zhufl <email address hidden>
Date: Fri Feb 9 15:03:41 2018 +0800

    Skip adding host to aggregate with az if host already in other zone

    Running test_aggregate_add_host_create_server_with_az fails if all
    hosts are already in other zones, with error info like:
       "conflictingRequest":
           {"message": "Cannot add host to aggregate 62.
                        Reason: One or more hosts already in availability
                        zone(s)[u'rally_test'].", "code": 409}

    This is to find a host that has not been added to other zone, and
    skip test_aggregate_add_host_create_server_with_az if all hosts in
    the system are already in other zones.

    Change-Id: I996d257e089f0676e316f2b14207c343063ccf8e
    Closes-Bug: #1748377

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

This issue was fixed in the openstack/tempest 19.0.0 release.

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.