Incorrect testing of aggregates

Bug #1318578 reported by Valerii Zhelezniakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Attila Fazekas

Bug Description

The test "test_aggregate_basic_ops" tries to add node to aggregate, but result is FAIL all time
Source: ../tempest/tempest/scenario/test_aggregates_basic_ops.py

The cause of the problem is using REST API command os-hosts.

 57 def _get_host_name(self):
 58 -> hosts = self.compute_client.hosts.list()
 59 self.assertTrue(len(hosts) >= 1)
 60 hostname = hosts[0].host_name
 61 return hostname

This command returns list all known hosts include admin-node. Usually, information about admin-node placed in top of the list.
So, the first (top) node form the list is candidate for adding to aggregate and it is admin-node.

60 hostname = hosts[0].host_name

As result Nova raises exception when tries to add admin-node to aggregate because cannot find node name in DB

/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py(435)service_get_by_compute_host()

434 def service_get_by_compute_host(context, host):
435 -> result = model_query(context, models.Service, read_deleted="no").\
436 options(joinedload('compute_node')).\
437 filter_by(host=host).\
438 filter_by(topic=CONF.compute_topic).\
439 first()
440
441 -> if not result:
442 raise exception.ComputeHostNotFound(host=host)

I offer to replace "os-hosts" by "os-hypervisors" which returns only compute nodes.

Changed in tempest:
status: New → Confirmed
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/94203

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

Reviewed: https://review.openstack.org/94203
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=7ddb14f2d3ecaa4bb6dd9e8bceebcfe3ea5a1913
Submitter: Jenkins
Branch: master

commit 7ddb14f2d3ecaa4bb6dd9e8bceebcfe3ea5a1913
Author: Attila Fazekas <email address hidden>
Date: Mon May 19 16:42:22 2014 +0200

    test_aggregates_basic_ops picks a non compute node

    test_aggregates host ties to add non-hypervisor node,
    (does not runs a nova compute service) to an aggregate.

    It can cause failures, if the openstack deployment has a node,
    with one of the following services n-net, n-cond, n-sch, n-net,
     but without n-cpu.

    It is a similar issue, what we had with the aggregate api test.

    Change-Id: Idbe037da73169e0ebce8a8bb5d7652dcc39eb92b
    Closing-Bug: #1318578
    Related-Bug: #1294511

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

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/97724

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (stable/havana)

Reviewed: https://review.openstack.org/97724
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=8755bc9ec768eab3174812afad06bb70ca27575c
Submitter: Jenkins
Branch: stable/havana

commit 8755bc9ec768eab3174812afad06bb70ca27575c
Author: Attila Fazekas <email address hidden>
Date: Mon May 19 16:42:22 2014 +0200

    test_aggregates_basic_ops picks a non compute node

    test_aggregates host ties to add non-hypervisor node,
    (does not runs a nova compute service) to an aggregate.

    It can cause failures, if the openstack deployment has a node,
    with one of the following services n-net, n-cond, n-sch, n-net,
     but without n-cpu.

    It is a similar issue, what we had with the aggregate api test.

    Change-Id: Idbe037da73169e0ebce8a8bb5d7652dcc39eb92b
    Closing-Bug: #1318578
    Related-Bug: #1294511
    (cherry picked from commit 7ddb14f2d3ecaa4bb6dd9e8bceebcfe3ea5a1913)

tags: added: in-stable-havana
Changed in tempest:
status: Confirmed → Fix Committed
Changed in tempest:
assignee: nobody → Attila Fazekas (afazekas)
status: Fix Committed → Fix Released
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.