Swift - 使用 juju 部署时不会创建任何环

Swift - 使用 juju 部署时不会创建任何环

swift-init start main以下是swift-proxy 节点的输出

ubuntu@fxhhr:~$ sudo swift-init -n start main
Starting proxy-server...(/etc/swift/proxy-server.conf)
Unable to locate config for container-server
Unable to locate config for account-server
Unable to locate config for object-server
Traceback (most recent call last):
  File "/usr/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 122, in run_wsgi
    loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 203, in invoke
    app = context.app_context.create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/swift/proxy/server.py", line 1949, in app_factory
    return Application(conf)
  File "/usr/lib/python2.7/dist-packages/swift/proxy/server.py", line 1749, in __init__
    Ring(os.path.join(swift_dir, 'object.ring.gz'))
  File "/usr/lib/python2.7/dist-packages/swift/common/ring/ring.py", line 51, in __init__
    self._reload(force=True)
  File "/usr/lib/python2.7/dist-packages/swift/common/ring/ring.py", line 56, in _reload
    ring_data = pickle.load(GzipFile(self.pickle_gz_path, 'rb'))
  File "/usr/lib/python2.7/gzip.py", line 89, in __init__
    fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/etc/swift/object.ring.gz'

答案1

直到后端 swift-storage 服务能够满足对象副本计数时,才会创建 swift 环并将其分发到 swift-storage 单元。

我建议你阅读自述从 swift-proxy charm - 特别是区域分配部分 - 了解 swift-proxy 和 swift-storage charm 如何相互作用。

相关内容