test_revisions failures

Bug #1633334 reported by YAMAMOTO Takashi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-midonet
Fix Released
Critical
YAMAMOTO Takashi

Bug Description

some tests in test_revisions are failing (if enabled)
eg.
http://logs.openstack.org/88/386088/1/check/gate-tempest-dsvm-networking-midonet-v2/c1a6f9a/logs/testr_results.html.gz

ft25.8: neutron.tests.tempest.api.test_revisions.TestRevisions.test_update_port_security_bumps_revisions[id-9c83105c-9973-45ff-9ca2-e66d64700abe]_StringException: Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
2016-10-13 17:26:51,193 12294 INFO [tempest.lib.common.rest_client] Request (TestRevisions:test_update_port_security_bumps_revisions): 201 POST http://127.0.0.1:9696/v2.0/networks 0.288s
2016-10-13 17:26:51,193 12294 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'X-Auth-Token': '<omitted>', 'Accept': 'application/json', 'Content-Type': 'application/json'}
        Body: {"network": {"name": "test-network--156913046", "port_security_enabled": false}}
    Response - Headers: {'status': '201', 'connection': 'close', 'content-type': 'application/json', 'x-openstack-request-id': 'req-56484142-6071-4061-b54e-6713853ed36e', 'date': 'Thu, 13 Oct 2016 17:26:51 GMT', 'content-location': 'http://127.0.0.1:9696/v2.0/networks', 'content-length': '456'}
        Body: {"network": {"status": "ACTIVE", "subnets": [], "name": "test-network--156913046", "admin_state_up": true, "tenant_id": "f2ad91c882364833bb37ee7ae20cccb5", "created_at": "2016-10-13T17:26:51Z", "tags": [], "updated_at": "2016-10-13T17:26:51Z", "router:external": false, "revision_number": 2, "shared": false, "port_security_enabled": false, "project_id": "f2ad91c882364833bb37ee7ae20cccb5", "id": "59748b23-dd59-4ebc-b3b5-e9a7c50fcc47", "description": ""}}
2016-10-13 17:26:51,474 12294 INFO [tempest.lib.common.rest_client] Request (TestRevisions:test_update_port_security_bumps_revisions): 200 PUT http://127.0.0.1:9696/v2.0/networks/59748b23-dd59-4ebc-b3b5-e9a7c50fcc47 0.280s
2016-10-13 17:26:51,474 12294 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'X-Auth-Token': '<omitted>', 'Accept': 'application/json', 'Content-Type': 'application/json'}
        Body: {"network": {"port_security_enabled": true}}
    Response - Headers: {'status': '200', 'connection': 'close', 'content-type': 'application/json', 'x-openstack-request-id': 'req-2d5b0abb-6674-4c6d-a809-472050cab25f', 'date': 'Thu, 13 Oct 2016 17:26:51 GMT', 'content-location': 'http://127.0.0.1:9696/v2.0/networks/59748b23-dd59-4ebc-b3b5-e9a7c50fcc47', 'content-length': '455'}
        Body: {"network": {"status": "ACTIVE", "subnets": [], "name": "test-network--156913046", "admin_state_up": true, "tenant_id": "f2ad91c882364833bb37ee7ae20cccb5", "created_at": "2016-10-13T17:26:51Z", "tags": [], "updated_at": "2016-10-13T17:26:51Z", "router:external": false, "revision_number": 2, "shared": false, "port_security_enabled": true, "project_id": "f2ad91c882364833bb37ee7ae20cccb5", "id": "59748b23-dd59-4ebc-b3b5-e9a7c50fcc47", "description": ""}}
}}}

Traceback (most recent call last):
  File "tempest/test.py", line 152, in wrapper
    return func(*func_args, **func_kwargs)
  File "/opt/stack/new/neutron/neutron/tests/tempest/api/test_revisions.py", line 201, in test_update_port_security_bumps_revisions
    net['revision_number'])
  File "/usr/local/lib/python2.7/dist-packages/unittest2/case.py", line 1233, in assertGreater
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/local/lib/python2.7/dist-packages/unittest2/case.py", line 690, in fail
    raise self.failureException(msg)
AssertionError: 2 not greater than 2

Changed in networking-midonet:
assignee: nobody → YAMAMOTO Takashi (yamamoto)
importance: Undecided → Critical
milestone: none → 3.0.0
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-midonet (master)

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

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

Reviewed: https://review.openstack.org/386396
Committed: https://git.openstack.org/cgit/openstack/networking-midonet/commit/?id=d2d7024850f9e49031b323bb5173c3f04c8f496a
Submitter: Jenkins
Branch: master

commit d2d7024850f9e49031b323bb5173c3f04c8f496a
Author: YAMAMOTO Takashi <email address hidden>
Date: Fri Oct 14 13:20:21 2016 +0900

    Retrive DB object after update

    Revision numbers are bumped in the db flush callback.
    It doesn't work well for us because we have surrounding transactions,
    which would defer object flushing.

    This commit workarounds the issue by retrieving DB objects again.

    An alternative would be to make the base class methods provide
    DB object for us, similarly to what create methods do.

    I don't quite understand why expire_all() is necessary, but without
    having them in update_port, get_port() sometimes (not always) see
    the previous values of attributes and it makes some tests including
    the following ones fail occasionally.

        neutron.tests.tempest.api.test_extension_driver_port_security.PortSecTest.test_port_sec_update_pass
        neutron.tests.tempest.api.test_extension_driver_port_security.PortSecTest.test_port_sec_update_port_failed

    Closes-Bug: #1633334
    Change-Id: I370a2e5e987c177c540f1a0241212de62da1d930

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

This issue was fixed in the openstack/networking-midonet 3.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.