在安装块存储服务时,
[code class=""] systemctl start openstack-cinder-volume.service target.service[/code]出现如下错误:
[root@cinder cinder]# systemctl status openstack-cinder-volume.service target.service
● openstack-cinder-volume.service - OpenStack Cinder Volume Server
Loaded: loaded (/usr/lib/systemd/system/openstack-cinder-volume.service; enabled; vendor preset: disabled)
Active: active (running) since 一 2017-04-10 12:49:34 CST; 16min ago
Main PID: 105759 (cinder-volume)
CGroup: /system.slice/openstack-cinder-volume.service
├─105759 /usr/bin/python2 /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log
├─124842 /usr/bin/python2 /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log
├─124867 sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings --unit=g -o name,size,free,lv_count,uuid --separator : --nosuffix cinder-volumes
└─124868 /usr/bin/python2 /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings --unit=g -o name,size,free,lv_count,uuid --separator : --nosuffix cin...
4月 10 13:05:55 cinder sudo[124830]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C lvs --noheadings --unit...inder-volumes
4月 10 13:05:56 cinder sudo[124834]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings --unit...inder-volumes
4月 10 13:05:56 cinder sudo[124838]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C lvs --noheadings --unit...inder-volumes
4月 10 13:05:56 cinder sudo[124843]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings -o name cinder-volumes
4月 10 13:05:56 cinder sudo[124847]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --version
4月 10 13:05:57 cinder sudo[124851]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C pvs --noheadings --unit...kippedcluster
4月 10 13:05:57 cinder sudo[124855]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings --unit...inder-volumes
4月 10 13:05:57 cinder sudo[124859]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings --unit...inder-volumes
4月 10 13:05:57 cinder sudo[124863]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C lvs --noheadings --unit...inder-volumes
4月 10 13:05:58 cinder sudo[124867]: cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings --unit...inder-volumes
● target.service - Restore LIO kernel target configuration
Loaded: loaded (/usr/lib/systemd/system/target.service; enabled; vendor preset: disabled)
Active: active (exited) since 一 2017-04-10 12:49:34 CST; 16min ago
Process: 105748 ExecStop=/usr/bin/targetctl clear (code=exited, status=0/SUCCESS)
Process: 105757 ExecStart=/usr/bin/targetctl restore (code=exited, status=0/SUCCESS)
Main PID: 105757 (code=exited, status=0/SUCCESS)
4月 10 12:49:34 cinder systemd[1]: Starting Restore LIO kernel target configuration...
4月 10 12:49:34 cinder target[105757]: No saved config file at /etc/target/saveconfig.json, ok, exiting
4月 10 12:49:34 cinder systemd[1]: Started Restore LIO kernel target configuration.
Hint: Some lines were ellipsized, use -l to show in full.
target.service 服务没有启动成功。
volume.log如下:
2017-04-10 13:10:33.200 130217 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error
2017-04-10 13:10:33.200 130217 ERROR oslo_service.service err.raise_mysql_exception(self._data)
2017-04-10 13:10:33.200 130217 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
2017-04-10 13:10:33.200 130217 ERROR oslo_service.service raise errorclass(errno, errval)
2017-04-10 13:10:33.200 130217 ERROR oslo_service.service DBError: (pymysql.err.InternalError) (1054, u"Unknown column 'workers.race_preventer' in 'field list'") [SQL: u'SELECT workers.created_at AS workers_created_at, workers.deleted_at AS workers_deleted_at, workers.deleted AS workers_deleted, workers.updated_at AS workers_updated_at, workers.id AS workers_id, workers.resource_type AS workers_resource_type, workers.resource_id AS workers_resource_id, workers.status AS workers_status, workers.service_id AS workers_service_id, workers.race_preventer AS workers_race_preventer \nFROM workers \nWHERE workers.resource_type = %(resource_type_1)s \n LIMIT %(param_1)s'] [parameters: {u'resource_type_1': 'SENTINEL', u'param_1': 1}]
2017-04-10 13:10:33.200 130217 ERROR oslo_service.service
2017-04-10 13:10:33.225 105759 INFO oslo_service.service [req-3e054932-14a4-4255-b410-aa32a69b54f6 - - - - -] Child 130217 exited with status 1
2017-04-10 13:10:33.234 130251 INFO cinder.service [-] Starting cinder-volume node (version 10.0.0)
2017-04-10 13:10:33.250 130251 INFO cinder.coordination [-] Coordination backend started successfully.
2017-04-10 13:10:33.251 130251 INFO cinder.volume.manager [req-41a633c3-9f99-4f36-b472-08343733d816 - - - - -] Starting volume driver LVMVolumeDriver (3.0.0)
2017-04-10 13:10:35.015 130251 WARNING cinder.manager [req-41a633c3-9f99-4f36-b472-08343733d816 - - - - -] Failed to notify about cinder-volume service capabilities for host cinder@lvm. This is normal during a live upgrade. Error: One of cinder-scheduler services is too old to accept notify_service_capabilities request. Required RPC API version is 3.1. Are you running mixed versions of cinder-schedulers?
2017-04-10 13:10:35.017 130251 INFO cinder.volume.manager [req-41a633c3-9f99-4f36-b472-08343733d816 - - - - -] Driver initialization completed successfully.
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters [req-41a633c3-9f99-4f36-b472-08343733d816 - - - - -] DBAPIError exception wrapped from (pymysql.err.InternalError) (1054,u"Unknown column 'workers.race_preventer' in 'field list'") [SQL: u'SELECT workers.created_at AS workers_created_at, workers.deleted_at AS workers_deleted_at, workers.deleted AS workers_deleted, workers.updated_at AS workers_updated_at, workers.id AS workers_id, workers.resource_type AS workers_resource_type, workers.resource_id AS workers_resource_id, workers.status AS workers_status, workers.service_id AS workers_service_id, workers.race_preventer AS workers_race_preventer \nFROM workers \nWHERE workers.resource_type = %(resource_type_1)s \n LIMIT %(param_1)s'][parameters: {u'param_1': 1, u'resource_type_1': 'SENTINEL'}]
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters context)
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 166, in execute
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters result = self._query(query)
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 322, in _query
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters conn.query(q)
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 841, in query
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1029, in _read_query_result
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters result.read()
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1312, in read
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters first_packet = self.connection._read_packet()
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 991, in _read_packet
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters packet.check_error()
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters err.raise_mysql_exception(self._data)
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters raise errorclass(errno, errval)
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters InternalError: (1054, u"Unknown column 'workers.race_preventer' in 'field list'")
2017-04-10 13:10:35.024 130251 ERROR oslo_db.sqlalchemy.exc_filters
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service [req-41a633c3-9f99-4f36-b472-08343733d816 - - - - -] Error starting thread.
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service Traceback (most recent call last):
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 722, in run_service
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service service.start()
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/cinder/service.py", line 241, in start
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service service_id=Service.service_id)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 494, in init_host
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service **kwargs)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/cinder/manager.py", line 303, in init_host
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service db.workers_init()
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/cinder/db/api.py", line 1676, in workers_init
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service return IMPL.workers_init()
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 6637, in workers_init
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service worker = query.first()
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2634, in first
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service ret = list(self[0:1])
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service return list(res)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service return self._execute_and_instances(context)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service result = conn.execute(querycontext.statement, self._params)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service return meth(self, multiparams, params)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service return connection._execute_clauseelement(self, multiparams, params)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service compiled_sql, distilled_params
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service context)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service util.raise_from_cause(newraise, exc_info)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service reraise(type(exception), exception, tb=exc_tb)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service context)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service cursor.execute(statement, parameters)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 166, in execute
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service result = self._query(query)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 322, in _query
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service conn.query(q)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 841, in query
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1029, in _read_query_result
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service result.read()
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1312, in read
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service first_packet = self.connection._read_packet()
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 991, in _read_packet
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service packet.check_error()
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service err.raise_mysql_exception(self._data)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service raise errorclass(errno, errval)
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service DBError: (pymysql.err.InternalError) (1054, u"Unknown column 'workers.race_preventer' in 'field list'") [SQL: u'SELECT workers.created_at AS workers_created_at, workers.deleted_at AS workers_deleted_at, workers.deleted AS workers_deleted, workers.updated_at AS workers_updated_at, workers.id AS workers_id, workers.resource_type AS workers_resource_type, workers.resource_id AS workers_resource_id, workers.status AS workers_status, workers.service_id AS workers_service_id, workers.race_preventer AS workers_race_preventer \nFROM workers \nWHERE workers.resource_type = %(resource_type_1)s \n LIMIT %(param_1)s'] [parameters: {u'resource_type_1': 'SENTINEL', u'param_1': 1}]
2017-04-10 13:10:35.029 130251 ERROR oslo_service.service
2017-04-10 13:10:35.055 105759 INFO oslo_service.service [req-3e054932-14a4-4255-b410-aa32a69b54f6 - - - - -] Child 130251 exited with status 1
2017-04-10 13:10:35.065 130285 INFO cinder.service [-] Starting cinder-volume node (version 10.0.0)
2017-04-10 13:10:35.081 130285 INFO cinder.coordination [-] Coordination backend started successfully.
2017-04-10 13:10:35.082 130285 INFO cinder.volume.manager [req-ec4511a6-c66b-4918-96b5-7f2b0c759ccc - - - - -] Starting volume driver LVMVolumeDriver (3.0.0)
重启两个服务时,在控制节点可以看到
Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | controller | nova | enabled | up | 2017-04-10T04:47:43.000000 | - |
| cinder-volume | cinder@lvm | nova | enabled | up | 2017-04-10T04:47:19.000000 | -
但是很快不足一分钟 cinder-volume就变为down的状态
希望哪位大神可以给点帮助,谢谢!
收起