yura@test-0:~$ ironic node-update ba28de78-f300-4adb-b3e9-eb2ff137f8d7 replace reservation=fake
Remote error: NodeLocked Node ba28de78-f300-4adb-b3e9-eb2ff137f8d7 is locked by another process.
[u'Traceback (most recent call last):\n', u' File "/opt/stack/ironic/ironic/openstack/common/rpc/amqp.py", line 434, in _process_data\n **args)\n', u' File "/opt/stack/ironic/ironic/openstack/common/rpc/dispatcher.py", line 172, in dispatch\n result = getattr(proxyobj, method)(ctxt, **kwargs)\n', u' File "/opt/stack/ironic/ironic/conductor/manager.py", line 144, in update_node\n return node_obj\n', u' File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__\n self.gen.next()\n', u' File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 132, in acquire\n t.dbapi.release_nodes(CONF.host, node_ids)\n', u' File "/opt/stack/ironic/ironic/db/sqlalchemy/api.py", line 254, in release_nodes\n _check_node_already_locked(query, query_by)\n', u' File "/opt/stack/ironic/ironic/db/sqlalchemy/api.py", line 166, in _check_node_already_locked\n raise exception.NodeLocked(node=locked_ref[query_by])\n', u'NodeLocked: Node ba28de78-f300-4adb-b3e9-eb2ff137f8d7 is locked by another process.\n'].
yura@test-0:~$ ironic node-delete ba28de78-f300-4adb-b3e9-eb2ff137f8d7
Node ba28de78-f300-4adb-b3e9-eb2ff137f8d7 is locked by another process.
Indeed, that's a problem. On the one hand, I think 'reservation' should not be user-settable. On the other hand, we discussed and agreed that there needs to be a way to manually break a lock (reservation) when the conductor holding it has failed.
Perhaps we only allow it to be cleared.