Managing access gets HTTP 500 due to using deprecated option timeout

Bug #1582475 reported by Billy Olsen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
swauth (Ubuntu)
Invalid
Medium
Billy Olsen
Trusty
Fix Released
Medium
Billy Olsen
Wily
Fix Released
Medium
Billy Olsen
Xenial
Fix Released
Medium
Billy Olsen

Bug Description

[Impact]

When running the 1.0.4-0ubuntu1 version of swauth with Swift 2.7.0-0ubuntu2~cloud0 (Swift from trusty-mitaka cloud archive) the server errors out with an error 500 when creating accounts. This prevents users from being able to create or manage accounts using swauth against Mitaka.

root@juju-swauth-machine-1:~# swauth-add-user -A http://127.0.0.1:8080/auth/ -K swauthkey -a test tester testing
Account creation failed: 500 Server Error
User creation failed: 500 Server Error

The upstream Swift release *finally* removed a deprecated timeout parameter for their custom memcache client 'set' function call in https://review.openstack.org/#/c/257065/ in order to maintain api compatible with the official python-memcache client.

The minimal fix for this bug is to backport commit c44b5b6 [1], which adds a test to determine if the version of swift has the time option or not. This commit has been removed in the latest version of swauth because swift/swauth no longer support clients < Juno, which would mean they all have the time parameter rather than the timeout parameter. The removal of that code caused this bug to manifest itself.

[1] https://github.com/openstack/swauth/commit/c44b5b64489c1721cf05992b14e53b0c8a4e325e

[Test Case]

1. Deploy swift-proxy and swift storage from the trusty-liberty Ubuntu Cloud Archive.
2. Deploy the swauth middleware (apt-get install swauth).
3. Configure swauth following the instructions at http://swauth.readthedocs.io/en/latest/
4. Create test user:
     swauth-add-user -A http[s]://<host>:<port>/auth/ -K swauthkey -a test tester testing
5. Ensure it works:
     swift -A http[s]://<host>:<port>/auth/v1.0 -U test:tester -K testing stat -v

[Regression Potential]

The cherry-pick of the fix should be fairly safe as the code dates to April 2013. That was, however, on a different version of the swauth code. An error in this code path would prevent servers from being able to use Swift itself as a wsgi middleware auth plugin.

[Other Info]

Upstream version 1.1.0 was recently released (after having been defunct since version 1.0.8 for 3 years) with the Mitaka version of OpenStack under the big tent model. The 1.1.0 version was recently synced from debian unstable into yakkety. There's a fair number of changes between 1.0.4 and 1.1.0 that I think warrants more testing and verification against the trusty-mitaka cloud-archive. However, the minimally invasive patch will enable this to work across versions providing sooner relief to any users encountering this issue.

description: updated
Changed in swauth (Ubuntu):
assignee: nobody → Billy Olsen (billy-olsen)
Revision history for this message
Billy Olsen (billy-olsen) wrote :

Since Yakkety was synced with the 1.1.0 version of the upstream swauth package, it does not need the fix. However, trusty, wily, and xenial all have version 1.0.4 of the swauth package so need this bug fix.

Revision history for this message
Billy Olsen (billy-olsen) wrote :
Revision history for this message
Billy Olsen (billy-olsen) wrote :
Revision history for this message
Billy Olsen (billy-olsen) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "xenial debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Changed in swauth (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
tags: added: sts
Changed in swauth (Ubuntu Trusty):
status: New → In Progress
Changed in swauth (Ubuntu Wily):
status: New → In Progress
Changed in swauth (Ubuntu Xenial):
status: New → In Progress
Changed in swauth (Ubuntu Trusty):
importance: Undecided → Medium
Changed in swauth (Ubuntu Wily):
importance: Undecided → Medium
Changed in swauth (Ubuntu Xenial):
importance: Undecided → Medium
Changed in swauth (Ubuntu Trusty):
assignee: nobody → Billy Olsen (billy-olsen)
Changed in swauth (Ubuntu Wily):
assignee: nobody → Billy Olsen (billy-olsen)
Changed in swauth (Ubuntu Xenial):
assignee: nobody → Billy Olsen (billy-olsen)
Revision history for this message
sid kudige (sidharth-kudige) wrote :

Billy,

I have successfully tested the fix in the package at https://launchpad.net/~billy-olsen/+archive/ubuntu/swauth-lp1582475 against our Mitaka cluster. Everything looks good. Thanks

Louis Bouchard (louis)
tags: added: sts-sponsor
Louis Bouchard (louis)
tags: added: sts-sru
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Billy, or anyone else affected,

Accepted swauth into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/swauth/1.0.4-0ubuntu1.14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in swauth (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in swauth (Ubuntu Wily):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Billy, or anyone else affected,

Accepted swauth into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/swauth/1.0.4-0ubuntu1.15.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in swauth (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Billy, or anyone else affected,

Accepted swauth into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/swauth/1.0.4-0ubuntu1.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-done-trusty
tags: added: verification-done-wily
tags: added: verification-done verification-done-xenial
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package swauth - 1.0.4-0ubuntu1.14.04.1

---------------
swauth (1.0.4-0ubuntu1.14.04.1) trusty; urgency=medium

  * Use correct timeout parameter (LP: #1582475)
    - d/p/0001-Fixed-to-work-with-newer-Swift.patch: backported a patch
      from upstream to use either the timeout or time parameter to the
      Swift memcache client implementation depending on the version of
      Swift installed.

 -- Billy Olsen <email address hidden> Tue, 07 Jun 2016 16:53:12 +0200

Changed in swauth (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for swauth has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package swauth - 1.0.4-0ubuntu1.15.10.1

---------------
swauth (1.0.4-0ubuntu1.15.10.1) wily; urgency=medium

  * Use correct timeout parameter (LP: #1582475)
    - d/p/0001-Fixed-to-work-with-newer-Swift.patch: backported a patch
      from upstream to use either the timeout or time parameter to the
      Swift memcache client implementation depending on the version of
      Swift installed.

 -- Billy Olsen <email address hidden> Tue, 07 Jun 2016 17:00:48 +0200

Changed in swauth (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package swauth - 1.0.4-0ubuntu1.16.04.1

---------------
swauth (1.0.4-0ubuntu1.16.04.1) xenial; urgency=medium

  * Use correct timeout parameter (LP: #1582475)
    - d/p/0001-Fixed-to-work-with-newer-Swift.patch: backported a patch
      from upstream to use either the timeout or time parameter to the
      Swift memcache client implementation depending on the version of
      Swift installed.

 -- Billy Olsen <email address hidden> Tue, 07 Jun 2016 17:09:12 +0200

Changed in swauth (Ubuntu Xenial):
status: Fix Committed → Fix Released
Louis Bouchard (louis)
Changed in swauth (Ubuntu):
status: In Progress → Invalid
tags: removed: sts-sponsor
Louis Bouchard (louis)
tags: added: sts-sru-done
removed: sts-sru
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.