OpenStack Object Storage (Swift)

Compatibility issues with python webob 1.2b2

Reported by peter pang on 2011-11-10
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Brian Lamar
OpenStack Object Storage (swift)
High
Iryoung Jeong

Bug Description

if you use python webob 1.2b2 (it is the default install version of easy_install), you'd better change back to 1.1 stable version

when i use command:

swauth-list -A https://10.38.10.127:8080/auth/ -U .super_admin -K swauthkey

it's return 500 error

and from log of proxy server :

Nov 9 17:23:56 localhost proxy-server ERROR Unhandled exception in request:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/swift-1.4.3-py2.6.egg/swift/proxy/server.py", line 1706, in handle_request
    return handler(req)#012 File "/usr/lib/python2.6/site-packages/swift-1.4.3-py2.6.egg/swift/proxy/server.py", line 82, in wrapped
    return func(*a, **kw)
  File "/usr/lib/python2.6/site-packages/swift-1.4.3-py2.6.egg/swift/proxy/server.py", line 596, in GET
    return self.GETorHEAD(req)
  File "/usr/lib/python2.6/site-packages/swift-1.4.3-py2.6.egg/swift/proxy/server.py", line 1439, in GETorHEAD
    req.path_info.rstrip('/'), self.app.account_ring.replica_count)
  File "/usr/lib/python2.6/site-packages/swift-1.4.3-py2.6.egg/swift/proxy/server.py", line 719, in GETorHEAD_base
    source.getheader('x-timestamp')
TypeError: 'NoneType' object does not support item assignment

at the storage node log:

Nov 9 17:02:18 wq045g2fatm account-server ERROR __call__ error with GET /sdb1/194797/AUTH_.auth :
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/swift-1.4.3-py2.6.egg/swift/account/server.py", line 305, in __call__
    res = getattr(self, req.method)(req)
  File "/usr/lib/python2.6/site-packages/swift-1.4.3-py2.6.egg/swift/account/server.py", line 189, in GET
    prefix = get_param(req, 'prefix')
  File "/usr/lib/python2.6/site-packages/swift-1.4.3-py2.6.egg/swift/common/utils.py", line 117, in get_param
    value = req.str_params.get(name, default)
  File "build/bdist.linux-x86_64/egg/webob/descriptors.py", line 86, in fget
    warn()
  File "build/bdist.linux-x86_64/egg/webob/descriptors.py", line 83, in warn
    3
  File "build/bdist.linux-x86_64/egg/webob/util.py", line 51, in warn_deprecation
    raise DeprecationWarning(text)
DeprecationWarning: The attribute None is deprecated: disabled starting WebOb 1.2, use params instead

if i change my webob lib version from 1.2b2 to 1.1 , it's ok and just return:

{"accounts": [{"name": "hahah"}, {"name": "root2"}, {"name": "root3"}, {"name": "root4"}, {"name": "root5"}, {"name": "root6"}, {"name": "root7"}, {"name": "root8"}, {"name": "test"}, {"name": "testa"}, {"name": "testa20"}, {"name": "testa21"}, {"name": "testa22"}, {"name": "testaa"}, {"name": "testaaa"}, {"name": "testaaaa"}, {"name": "testaaaaa"}, {"name": "testaaaaaa"}, {"name": "testaaaaaaa"}, {"name": "testaaaaaaaa"}, {"name": "testaaaaaaaaa"}, {"name": "testaaaaaaaaaa"}, {"name": "testaaaaaaaaaaa"}, {"name": "testaccount"}]}

Changed in swift:
status: New → Confirmed
importance: Undecided → High
Will Stevens (cloudops) wrote :

I also had this same issue (Deprecation Warning) with WebOb 1.2b2. I can confirm that downgrading to WebOb version 1.1.1 solves this problem.

description: updated
Thierry Carrez (ttx) wrote :
Download full text (7.2 KiB)

Adding Nova based on report on the ML:

2011-12-16 10:01:51,998 INFO nova.api.openstack.wsgi [b4427885-3601-47c3-9870-4260a3753f7d 2 1] GET http://10.0.10.1:8774/v1.1/1/servers/detail?fresh=1324047711.96
2011-12-16 10:01:51,998 DEBUG nova.api.openstack.wsgi [b4427885-3601-47c3-9870-4260a3753f7d 2 1] Unrecognized Content-Type provided in request from (pid=11529) deserialize_body /usr/local/nova/nova/api/openstack/wsgi.py:257
2011-12-16 10:01:51,998 ERROR nova.api.openstack.v2 [b4427885-3601-47c3-9870-4260a3753f7d 2 1] Caught error: The attribute None is deprecated: disabled starting WebOb 1.2, use GET instead
(nova.api.openstack.v2): TRACE: Traceback (most recent call last):
(nova.api.openstack.v2): TRACE: File "/usr/local/nova/nova/api/openstack/v2/__init__.py", line 61, in __call__
(nova.api.openstack.v2): TRACE: return req.get_response(self.application)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/request.py", line 1149, in get_response
(nova.api.openstack.v2): TRACE: application, catch_exc_info=False)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/request.py", line 1118, in call_application
(nova.api.openstack.v2): TRACE: app_iter = application(self.environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/keystone/middleware/auth_token.py", line 310, in __call__
(nova.api.openstack.v2): TRACE: return self._forward_request(env, start_response, proxy_headers)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/keystone/middleware/auth_token.py", line 488, in _forward_request
(nova.api.openstack.v2): TRACE: return self.app(env, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/dec.py", line 146, in __call__
(nova.api.openstack.v2): TRACE: return resp(environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/dec.py", line 146, in __call__
(nova.api.openstack.v2): TRACE: return resp(environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/dec.py", line 132, in __call__
(nova.api.openstack.v2): TRACE: resp = self.call_func(req, *args, **self.kwargs)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/dec.py", line 197, in call_func
(nova.api.openstack.v2): TRACE: return self.func(req, *args, **kwargs)
(nova.api.openstack.v2): TRACE: File "/usr/local/nova/nova/api/openstack/wsgi.py", line 499, in __call__
(nova.api.openstack.v2): TRACE: response = req.get_response(self.application)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/request.py", line 1149, in get_response
(nova.api.openstack.v2): TRACE: application, catch_exc_info=False)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/request.py", line 1118, in call_application
(nova.api.openstack.v2): TRACE: app_iter = application(self.environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.6/site-packages/webob/dec.py", line 146, in __call__
(...

Read more...

summary: - swift bug with python webob 1.2b2
+ Compatibility issues with python webob 1.2b2
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Brian Lamar (blamar) on 2012-01-04
Changed in nova:
assignee: nobody → Brian Lamar (blamar)
Changed in nova:
status: Confirmed → In Progress
Brian Waldon (bcwaldon) on 2012-01-13
Changed in nova:
milestone: none → essex-3

Reviewed: https://review.openstack.org/2819
Committed: http://github.com/openstack/nova/commit/ccaf97a5544ca0660cb46d9743ffa06470e5c37a
Submitter: Jenkins
Branch: master

commit ccaf97a5544ca0660cb46d9743ffa06470e5c37a
Author: Brian Lamar <email address hidden>
Date: Wed Jan 4 18:54:45 2012 -0500

    Ensure nova is compatible with WebOb 1.2+

    Fixes bug 888371

    Change-Id: I965c15f9f18b835b666c60b2ab1e6089c0fb4121

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-01-25
Changed in nova:
status: Fix Committed → Fix Released
Severin Gehwolf (jerboaa) wrote :

A proposed fix for swift is available here:
https://github.com/jerboaa/swift/commit/af4d736390cf287f61e9b1c5890c9db4a45dcfc2

Unit tests and functional tests pass as before. Let me know what you think.

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

Changed in swift:
assignee: nobody → Severin Gehwolf (jerboaa)
status: Confirmed → In Progress
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-3 → 2012.1
Pete Zaitcev (zaitcev) wrote :

See also bug 959881.

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

Changed in swift:
assignee: Severin Gehwolf (jerboaa) → iryoung jeong (iryoung)

Reviewed: https://review.openstack.org/8195
Committed: http://github.com/openstack/swift/commit/de4d23c2a517050ab0afd0c8d0dbab817139b055
Submitter: Jenkins
Branch: master

commit de4d23c2a517050ab0afd0c8d0dbab817139b055
Author: Iryoung Jeong <email address hidden>
Date: Wed Jun 6 03:39:53 2012 +0900

    Adapt Swift for WebOb 1.2

    Based on PatchSet 3 of https://review.openstack.org/#/c/7569/ , make them to pass all funcional tests with both webob 1.x and 1.2.

    The additional following compatibility issues were addressed:
     - Until patch for range header issue is merged into official webob release, testRangedGetsWithLWSinHeader() should skip test against webob 1.2
    (https://github.com/Pylons/webob/commit/49c175aec2b5c134511dfea6564bfb1d37ab23a9)

     - common.constraints.check_utf8() can accept both utf8 str and unicode.

     - To convert unicode to utf-8 str if necessary.

     - Making proxy_logging can handle invalid utf-8 str

    bug 888371
    bug 959881

    blueprint webob-support

    Change-Id: I00e5fd04cd1653259606a4ffdd4926db3c84c496

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-07-26
Changed in swift:
milestone: none → 1.6.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints