broken ACL tests

Bug #1466405 reported by Lucas Alvares Gomes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Critical
Lucas Alvares Gomes
Kilo
Fix Released
Undecided
Unassigned

Bug Description

Gate is blocked due:

======================================================================
FAIL: ironic.tests.api.test_acl.TestACL.test_authenticated
tags: worker-4
----------------------------------------------------------------------
pythonlogging:'': {{{
Context impl SQLiteImpl.
Will assume non-transactional DDL.
}}}

stderr: {{{
INFO [alembic.migration] Context impl SQLiteImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Running stamp_revision -> 2fb93ffd2af1
/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/pecan/__init__.py:125: RuntimeWarning: `static_root` is only used when `debug` is True, ignoring
  RuntimeWarning
}}}

stdout: {{{GET: /v1/nodes/1be26c0b-03f2-4d2e-ae87-c02d7f33c123 {}}}}

Traceback (most recent call last):
  File "ironic/tests/api/test_acl.py", line 62, in test_authenticated
    self.node_path, headers={'X-Auth-Token': utils.ADMIN_TOKEN})
  File "ironic/tests/api/test_acl.py", line 45, in get_json
    **param)
  File "ironic/tests/api/base.py", line 219, in get_json
    expect_errors=expect_errors)
  File "/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/webtest/app.py", line 322, in get
    expect_errors=expect_errors)
  File "/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/webtest/app.py", line 631, in do_request
    self._check_status(status, res)
  File "/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/webtest/app.py", line 663, in _check_status
    res)
webtest.app.AppError: Bad response: 401 Unauthorized (not 200 OK or 3xx redirect for http://localhost/v1/nodes/1be26c0b-03f2-4d2e-ae87-c02d7f33c123)
Authentication required
======================================================================
FAIL: ironic.tests.api.test_acl.TestACL.test_non_admin
tags: worker-1
----------------------------------------------------------------------
pythonlogging:'': {{{
Context impl SQLiteImpl.
Will assume non-transactional DDL.
}}}

stderr: {{{
INFO [alembic.migration] Context impl SQLiteImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Running stamp_revision -> 2fb93ffd2af1
/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/pecan/__init__.py:125: RuntimeWarning: `static_root` is only used when `debug` is True, ignoring
  RuntimeWarning
}}}

stdout: {{{
GET: /v1/nodes/1be26c0b-03f2-4d2e-ae87-c02d7f33c123 {}
GOT:Response: 401 Unauthorized
Content-Type: text/html; charset=UTF-8
Www-Authenticate: Keystone uri='https://127.0.0.1:35357'
Authentication required
}}}

Traceback (most recent call last):
  File "ironic/tests/api/test_acl.py", line 72, in test_non_admin
    self.assertEqual(403, response.status_int)
  File "/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 403 != 401
======================================================================
FAIL: ironic.tests.api.test_acl.TestACL.test_non_admin_with_admin_header
tags: worker-5
----------------------------------------------------------------------
pythonlogging:'': {{{
Context impl SQLiteImpl.
Will assume non-transactional DDL.
}}}

stderr: {{{
INFO [alembic.migration] Context impl SQLiteImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Running stamp_revision -> 2fb93ffd2af1
/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/pecan/__init__.py:125: RuntimeWarning: `static_root` is only used when `debug` is True, ignoring
  RuntimeWarning
}}}

stdout: {{{
GET: /v1/nodes/1be26c0b-03f2-4d2e-ae87-c02d7f33c123 {}
GOT:Response: 401 Unauthorized
Content-Type: text/html; charset=UTF-8
Www-Authenticate: Keystone uri='https://127.0.0.1:35357'
Authentication required
}}}

Traceback (most recent call last):
  File "ironic/tests/api/test_acl.py", line 80, in test_non_admin_with_admin_header
    self.assertEqual(403, response.status_int)
  File "/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/lucasagomes/Projects/ironic/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 403 != 401
Ran 2291 (-7) tests in 9.045s (-0.577s)
FAILED (id=456, failures=3 (+3), skips=15)

Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Ok the problem is the new version of keystonemiddleware (2.0.0). If you install the previous version (1.6.0) things works again

Changed in ironic:
importance: Undecided → Critical
Changed in ironic:
status: New → In Progress
description: updated
Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/250341

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

Reviewed: https://review.openstack.org/250341
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=46412348d02a30b059c05b8b32c7a3fc1eafc369
Submitter: Jenkins
Branch: stable/kilo

commit 46412348d02a30b059c05b8b32c7a3fc1eafc369
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jun 18 11:34:13 2015 +0100

    Fix broken ACL tests

    In keystonemiddleware 2.0.0 the token cache keys are sha256 hashes of the
    token key. For versions of keystonemiddleware < 2.0.0 this is not the
    case, so this patch is changing the FakeMemcache class to support both.

    Change-Id: I14f6a47437ca861d3135bedbfe2b3a54de211182
    Closes-Bug: #1466405
    (cherry picked from commit 13bcebcaf390697d04a69855d8e50013d0312e1d)

tags: added: in-stable-kilo
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.