This is the result of a fairly recent change in requests [1], released 8 Aug. While the enforcement of header-value types is fairly recent, they've documented since 2.0.1 that headers must be byte- or unicode-strings [2], and more recently clarified it in their quick start guide [3]. It looks like this has been addressed in smaug already [4], but I'd expect that you could downgrade requests to 2.10.0 while waiting for a new release of smaug.
[1] https://github.com/kennethreitz/requests/pull/3366 [2] https://github.com/kennethreitz/requests/blob/v2.0.1/docs/api.rst#behavioral-changes [3] http://docs.python-requests.org/en/latest/user/quickstart/#custom-headers [4] https://review.openstack.org/#/c/355427/ Tim > On Aug 11, 2016, at 1:17 AM, zhangshuai <[email protected]> wrote: > > > 2016-08-11 08:01:25.371 > [00;32mDEBUG keystoneclient.auth.identity.v2 [[00;36m-[00;32m] > [01;35m[00;32mMaking authentication request to > http://127.0.0.1:5000/v2.0/tokens[00m [00;33mfrom (pid=30110) get_auth_ref > /usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/v2.py:87[00m > > 2016-08-11 08:01:28.786 > [00;32mDEBUG swiftclient [[00;36m-[00;32m] [01;35m[00;32mREQ: curl -i > http://127.0.0.1:8080/v1/AUTH_819fc87a6b1648f1b8dff8a0d09a9c62/smaug -X PUT > -H "Content-Length: 0" -H "X-Auth-Token: c11af1086dd14279..."[00m > [00;33mfrom (pid=30110) http_log > /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:164[00m > > 2016-08-11 08:01:28.786 > [00;32mDEBUG swiftclient [[00;36m-[00;32m] [01;35m[00;32mRESP STATUS: > 201 Created[00m [00;33mfrom (pid=30110) http_log > /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:165[00m > > 2016-08-11 08:01:28.787 > [00;32mDEBUG swiftclient [[00;36m-[00;32m] [01;35m[00;32mRESP HEADERS: > {u'Date': u'Thu, 11 Aug 2016 08:01:28 GMT', u'Content-Length': u'0', > u'Content-Type': u'text/html; charset=UTF-8', u'X-Trans-Id': > u'tx931f23ce6e584cbe9894e-0057ac30d8'}[00m [00;33mfrom (pid=30110) http_log > /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:166[00m > > 2016-08-11 08:01:28.803 > [00;32mDEBUG swiftclient [[00;36m-[00;32m] [01;35m[00;32mREQ: curl -i > http://127.0.0.1:8080/v1/AUTH_819fc87a6b1648f1b8dff8a0d09a9c62/leases -X PUT > -H "Content-Length: 0" -H "X-Auth-Token: c11af1086dd14279..."[00m > [00;33mfrom (pid=30110) http_log > /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:164[00m > > 2016-08-11 08:01:28.803 > [00;32mDEBUG swiftclient [[00;36m-[00;32m] [01;35m[00;32mRESP STATUS: > 201 Created[00m [00;33mfrom (pid=30110) http_log > /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:165[00m > > 2016-08-11 08:01:28.804 > [00;32mDEBUG swiftclient [[00;36m-[00;32m] [01;35m[00;32mRESP HEADERS: > {u'Date': u'Thu, 11 Aug 2016 08:01:28 GMT', u'Content-Length': u'0', > u'Content-Type': u'text/html; charset=UTF-8', u'X-Trans-Id': > u'tx8069168a9d5641728cab8-0057ac30d8'}[00m [00;33mfrom (pid=30110) http_log > /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:166[00m > > 2016-08-11 08:01:42.819 > [01;31mERROR swiftclient [[00;36m-[01;31m] [01;35m[01;31mHeader value > 120 must be of type str or bytes, not <type 'int'>[00m > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00mTraceback > (most recent call last): > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1565, in > _retry > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m > service_token=self.service_token, **kwargs) > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1268, in > put_object > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m > conn.request('PUT', path, contents, headers) > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 401, in > request > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m > files=files, **self.requests_args) > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 384, in > _request > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m return > self.request_session.request(*arg, **kwarg) > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 457, in > request > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m prep = > self.prepare_request(req) > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 390, in > prepare_request > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m > hooks=merge_hooks(request.hooks, self.hooks), > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 295, in > prepare > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m > self.prepare_headers(headers) > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 409, in > prepare_headers > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m > check_header_validity(header) > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m File > "/usr/local/lib/python2.7/dist-packages/requests/utils.py", line 756, in > check_header_validity > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m "not %s" % > (value, type(value))) > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00mInvalidHeader: > Header value 120 must be of type str or bytes, not <type 'int'> > > [01;31m2016-08-11 08:01:42.819 TRACE swiftclient [01;35m[00m > > 2016-08-11 08:01:42.821 [01;31mERROR smaug.services.protection.provider > [[00;36m-[01;31m] [01;35m[01;31mLoad bank plugin: > 'smaug-swift-bank-plugin' failed.[00m > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: [email protected]?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
