Instance provisioning fails on SQLite

The following error occurs when using SQLite:
oslo_config.cfg.NoSuchOptError: no such option hostname in group [DEFAULT]

`hostname` is not defined in [DEFAULT] group, use `host` instead.

Closes-Bug: #2086682
Change-Id: Ic93b5d7c6ea27a3c47daa6b2c6671aaa401b5427
This commit is contained in:
LALLAU Bertrand 2024-11-05 15:38:42 +01:00 committed by Julia Kreger
parent 1f740c8a90
commit 6af6d10ab3
2 changed files with 8 additions and 1 deletions

View File

@ -742,7 +742,7 @@ class Connection(api.Connection):
# Nothing updated and node exists. Must already be
# locked. Identify who holds it and log.
if utils.is_ironic_using_sqlite():
lock_holder = CONF.hostname
lock_holder = CONF.host
else:
lock_holder = self._get_node_reservation(node.id).reservation
raise exception.NodeLocked(node=node.uuid, host=lock_holder)

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fix issue on SQLite database usage. Previously ironic node provisioning may
fail with error related accessing the hostname.
For more details please see
`bug 2086682 <https://bugs.launchpad.net/ironic/+bug/2086682>`_.