thank you, it helped, I managed to remove it, as you wrote.
Regards

wt., 14 lis 2023 o 14:39 Alan Bishop <abishop@redhat.com> napisał(a):


On Tue, Nov 14, 2023 at 5:10 AM - <kjme001@gmail.com> wrote:
Thank you for your answer, should I run these commands on the controller machine or on the node from which I want to delete the volume?

The important thing is the command must be executed in an environment where it has access to the settings in /etc/cinder, and that's usually on the controller.
 
Regards

pon., 13 lis 2023 o 22:53 Alan Bishop <abishop@redhat.com> napisał(a):


On Sat, Nov 11, 2023 at 6:02 AM <kjme001@gmail.com> wrote:
cinder-manage service remove cinder-volume xxxx@lvm-ssd

Be aware that you need to run the command in the same environment where the cinder services run. The cinder-manage command needs access to the configuration settings, typically in /etc/cinder. Or you can override the --config-file or --config-dir  options (see "cinder-manage -h")

Alan

/usr/lib/python3/dist-packages/cinder/db/sqlalchemy/models.py:152: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
  last_heartbeat = column_property(
/usr/lib/python3/dist-packages/cinder/db/sqlalchemy/models.py:160: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
  num_hosts = column_property(
/usr/lib/python3/dist-packages/cinder/db/sqlalchemy/models.py:169: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
  num_down_hosts = column_property(
2023-11-11 14:34:00.928 898920 CRITICAL cinder [req-525973bb-e026-4999-95af-d852aa137066 - - - - -] Unhandled error: oslo_db.exception.DBNonExistentDatabase: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/14/e3q8)
2023-11-11 14:34:00.928 898920 ERROR cinder Traceback (most recent call last):
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 3250, in _wrap_pool_connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return fn()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 310, in connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return _ConnectionFairy._checkout(self)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 868, in _checkout
2023-11-11 14:34:00.928 898920 ERROR cinder     fairy = _ConnectionRecord.checkout(pool)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 476, in checkout
2023-11-11 14:34:00.928 898920 ERROR cinder     rec = pool._do_get()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
2023-11-11 14:34:00.928 898920 ERROR cinder     return self._create_connection()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 256, in _create_connection
2023-11-11 14:34:00.928 898920 ERROR cinder     return _ConnectionRecord(self)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 371, in __init__
2023-11-11 14:34:00.928 898920 ERROR cinder     self.__connect()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 665, in __connect
2023-11-11 14:34:00.928 898920 ERROR cinder     with util.safe_reraise():
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
2023-11-11 14:34:00.928 898920 ERROR cinder     compat.raise_(
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_
2023-11-11 14:34:00.928 898920 ERROR cinder     raise exception
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 661, in __connect
2023-11-11 14:34:00.928 898920 ERROR cinder     self.dbapi_connection = connection = pool._invoke_creator(self)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/create.py", line 590, in connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return dialect.connect(*cargs, **cparams)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 597, in connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return self.dbapi.connect(*cargs, **cparams)
2023-11-11 14:34:00.928 898920 ERROR cinder sqlite3.OperationalError: unable to open database file
2023-11-11 14:34:00.928 898920 ERROR cinder
2023-11-11 14:34:00.928 898920 ERROR cinder The above exception was the direct cause of the following exception:
2023-11-11 14:34:00.928 898920 ERROR cinder
2023-11-11 14:34:00.928 898920 ERROR cinder Traceback (most recent call last):
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/bin/cinder-manage", line 10, in <module>
2023-11-11 14:34:00.928 898920 ERROR cinder     sys.exit(main())
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/cmd/manage.py", line 1069, in main
2023-11-11 14:34:00.928 898920 ERROR cinder     fn(**fn_kwargs)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/cmd/manage.py", line 711, in remove
2023-11-11 14:34:00.928 898920 ERROR cinder     svc = objects.Service.get_by_args(ctxt, host_name, binary)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/objects/service.py", line 133, in get_by_args
2023-11-11 14:34:00.928 898920 ERROR cinder     db_service = db.service_get(context, host=host, binary=binary_key)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/db/api.py", line 270, in service_get
2023-11-11 14:34:00.928 898920 ERROR cinder     return IMPL.service_get(context, service_id, backend_match_level,
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/db/sqlalchemy/api.py", line 168, in wrapper
2023-11-11 14:34:00.928 898920 ERROR cinder     return f(*args, **kwargs)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/db/sqlalchemy/api.py", line 745, in service_get
2023-11-11 14:34:00.928 898920 ERROR cinder     query = _service_query(context, backend_match_level=backend_match_level,
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/db/sqlalchemy/api.py", line 686, in _service_query
2023-11-11 14:34:00.928 898920 ERROR cinder     query = model_query(context, models.Service, session=session,
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/db/sqlalchemy/api.py", line 259, in model_query
2023-11-11 14:34:00.928 898920 ERROR cinder     session = kwargs.get('session') or get_session()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/cinder/db/sqlalchemy/api.py", line 95, in get_session
2023-11-11 14:34:00.928 898920 ERROR cinder     return main_context_manager._factory.get_legacy_facade().get_session(
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 357, in get_legacy_facade
2023-11-11 14:34:00.928 898920 ERROR cinder     self._start()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 504, in _start
2023-11-11 14:34:00.928 898920 ERROR cinder     self._setup_for_connection(
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 529, in _setup_for_connection
2023-11-11 14:34:00.928 898920 ERROR cinder     engine = engines.create_engine(
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/debtcollector/renames.py", line 43, in decorator
2023-11-11 14:34:00.928 898920 ERROR cinder     return wrapped(*args, **kwargs)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/oslo_db/sqlalchemy/engines.py", line 211, in create_engine
2023-11-11 14:34:00.928 898920 ERROR cinder     test_conn = _test_connection(engine, max_retries, retry_interval)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/oslo_db/sqlalchemy/engines.py", line 386, in _test_connection
2023-11-11 14:34:00.928 898920 ERROR cinder     return engine.connect()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 3204, in connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return self._connection_cls(self, close_with_result=close_with_result)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 96, in __init__
2023-11-11 14:34:00.928 898920 ERROR cinder     else engine.raw_connection()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 3283, in raw_connection
2023-11-11 14:34:00.928 898920 ERROR cinder     return self._wrap_pool_connect(self.pool.connect, _connection)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 3253, in _wrap_pool_connect
2023-11-11 14:34:00.928 898920 ERROR cinder     Connection._handle_dbapi_exception_noconnection(
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 2098, in _handle_dbapi_exception_noconnection
2023-11-11 14:34:00.928 898920 ERROR cinder     util.raise_(newraise, with_traceback=exc_info[2], from_=e)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_
2023-11-11 14:34:00.928 898920 ERROR cinder     raise exception
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 3250, in _wrap_pool_connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return fn()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 310, in connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return _ConnectionFairy._checkout(self)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 868, in _checkout
2023-11-11 14:34:00.928 898920 ERROR cinder     fairy = _ConnectionRecord.checkout(pool)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 476, in checkout
2023-11-11 14:34:00.928 898920 ERROR cinder     rec = pool._do_get()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
2023-11-11 14:34:00.928 898920 ERROR cinder     return self._create_connection()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 256, in _create_connection
2023-11-11 14:34:00.928 898920 ERROR cinder     return _ConnectionRecord(self)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 371, in __init__
2023-11-11 14:34:00.928 898920 ERROR cinder     self.__connect()
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 665, in __connect
2023-11-11 14:34:00.928 898920 ERROR cinder     with util.safe_reraise():
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
2023-11-11 14:34:00.928 898920 ERROR cinder     compat.raise_(
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_
2023-11-11 14:34:00.928 898920 ERROR cinder     raise exception
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 661, in __connect
2023-11-11 14:34:00.928 898920 ERROR cinder     self.dbapi_connection = connection = pool._invoke_creator(self)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/create.py", line 590, in connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return dialect.connect(*cargs, **cparams)
2023-11-11 14:34:00.928 898920 ERROR cinder   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 597, in connect
2023-11-11 14:34:00.928 898920 ERROR cinder     return self.dbapi.connect(*cargs, **cparams)
2023-11-11 14:34:00.928 898920 ERROR cinder oslo_db.exception.DBNonExistentDatabase: (sqlite3.OperationalError) unable to open database file
2023-11-11 14:34:00.928 898920 ERROR cinder (Background on this error at: https://sqlalche.me/e/14/e3q8)
2023-11-11 14:34:00.928 898920 ERROR cinder