test_rule_update_forbidden_for_regular_tenants_own_policy fails with NotFound

Bug #1683365 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Medium
Unassigned

Bug Description

http://logs.openstack.org/06/440806/5/gate/gate-neutron-dsvm-api-ubuntu-xenial/6d9b1d2/testr_results.html.gz

pythonlogging:'': {{{
2017-04-17 07:24:06,647 21614 INFO [tempest.lib.common.rest_client] Request (QosBandwidthLimitRuleTestJSON:test_rule_update_forbidden_for_regular_tenants_own_policy): 201 POST http://15.184.66.59:9696/v2.0/qos/policies 0.156s
2017-04-17 07:24:06,647 21614 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Accept': 'application/json', 'X-Auth-Token': '<omitted>', 'Content-Type': 'application/json'}
        Body: {"policy": {"description": "test policy", "shared": false, "tenant_id": "dae0db2239d040a7a24a2548e7745010", "name": "test-policy"}}
    Response - Headers: {u'connection': 'close', 'status': '201', u'x-openstack-request-id': 'req-f18fe708-dcc6-4e0a-9ec8-ea1f1e93e409', u'content-type': 'application/json', 'content-location': 'http://15.184.66.59:9696/v2.0/qos/policies', u'content-length': '318', u'date': 'Mon, 17 Apr 2017 07:24:06 GMT'}
        Body: {"policy":{"name":"test-policy","rules":[],"tenant_id":"dae0db2239d040a7a24a2548e7745010","created_at":"2017-04-17T07:24:06Z","updated_at":"2017-04-17T07:24:06Z","revision_number":1,"shared":false,"project_id":"dae0db2239d040a7a24a2548e7745010","id":"275ede54-e091-4615-8feb-1171c76c9f86","description":"test policy"}}
2017-04-17 07:24:07,162 21614 INFO [tempest.lib.common.rest_client] Request (QosBandwidthLimitRuleTestJSON:test_rule_update_forbidden_for_regular_tenants_own_policy): 201 POST http://15.184.66.59:9696/v2.0/qos/policies/275ede54-e091-4615-8feb-1171c76c9f86/bandwidth_limit_rules 0.514s
2017-04-17 07:24:07,163 21614 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Accept': 'application/json', 'X-Auth-Token': '<omitted>', 'Content-Type': 'application/json'}
        Body: {"bandwidth_limit_rule": {"max_burst_kbps": 1, "max_kbps": 1}}
    Response - Headers: {u'connection': 'close', 'status': '201', u'x-openstack-request-id': 'req-a81448a4-580f-430d-8612-5b9f49279bde', u'content-type': 'application/json', 'content-location': 'http://15.184.66.59:9696/v2.0/qos/policies/275ede54-e091-4615-8feb-1171c76c9f86/bandwidth_limit_rules', u'content-length': '102', u'date': 'Mon, 17 Apr 2017 07:24:07 GMT'}
        Body: {"bandwidth_limit_rule":{"max_kbps":1,"id":"404613bf-d473-48e1-a8b0-9334afe6bf68","max_burst_kbps":1}}
2017-04-17 07:24:07,411 21614 INFO [tempest.lib.common.rest_client] Request (QosBandwidthLimitRuleTestJSON:test_rule_update_forbidden_for_regular_tenants_own_policy): 404 PUT http://15.184.66.59:9696/v2.0/qos/policies/275ede54-e091-4615-8feb-1171c76c9f86/bandwidth_limit_rules/404613bf-d473-48e1-a8b0-9334afe6bf68 0.247s
2017-04-17 07:24:07,412 21614 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Accept': 'application/json', 'X-Auth-Token': '<omitted>', 'Content-Type': 'application/json'}
        Body: {"bandwidth_limit_rule": {"max_burst_kbps": 4, "max_kbps": 2}}
    Response - Headers: {u'connection': 'close', 'status': '404', u'x-openstack-request-id': 'req-d02feb71-801a-4554-8d19-dfbfedd1e23b', u'content-type': 'application/json', 'content-location': 'http://15.184.66.59:9696/v2.0/qos/policies/275ede54-e091-4615-8feb-1171c76c9f86/bandwidth_limit_rules/404613bf-d473-48e1-a8b0-9334afe6bf68', u'content-length': '103', u'date': 'Mon, 17 Apr 2017 07:24:07 GMT'}
        Body: {"NeutronError": {"message": "The resource could not be found.", "type": "HTTPNotFound", "detail": ""}}
}}}

Traceback (most recent call last):
  File "/opt/stack/new/neutron/neutron/tests/tempest/api/test_qos.py", line 478, in test_rule_update_forbidden_for_regular_tenants_own_policy
    policy['id'], rule['id'], max_kbps=2, max_burst_kbps=4)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 485, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 496, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 547, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/usr/local/lib/python2.7/dist-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/usr/local/lib/python2.7/dist-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 475, in match
    reraise(*matchee)
  File "/usr/local/lib/python2.7/dist-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 1049, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/opt/stack/new/neutron/neutron/tests/tempest/services/network/json/network_client.py", line 612, in update_bandwidth_limit_rule
    resp, body = self.put(uri, jsonutils.dumps(post_data))
  File "tempest/lib/common/rest_client.py", line 341, in put
    return self.request('PUT', url, extra_headers, headers, body, chunked)
  File "tempest/lib/common/rest_client.py", line 666, in request
    self._error_checker(resp, resp_body)
  File "tempest/lib/common/rest_client.py", line 772, in _error_checker
    raise exceptions.NotFound(resp_body, resp=resp)
tempest.lib.exceptions.NotFound: Object not found
Details: {u'type': u'HTTPNotFound', u'message': u'The resource could not be found.', u'detail': u''}

Probably a result of https://review.openstack.org/#/c/456894/

Tags: api
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

In server log:

http://logs.openstack.org/06/440806/5/gate/gate-neutron-dsvm-api-ubuntu-xenial/6d9b1d2/logs/screen-q-svc.txt.gz#_2017-04-17_07_24_07_408

2017-04-17 07:24:07.408 10634 DEBUG neutron.policy [req-d02feb71-801a-4554-8d19-dfbfedd1e23b tempest-QosBandwidthLimitRuleTestJSON-204671921 tempest-QosBandwidthLimitRuleTestJSON-204671921] Enforcing rules: ['update_policy_bandwidth_limit_rule'] log_rule_list /opt/stack/new/neutron/neutron/policy.py:335
2017-04-17 07:24:07.408 10634 DEBUG neutron.policy [req-d02feb71-801a-4554-8d19-dfbfedd1e23b tempest-QosBandwidthLimitRuleTestJSON-204671921 tempest-QosBandwidthLimitRuleTestJSON-204671921] Failed policy check for 'update_policy_bandwidth_limit_rule' enforce /opt/stack/new/neutron/neutron/policy.py:409
2017-04-17 07:24:07.409 10634 INFO neutron.pecan_wsgi.hooks.translation [req-d02feb71-801a-4554-8d19-dfbfedd1e23b tempest-QosBandwidthLimitRuleTestJSON-204671921 tempest-QosBandwidthLimitRuleTestJSON-204671921] PUT failed (client error): The resource could not be found.

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
tags: added: api gate-failure qos
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Then later:

2017-04-17 07:24:07.474 10635 WARNING neutron.pecan_wsgi.controllers.root [req-10935021-4913-4368-81d5-03337fa5011e tempest-QosBandwidthLimitRuleTestJSON-1906564124 tempest-QosBandwidthLimitRuleTestJSON-1906564124] No controller found for: qos-rules - returning response code 404

Changed in neutron:
importance: High → Medium
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

It may actually be a one patch on review issue since it shows up in: https://review.openstack.org/#/c/440806/

Changed in neutron:
status: Confirmed → Invalid
tags: removed: gate-failure
tags: removed: qos
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.