test_filter_router_tags fails with testtools.matchers._impl.MismatchError: set(['tag-res2', 'tag-res3']) != set([u'tag-res3'])

Bug #1673086 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Critical
Ihar Hrachyshka

Bug Description

http://logs.openstack.org/53/319353/4/check/gate-neutron-dsvm-api-ubuntu-xenial/bafaa60/testr_results.html.gz

ft1.1: neutron.tests.tempest.api.test_tag.TagFilterRouterTestJSON.test_filter_router_tags[id-cdd3f3ea-073d-4435-a6cb-826a4064193d,smoke]_StringException: Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
2017-03-15 05:06:28,543 8715 INFO [tempest.lib.common.rest_client] Request (TagFilterRouterTestJSON:test_filter_router_tags): 200 GET http://15.184.66.234:9696/v2.0/routers?tags=red 0.300s
2017-03-15 05:06:28,543 8715 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'X-Auth-Token': '<omitted>', 'Accept': 'application/json'}
        Body: None
    Response - Headers: {'content-location': 'http://15.184.66.234:9696/v2.0/routers?tags=red', 'status': '200', u'x-openstack-request-id': 'req-dd2c112c-7e0b-4c1f-a3e9-67a993cb3765', u'content-type': 'application/json', u'content-length': '1431', u'date': 'Wed, 15 Mar 2017 05:06:28 GMT', u'connection': 'close'}
        Body: {"routers": [{"status": "ACTIVE", "external_gateway_info": null, "availability_zone_hints": [], "availability_zones": [], "description": "", "tags": ["blue", "red", "green"], "tenant_id": "a74304310e6a4a669dae814a4f644503", "created_at": "2017-03-15T05:06:25Z", "admin_state_up": false, "updated_at": "2017-03-15T05:06:27Z", "flavor_id": null, "revision_number": 6, "routes": [], "project_id": "a74304310e6a4a669dae814a4f644503", "id": "388e0638-9e6d-4658-b9b3-ac664fbbc96b", "name": "tag-res3"}, {"status": "ACTIVE", "external_gateway_info": null, "availability_zone_hints": [], "availability_zones": [], "description": "", "tags": ["red"], "tenant_id": "a74304310e6a4a669dae814a4f644503", "created_at": "2017-03-15T05:06:25Z", "admin_state_up": false, "updated_at": "2017-03-15T05:06:27Z", "flavor_id": null, "revision_number": 6, "routes": [], "project_id": "a74304310e6a4a669dae814a4f644503", "id": "74dca3b4-9cf1-493e-8acb-1845da14f2f5", "name": "tag-res2"}, {"status": "ACTIVE", "external_gateway_info": null, "availability_zone_hints": [], "availability_zones": [], "description": "", "tags": ["red"], "tenant_id": "a74304310e6a4a669dae814a4f644503", "created_at": "2017-03-15T05:06:24Z", "admin_state_up": false, "updated_at": "2017-03-15T05:06:27Z", "flavor_id": null, "revision_number": 4, "routes": [], "project_id": "a74304310e6a4a669dae814a4f644503", "id": "baf41f14-fac6-4c3e-98db-10dd6de963ca", "name": "tag-res1"}]}
2017-03-15 05:06:28,728 8715 INFO [tempest.lib.common.rest_client] Request (TagFilterRouterTestJSON:test_filter_router_tags): 200 GET http://15.184.66.234:9696/v2.0/routers?tags=red%2Cblue 0.184s
2017-03-15 05:06:28,729 8715 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'X-Auth-Token': '<omitted>', 'Accept': 'application/json'}
        Body: None
    Response - Headers: {'content-location': 'http://15.184.66.234:9696/v2.0/routers?tags=red%2Cblue', 'status': '200', u'x-openstack-request-id': 'req-c17048b2-6a89-438a-8ba9-98cabf92dc6d', u'content-type': 'application/json', u'content-length': '497', u'date': 'Wed, 15 Mar 2017 05:06:28 GMT', u'connection': 'close'}
        Body: {"routers": [{"status": "ACTIVE", "external_gateway_info": null, "availability_zone_hints": [], "availability_zones": [], "description": "", "tags": ["green", "blue", "red"], "tenant_id": "a74304310e6a4a669dae814a4f644503", "created_at": "2017-03-15T05:06:25Z", "admin_state_up": false, "updated_at": "2017-03-15T05:06:27Z", "flavor_id": null, "revision_number": 6, "routes": [], "project_id": "a74304310e6a4a669dae814a4f644503", "id": "388e0638-9e6d-4658-b9b3-ac664fbbc96b", "name": "tag-res3"}]}
}}}

Traceback (most recent call last):
  File "tempest/test.py", line 121, in wrapper
    return func(*func_args, **func_kwargs)
  File "/opt/stack/new/neutron/neutron/tests/tempest/api/test_tag.py", line 317, in test_filter_router_tags
    self._test_filter_tags()
  File "/opt/stack/new/neutron/neutron/tests/tempest/api/test_tag.py", line 190, in _test_filter_tags
    self._assertEqualResources(['tag-res2', 'tag-res3'], res)
  File "/opt/stack/new/neutron/neutron/tests/tempest/api/test_tag.py", line 179, in _assertEqualResources
    self.assertEqual(set(expected), set(actual))
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: set(['tag-res2', 'tag-res3']) != set([u'tag-res3'])

Changed in neutron:
status: New → Confirmed
importance: Undecided → Critical
tags: added: gate-failure tempest
Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

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

Reviewed: https://review.openstack.org/446005
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0cb8fd637472c9aeb3ad162bf74d96f5a678eacd
Submitter: Jenkins
Branch: master

commit 0cb8fd637472c9aeb3ad162bf74d96f5a678eacd
Author: Ihar Hrachyshka <email address hidden>
Date: Wed Mar 15 15:08:59 2017 +0000

    On update_tags, clean up tags from the requested resource only

    There was a bug in I0179a3616689f39d93c337c730283e21a01677cf that made
    the service plugin to clean up removed tags from all resources, not just
    the one requested.

    Change-Id: Ifbe13102ebd903e01eb28a00d97e7e94d1a0e0b1
    Closes-Bug: #1673086

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

This issue was fixed in the openstack/neutron 11.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.