事象内容
openstack-swift-service を起動しようとすると、起動が失敗する。
[root@controller ~]# systemctl status openstack-swift-proxy.service ● openstack-swift-proxy.service - OpenStack Object Storage (swift) - Proxy Server Loaded: loaded (/usr/lib/systemd/system/openstack-swift-proxy.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since 水 2018-10-31 21:48:19 JST; 7s ago Process: 7955 ExecStart=/usr/bin/swift-proxy-server /etc/swift/proxy-server.conf (code=exited, status=1/FAILURE) Main PID: 7955 (code=exited, status=1/FAILURE) 10月 31 21:48:19 controller swift-proxy-server[7955]: File "/usr/lib/python2.7/site-p...t 10月 31 21:48:19 controller swift-proxy-server[7955]: object_type, name=name, global_...) 10月 31 21:48:19 controller swift-proxy-server[7955]: File "/usr/lib/python2.7/site-p...t 10月 31 21:48:19 controller swift-proxy-server[7955]: object_type, name=name) 10月 31 21:48:19 controller swift-proxy-server[7955]: File "/usr/lib/python2.7/site-p...n 10月 31 21:48:19 controller swift-proxy-server[7955]: self.filename)) 10月 31 21:48:19 controller swift-proxy-server[7955]: LookupError: No section 'authto...f 10月 31 21:48:19 controller systemd[1]: openstack-swift-proxy.service: main process ...RE 10月 31 21:48:19 controller systemd[1]: Unit openstack-swift-proxy.service entered f...e. 10月 31 21:48:19 controller systemd[1]: openstack-swift-proxy.service failed. [root@controller ~]#
コントローラーノードの message ログでは、proxy-server.conf で authtoken セクションが無いといったエラーメッセージが出力されている。
[root@controller ~]# tail -F /var/log/messages Oct 31 22:00:32 controller systemd: Started OpenStack Object Storage (swift) - Proxy Server. Oct 31 22:00:32 controller systemd: Starting OpenStack Object Storage (swift) - Proxy Server... Oct 31 22:00:32 controller swift-proxy-server: Traceback (most recent call last): Oct 31 22:00:32 controller swift-proxy-server: File "/usr/bin/swift-proxy-server", line 23, in <module> Oct 31 22:00:32 controller swift-proxy-server: sys.exit(run_wsgi(conf_file, 'proxy-server', **options)) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 1029, in run_wsgi Oct 31 22:00:32 controller swift-proxy-server: loadapp(conf_path, global_conf=global_conf) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 394, in loadapp Oct 31 22:00:32 controller swift-proxy-server: ctx = loadcontext(loadwsgi.APP, conf_file, global_conf=global_conf) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 378, in loadcontext Oct 31 22:00:32 controller swift-proxy-server: global_conf=global_conf) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext Oct 31 22:00:32 controller swift-proxy-server: global_conf=global_conf) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig Oct 31 22:00:32 controller swift-proxy-server: return loader.get_context(object_type, name, global_conf) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 68, in get_context Oct 31 22:00:32 controller swift-proxy-server: object_type, name=name, global_conf=global_conf) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 450, in get_context Oct 31 22:00:32 controller swift-proxy-server: global_additions=global_additions) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context Oct 31 22:00:32 controller swift-proxy-server: for name in pipeline[:-1]] Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 68, in get_context Oct 31 22:00:32 controller swift-proxy-server: object_type, name=name, global_conf=global_conf) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 408, in get_context Oct 31 22:00:32 controller swift-proxy-server: object_type, name=name) Oct 31 22:00:32 controller swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 587, in find_config_section Oct 31 22:00:32 controller swift-proxy-server: self.filename)) Oct 31 22:00:32 controller swift-proxy-server: LookupError: No section 'authtoken' (prefixed by 'filter') found in config /etc/swift/proxy-server.conf Oct 31 22:00:32 controller systemd: openstack-swift-proxy.service: main process exited, code=exited, status=1/FAILURE Oct 31 22:00:32 controller systemd: Unit openstack-swift-proxy.service entered failed state. Oct 31 22:00:32 controller systemd: openstack-swift-proxy.service failed. Oct 31 22:01:01 controller systemd: Started Session 61 of user root. Oct 31 22:01:01 controller systemd: Starting Session 61 of user root.
解決方法
Swift のプロキシーサービスの設定ファル( /etc/swift/proxy-server.conf )で、[filter:keystoneauth] や [filter:authtoken] セクションが認識されていないことが原因であるため、設定ファイルでセクションがコメントアウトされていないか確認し、コメントアウトを解除する。
[root@controller tmp]# vi /etc/swift/swift.conf ※ コメントアウトされている # [filter:keystoneauth] # [filter:authtoken] ↓ コメントアウトを解除する [filter:keystoneauth] [filter:authtoken]