)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"b240985ff67c3e8fb89a4fcab23ccbe93863bf7c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add lift_lock context manager to TaskManager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is for ironic-discoverd driver to be able to temporary life lock"},{"line_number":10,"context_line":"when calling into discoverd. Otherwise there will be a deadlock"},{"line_number":11,"context_line":"between driver still holding a lock and ironic-discoverd trying"},{"line_number":12,"context_line":"to manipulate a node."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ba7be1f8_082358bd","line":9,"updated":"2015-02-26 14:46:12.000000000","message":"s/life/lift","commit_id":"b0bfe5eecb69c1c7c9bf4c8e2fcd7db670f919e8"}],"ironic/tests/conductor/test_task_manager.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ca8b544d7deeea5aad5d55b3a9bde5953b9c42e3","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            reserve_mock.assert_called_once_with(self.context, self.host,"},{"line_number":219,"context_line":"                                                 \u0027fake-node-id\u0027)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"            with task.lift_lock():"},{"line_number":222,"context_line":"                self.assertEqual(1, reserve_mock.call_count)"},{"line_number":223,"context_line":"                self.assertIsNone(task.node)"},{"line_number":224,"context_line":"                release_mock.assert_called_once_with(self.context, self.host,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_8331f15b","line":221,"updated":"2015-02-26 10:57:34.000000000","message":"What would happen at the end of the execution both of this with statement, if in another place some other thread acquires the node?\n\nFor example:\n\n 1 - First acquire() happens on L212.\n 2 - L221 we lift the lock\n 3 - before the end of the L221 execution another place acquired the same\n     node\n 4 - At the end of the execution body of this with statement (L225) it could\n     potentially raise NodeLocked right?\n\n...\n\nI\u0027m trying to think about a suggestion but I think I need to understand the use of lifting the lock first.\n\nI\u0027m wondering whether the discoverd client call (ironic_discoverd.client.introspect) could atually return the data discovered so that we can update the node from within Ironic. It doesn\u0027t necessarily needs to be sync, it could be async and support some pooling that will tell if the inspection is either RUNNING, COMPLETED, or FAILED.","commit_id":"2f1d3518be168680b9ce0514074cce2c207a5b85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b709e4937b68e17e62994933a43708d5d4c09ff5","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            reserve_mock.assert_called_once_with(self.context, self.host,"},{"line_number":219,"context_line":"                                                 \u0027fake-node-id\u0027)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"            with task.lift_lock():"},{"line_number":222,"context_line":"                self.assertEqual(1, reserve_mock.call_count)"},{"line_number":223,"context_line":"                self.assertIsNone(task.node)"},{"line_number":224,"context_line":"                release_mock.assert_called_once_with(self.context, self.host,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_121e250c","line":221,"in_reply_to":"ba7be1f8_8331f15b","updated":"2015-02-26 12:45:20.000000000","message":"\u003e What would happen at the end of the execution both of this with statement, if in another place some other thread acquires the node?\n\nNodeLocked exception. I probably have to be clear about it in the docstring..\n\n\u003e I think I need to understand the use of lifting the lock first.\n\nWe need to do it before calling into ironic_discoverd.client.introspect, because on this call ironic-discoverd will try to touch the node. The alternative is to call ironic_discoverd from a new thread, but that looks like overcomplication.\n\n\u003e I\u0027m wondering whether the discoverd client call (ironic_discoverd.client.introspect) could atually return the data discovered\n\nWell, it does not :) And the reason I didn\u0027t do it is that blocking a green thread for 20 minutes while the machine is booting is never a good idea.\n\n\u003e support some pooling that will tell if the inspection is either RUNNING, COMPLETED, or FAILED\n\nThat\u0027s what I do now in a driver periodic task.","commit_id":"2f1d3518be168680b9ce0514074cce2c207a5b85"}]}
