diff --git a/ironic/db/sqlalchemy/api.py b/ironic/db/sqlalchemy/api.py index 34896be037..6375790f7d 100644 --- a/ironic/db/sqlalchemy/api.py +++ b/ironic/db/sqlalchemy/api.py @@ -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) diff --git a/releasenotes/notes/fix-sqlite-lock-61232cfe81adbde4.yaml b/releasenotes/notes/fix-sqlite-lock-61232cfe81adbde4.yaml new file mode 100644 index 0000000000..080804b761 --- /dev/null +++ b/releasenotes/notes/fix-sqlite-lock-61232cfe81adbde4.yaml @@ -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 `_.