Public bug reported:

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: swift 1.6.1+git201208301600~precise-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
Architecture: amd64

root@hoge1:~# swift-bench /etc/swift/swift-bench.conf
swift-bench 2012-08-31 13:40:09,106 INFO Auth version: 2.0
Traceback (most recent call last):
  File "/usr/bin/swift-bench", line 149, in <module>
    controller.run()
  File "/usr/lib/python2.7/dist-packages/swift/common/bench.py", line 159, in 
run
    puts = BenchPUT(self.logger, self.conf, self.names)
  File "/usr/lib/python2.7/dist-packages/swift/common/bench.py", line 241, in 
__init__
    Bench.__init__(self, logger, conf, names)
  File "/usr/lib/python2.7/dist-packages/swift/common/bench.py", line 55, in 
__init__
    auth_version=self.auth_version)
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 273, in 
get_auth
    if (kwargs['os_options'].get('object_storage_url') and
KeyError: 'os_options'

this is work around patch.


diff --git a/bin/swift-bench b/bin/swift-bench
index b69671a..b66798e 100755
--- a/bin/swift-bench
+++ b/bin/swift-bench
@@ -30,6 +30,7 @@ CONF_DEFAULTS = {
     'user': os.environ.get('ST_USER', ''),
     'key': os.environ.get('ST_KEY', ''),
     'auth_version': '1.0',
+    'os_options' : {} ,
     'use_proxy': 'yes',
     'put_concurrency': '10',
     'get_concurrency': '10',
diff --git a/swift/common/bench.py b/swift/common/bench.py
index 3edfaec..2f6e52c 100644
--- a/swift/common/bench.py
+++ b/swift/common/bench.py
@@ -49,10 +49,12 @@ class Bench(object):
         self.auth_url = conf.auth
         self.use_proxy = conf.use_proxy.lower() in TRUE_VALUES
         self.auth_version = conf.auth_version
+        self.os_options = conf.os_options
         self.logger.info("Auth version: %s" % self.auth_version)
         if self.use_proxy:
             url, token = client.get_auth(self.auth_url, self.user, self.key,
-                                         auth_version=self.auth_version)
+                                         auth_version=self.auth_version,
+                                         os_options = self.os_options)
             self.token = token
             self.account = url.split('/')[-1]
             if conf.url == '':

** Affects: swift (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1044204

Title:
  swift-bench has bug at auth version 2.0.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/swift/+bug/1044204/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to