Update node reservation by user causes unbreakable lock

Bug #1250348 reported by Yuriy Zveryanskyy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Yuriy Zveryanskyy

Bug Description

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.

Changed in ironic:
assignee: nobody → Yuriy Zveryanskyy (yzveryanskyy)
Changed in ironic:
status: New → In Progress
summary: - Update node lock by user causes unbreakable lock
+ Update node reservation by user causes unbreakable lock
Revision history for this message
aeva black (tenbrae) wrote :

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.

Changed in ironic:
importance: Undecided → High
aeva black (tenbrae)
Changed in ironic:
milestone: none → icehouse-2
aeva black (tenbrae)
Changed in ironic:
milestone: icehouse-2 → icehouse-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/71211
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=98a399c3cac5023410e29328b08ce68756bb5a4d
Submitter: Jenkins
Branch: master

commit 98a399c3cac5023410e29328b08ce68756bb5a4d
Author: Yuriy Zveryanskyy <email address hidden>
Date: Tue Feb 4 15:21:01 2014 +0200

    Expose 'reservation' field of a node via API

    Reservation field added to node API representation and
    to internal attributes list (for prevent modification
    by PATCH)

    Partial-Bug: #1250348
    Change-Id: I01211bf2ae4cadb8e76f99f75caecac35a861b92

aeva black (tenbrae)
Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.