0

我正在尝试通过 openstack undercloud 在裸机节点上执行干净、自省的操作,但它失败了,在研究并取出日志之后,看起来 Ironic-inspector 正在抛出错误,完整日志如下所示。

2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines [-] Database connection was found disconnected; reconnecting: DBConnectionError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: u'SELECT 1'] (Background on this error at: http://sqlalche.me/e/e3q8)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines Traceback (most recent call last):
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 73, in _connect_ping_listener
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     connection.scalar(select([1]))
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 912, in scalar
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     return self.execute(object_, *multiparams, **params).scalar()
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 980, in execute
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     return meth(self, multiparams, params)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 273, in _execute_on_connection
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     return connection._execute_clauseelement(self, multiparams, params)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1099, in _execute_clauseelement
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     distilled_params,
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1240, in _execute_context
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     e, statement, parameters, cursor, context
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1456, in _handle_dbapi_exception
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     util.raise_from_cause(newraise, exc_info)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 296, in raise_from_cause
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     reraise(type(exception), exception, tb=exc_tb, cause=cause)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1236, in _execute_context
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     cursor, statement, parameters, context
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 536, in do_execute
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     cursor.execute(statement, parameters)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     result = self._query(query)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     conn.query(q)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 516, in query
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 727, in _read_query_result
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     result.read()
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1066, in read
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     first_packet = self.connection._read_packet()
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 656, in _read_packet
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     packet_header = self._read_bytes(4)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 702, in _read_bytes
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines     CR.CR_SERVER_LOST, "Lost connection to MySQL server during query")
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines DBConnectionError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: u'SELECT 1'] (Background on this error at: http://sqlalche.me/e/e3q8)
2021-07-14 09:36:13.750 7 ERROR oslo_db.sqlalchemy.engines 
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines [-] Database connection was found disconnected; reconnecting: DBConnectionError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: u'SELECT 1'] (Background on this error at: http://sqlalche.me/e/e3q8)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines Traceback (most recent call last):
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 73, in _connect_ping_listener
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     connection.scalar(select([1]))
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 912, in scalar
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     return self.execute(object_, *multiparams, **params).scalar()
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 980, in execute
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     return meth(self, multiparams, params)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 273, in _execute_on_connection
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     return connection._execute_clauseelement(self, multiparams, params)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1099, in _execute_clauseelement
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     distilled_params,
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1240, in _execute_context
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     e, statement, parameters, cursor, context
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1456, in _handle_dbapi_exception
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     util.raise_from_cause(newraise, exc_info)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 296, in raise_from_cause
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     reraise(type(exception), exception, tb=exc_tb, cause=cause)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1236, in _execute_context
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     cursor, statement, parameters, context
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 536, in do_execute
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     cursor.execute(statement, parameters)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     result = self._query(query)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     conn.query(q)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 516, in query
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 727, in _read_query_result
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     result.read()
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1066, in read
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     first_packet = self.connection._read_packet()
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 667, in _read_packet
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines     "Lost connection to MySQL server during query")
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines DBConnectionError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: u'SELECT 1'] (Background on this error at: http://sqlalche.me/e/e3q8)
2021-07-14 09:43:58.979 7 ERROR oslo_db.sqlalchemy.engines 
2021-07-14 10:06:05.165 8 DEBUG ironic_inspector.common.service_utils [-] logging_exception_prefix       = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2571
2021-07-14 10:06:05.310 8 DEBUG oslo_service.service [-] logging_exception_prefix       = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2571
2021-07-14 10:06:05.526 8 DEBUG oslo_db.sqlalchemy.engines [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION _check_effective_sql_mode /usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py:307

为什么我在这里发布这个,因为在开源社区没有得到任何回应,我被卡住了,这也不是纯粹与 MySQL 相关;因为Mysql也是Undercloud安装过程的一部分。也许我在这里遗漏了一些东西。

附加信息:我的 Undercloud 部署是kolla Containerized

4

0 回答 0