testQuotedWWWAuthenticateHeader date time encoding error

Bug #1368048 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Critical
Alistair Coles
keystonemiddleware
Invalid
Critical
Unassigned

Bug Description

I'm not exactly sure what causes this but seems to be some encoding/formatting issue??

2014-09-11 05:20:25.109 | 2014-09-11 05:20:25.048 | ======================================================================
2014-09-11 05:20:25.110 | 2014-09-11 05:20:25.049 | FAIL: testQuotedWWWAuthenticateHeader (test.functional.tests.TestAccountUTF8)
2014-09-11 05:20:25.110 | 2014-09-11 05:20:25.051 | ----------------------------------------------------------------------
2014-09-11 05:20:25.110 | 2014-09-11 05:20:25.052 | Traceback (most recent call last):
2014-09-11 05:20:25.110 | 2014-09-11 05:20:25.053 | File "/opt/stack/new/swift/test/functional/tests.py", line 283, in testQuotedWWWAuthenticateHeader
2014-09-11 05:20:25.111 | 2014-09-11 05:20:25.055 | self.assert_(expected in resp_headers)
2014-09-11 05:20:25.112 | 2014-09-11 05:20:25.057 | AssertionError: False is not true
2014-09-11 05:20:25.112 | 2014-09-11 05:20:25.058 | -------------------- >> begin captured logging << --------------------
2014-09-11 05:20:25.112 | 2014-09-11 05:20:25.059 | keystoneclient.auth.identity.v2: DEBUG: Making authentication request to http://127.0.0.1:35357/v2.0/tokens
2014-09-11 05:20:25.112 | 2014-09-11 05:20:25.061 | urllib3.connectionpool: INFO: Starting new HTTP connection (1): 127.0.0.1
2014-09-11 05:20:25.113 | 2014-09-11 05:20:25.062 | urllib3.connectionpool: DEBUG: Setting read timeout to None
2014-09-11 05:20:25.113 | 2014-09-11 05:20:25.064 | urllib3.connectionpool: DEBUG: "POST /v2.0/tokens HTTP/1.1" 200 5088
2014-09-11 05:20:25.113 | 2014-09-11 05:20:25.065 | iso8601.iso8601: DEBUG: Parsed 2014-09-11T06:18:55Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'06', 'daydash': u'11', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'55', 'tz_minute': None, 'year': u'2014', 'separator': u'T', 'monthdash': u'09', 'day': None, 'minute': u'18'} with default timezone <iso8601.iso8601.Utc object at 0x7fd665a8b050>
2014-09-11 05:20:25.113 | 2014-09-11 05:20:25.067 | iso8601.iso8601: DEBUG: Got u'2014' for 'year' with default None
2014-09-11 05:20:25.114 | 2014-09-11 05:20:25.069 | iso8601.iso8601: DEBUG: Got u'09' for 'monthdash' with default 1
2014-09-11 05:20:25.114 | 2014-09-11 05:20:25.071 | iso8601.iso8601: DEBUG: Got 9 for 'month' with default 9
2014-09-11 05:20:25.114 | 2014-09-11 05:20:25.072 | iso8601.iso8601: DEBUG: Got u'11' for 'daydash' with default 1
2014-09-11 05:20:25.114 | 2014-09-11 05:20:25.074 | iso8601.iso8601: DEBUG: Got 11 for 'day' with default 11
2014-09-11 05:20:25.115 | 2014-09-11 05:20:25.076 | iso8601.iso8601: DEBUG: Got u'06' for 'hour' with default None
2014-09-11 05:20:25.126 | 2014-09-11 05:20:25.077 | iso8601.iso8601: DEBUG: Got u'18' for 'minute' with default None
2014-09-11 05:20:25.126 | 2014-09-11 05:20:25.079 | iso8601.iso8601: DEBUG: Got u'55' for 'second' with default None

Full logs @ http://logs.openstack.org/85/119985/3/check/check-swift-dsvm-functional/eab66d4/console.html

Revision history for this message
Alistair Coles (alistair-coles) wrote :
Revision history for this message
Christian Schwede (cschwede) wrote :
Revision history for this message
Alistair Coles (alistair-coles) wrote :

I suspect this is caused by a recent change to keystonemiddleware.authtoken https://review.openstack.org/#/c/119261 that merged earlier today. authtoken now adds another www-authenticate header, so the swift functional test fails.

I have reproduced locally with keystonemiddleware.authtoken (I don't see failure with keystoneclient.middleware.authtoken but that is not a surprise - it won't be getting updated).

I'm working on a fix.

Changed in swift:
assignee: nobody → Alistair Coles (alistair-coles)
Changed in swift:
status: New → In Progress
Revision history for this message
Alistair Coles (alistair-coles) wrote :
Revision history for this message
Dolph Mathews (dolph) wrote :

FWIW, this is affecting Keystone, swift and openstack/requirements builds as of 2014-09-11 03:31:25 UTC (that's the oldest hit in logstash anyway). Keystone isn't able to land changes at all right now, and we have 9 in the gate right now -- I suspect swift is in the same position. I'd suggest marking this as critical for swift.

Added keystonemiddleware in case there's anything to follow up with there.

Changed in keystonemiddleware:
importance: Undecided → Critical
Changed in swift:
importance: Undecided → Critical
Revision history for this message
Alistair Coles (alistair-coles) wrote :

OK looks like https://review.openstack.org/120737 has made things happy again.

The root cause of this was that swift has a functional test to check that www-authenticate headers are as expected. keystonemiddleware has added a www-authenticate header to all 401 responses to point to the keystone identity_uri. That header wasn't expected by the test.

Note: the new www-authenticate is in addition to the existing one generated by keystoneauth, not a replacement.

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

Reviewed: https://review.openstack.org/120737
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=ab96796dc8d1da9037330da0822c8b8d2264d192
Submitter: Jenkins
Branch: master

commit ab96796dc8d1da9037330da0822c8b8d2264d192
Author: Alistair Coles <email address hidden>
Date: Thu Sep 11 10:23:32 2014 +0100

    Fix broken www-authenticate functional test

    testQuotedWWWAuthenticateHeader functional test started failing
    due to a change to keystonemiddleware.auth_token, which now adds
    its own www-authenticate header in addition to the one that swift
    keystoneauth adds.

    This patch changes the functional test to check expected
    swift generated header value is in the concatenation of
    www-authenticate values.

    Verified that functional tests still pass using tempauth.

    Closes-Bug: 1368048
    Change-Id: I913af077df800a559d259c1622f286ad10eae9df

Changed in swift:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in keystonemiddleware:
status: New → Incomplete
status: Incomplete → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/121036

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to swift (master)

Reviewed: https://review.openstack.org/121036
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=a03732e142540e5a7d6cb11de5232f0642beb20d
Submitter: Jenkins
Branch: master

commit a03732e142540e5a7d6cb11de5232f0642beb20d
Author: Alistair Coles <email address hidden>
Date: Fri Sep 12 10:20:19 2014 +0100

    Add comments to clarify change to www-authenticate test

    Trivial patch to tidy-up change to the functional test for
    www-authenticate header and add a comment to explain
    that multiple header values might be returned.

    Change-Id: If62cb3fd9e11450a2be0cec71e80ecb74a959d04
    Related-bug: 1368048

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (feature/ec)

Related fix proposed to branch: feature/ec
Review: https://review.openstack.org/122541

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to swift (feature/ec)
Download full text (21.0 KiB)

Reviewed: https://review.openstack.org/122541
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=18901494e9b4b47fb181a5ead8ed82738db8563f
Submitter: Jenkins
Branch: feature/ec

commit fc5cee5f05692f7e6dd5ad5a6d0ae682dd4bf3e0
Author: Christian Schwede <email address hidden>
Date: Mon Sep 15 17:22:54 2014 +0000

    Allow filtering by region in swift-recon

    The option "-r" is already used, thus only "--region" is used to specify
    filter by region.

    Change-Id: If769f2f3191c202933b03b48fe0f22b7c94a4dd6
    Closes-Bug: 1369583

commit 423ac74e888dcd693129100e0b37a51428bb62e1
Author: Christian Schwede <email address hidden>
Date: Sun Sep 14 23:41:19 2014 +0200

    Fix internal link to keystoneauth in documentation

    This patch fixes a broken link at the end of the table in
    http://docs.openstack.org/developer/swift/logs.html#swift-source

    Change-Id: I989173ac93e0f840997333be0d5cec07eb77b304

commit 64548420c87f3163ed543c9e9a02a4f1abec69e0
Author: Andreas Jaeger <email address hidden>
Date: Sat Sep 13 09:48:14 2014 +0200

    Stop using intersphinx

    Remove intersphinx from the docs build as it triggers network calls that
    occasionally fail, and we don't really use intersphinx (links other
    sphinx documents out on the internet)

    This also removes the requirement for internet access during docs build.

    This can cause docs jobs to fail if the project errors out on
    warnings.

    Change-Id: I71e941e2a639641a662a163c682eb86d51de42fb
    Related-Bug: #1368910

commit 5c9835125802c51e2eb2823f5208d53c358a5e84
Author: Christian Schwede <email address hidden>
Date: Fri Sep 12 14:37:04 2014 +0000

    Fix RingBuilder._build_max_replicas_by_tier docstring

    The current docstring doesn't include zones, and the order of the
    entries is not up to date with the current code. Let's fix this.

    Change-Id: Ibabd79427b83d9e8c86b2caeb93dee219c8274c0

commit a03732e142540e5a7d6cb11de5232f0642beb20d
Author: Alistair Coles <email address hidden>
Date: Fri Sep 12 10:20:19 2014 +0100

    Add comments to clarify change to www-authenticate test

    Trivial patch to tidy-up change to the functional test for
    www-authenticate header and add a comment to explain
    that multiple header values might be returned.

    Change-Id: If62cb3fd9e11450a2be0cec71e80ecb74a959d04
    Related-bug: 1368048

commit ab96796dc8d1da9037330da0822c8b8d2264d192
Author: Alistair Coles <email address hidden>
Date: Thu Sep 11 10:23:32 2014 +0100

    Fix broken www-authenticate functional test

    testQuotedWWWAuthenticateHeader functional test started failing
    due to a change to keystonemiddleware.auth_token, which now adds
    its own www-authenticate header in addition to the one that swift
    keystoneauth adds.

    This patch changes the functional test to check expected
    swift generated header value is in the concatenation of
    www-authenticate values.

    Verified that functional tests still pass using tempauth.

    Closes-Bug: 1368048
    Change-Id: I913af077df800a559d259c1622f286ad10eae9df

commit f4d3facdf...

Thierry Carrez (ttx)
Changed in swift:
milestone: none → 2.2.0-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in swift:
milestone: 2.2.0-rc1 → 2.2.0
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.