)]}'
{"ironic/conductor/manager.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"72aef0864ceec8c165d3c76a282aef33bf1aeeb9","unresolved":false,"context_lines":[{"line_number":704,"context_line":"            # since there may be local persistent state"},{"line_number":705,"context_line":"            node.conductor_affinity \u003d self.conductor.id"},{"line_number":706,"context_line":"        except Exception as e:"},{"line_number":707,"context_line":"            # NOTE(deva): there is no need to clear conductor_affinity"},{"line_number":708,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":709,"context_line":"                task.process_event(\u0027fail\u0027)"},{"line_number":710,"context_line":"                LOG.warning(_LW(\u0027Error in deploy of node %(node)s: %(err)s\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_fa115ef8","line":707,"updated":"2014-12-05 01:51:42.000000000","message":"Just a thought (might not be useful):\n\nThis could be a default task method something like:\n\n  @contextlib.contextmanager\n  def process_fail(self):\n    with excutils.save_and_reraise_exception():\n      self.process_event(\u0027fail\u0027)\n\nThen in this code u could use that (if such things/events will be releatively common) such that this becomes:\n\n  with task.process_fail():\n     LOG.warning ...\n     node.last_error ...","commit_id":"f4cca2d7c0606fdad7d276564ec24041a3efe35d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98a5973151fac3dad63d71297588bbb4e1c6058c","unresolved":false,"context_lines":[{"line_number":667,"context_line":"            if rebuild:"},{"line_number":668,"context_line":"                event \u003d \u0027rebuild\u0027"},{"line_number":669,"context_line":"            else:"},{"line_number":670,"context_line":"                event \u003d \u0027deploy\u0027"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"            # Save the previous states so we can rollback the node to a"},{"line_number":673,"context_line":"            # consistent state in case there\u0027s no free workers to do the"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_e9a58047","line":670,"updated":"2014-12-11 14:46:56.000000000","message":"should we have these as constants btw? So that they aren\u0027t misspelled by chance","commit_id":"9e5c96acb900a6c46e10da62e8ad79a8b1f3af1b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7488e39550ea55bc1930274322e6e619dd06657e","unresolved":false,"context_lines":[{"line_number":706,"context_line":"        except Exception as e:"},{"line_number":707,"context_line":"            # NOTE(deva): there is no need to clear conductor_affinity"},{"line_number":708,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":709,"context_line":"                task.process_event(\u0027fail\u0027)"},{"line_number":710,"context_line":"                LOG.warning(_LW(\u0027Error in deploy of node %(node)s: %(err)s\u0027),"},{"line_number":711,"context_line":"                            {\u0027node\u0027: task.node.uuid, \u0027err\u0027: e})"},{"line_number":712,"context_line":"                node.last_error \u003d _(\"Failed to deploy. Error: %s\") % e"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_e71afd6d","line":709,"updated":"2014-12-11 19:47:44.000000000","message":"I think that node.target_provision_state will still be set to DEPLOYDONE, because before task.process_event is called, n.provision_state\u003dDEPLOYING, n.target_prov_state\u003dDEPLOYDONE, and the fsm\u0027s process_event won\u0027t modify ._target_state because the state \u0027DEPLOYFAIL\u0027 has no target associated with it.","commit_id":"9e5c96acb900a6c46e10da62e8ad79a8b1f3af1b"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"a321febea341cca05c1bde2b4b6465b81addaa2e","unresolved":false,"context_lines":[{"line_number":794,"context_line":"                LOG.warning(_LW(\u0027Error in tear_down of node %(node)s: \u0027"},{"line_number":795,"context_line":"                                \u0027%(err)s\u0027),"},{"line_number":796,"context_line":"                            {\u0027node\u0027: task.node.uuid, \u0027err\u0027: e})"},{"line_number":797,"context_line":"                task.node.last_error \u003d _(\"Failed to tear down. Error: %s\") % e"},{"line_number":798,"context_line":"        else:"},{"line_number":799,"context_line":"            # NOTE(deva): When tear_down finishes, the deletion is done"},{"line_number":800,"context_line":"            task.process_event(\u0027done\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_4c490d30","line":797,"updated":"2014-12-12 20:45:49.000000000","message":"Can you change this to use the \u0027node\u0027 variable set at the top of the method (as well as the reference in the LOG statement)? Or else, change all references to node to go through \u0027task\u0027. This is rather inconsistent.","commit_id":"d7713ff7c3e74eed596d9113bca03981150d38c2"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"46d21172c66fcf55bd914ee1facef9acfbfbdcd3","unresolved":false,"context_lines":[{"line_number":794,"context_line":"                LOG.warning(_LW(\u0027Error in tear_down of node %(node)s: \u0027"},{"line_number":795,"context_line":"                                \u0027%(err)s\u0027),"},{"line_number":796,"context_line":"                            {\u0027node\u0027: task.node.uuid, \u0027err\u0027: e})"},{"line_number":797,"context_line":"                task.node.last_error \u003d _(\"Failed to tear down. Error: %s\") % e"},{"line_number":798,"context_line":"        else:"},{"line_number":799,"context_line":"            # NOTE(deva): When tear_down finishes, the deletion is done"},{"line_number":800,"context_line":"            task.process_event(\u0027done\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_a1524466","line":797,"updated":"2014-12-15 20:27:14.000000000","message":"woops - done.","commit_id":"d7713ff7c3e74eed596d9113bca03981150d38c2"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"a321febea341cca05c1bde2b4b6465b81addaa2e","unresolved":false,"context_lines":[{"line_number":804,"context_line":"            # NOTE(deva): For compatibility with \"NOSTATE is None\""},{"line_number":805,"context_line":"            #             we need to clear the target_state here manually"},{"line_number":806,"context_line":"            #             This can be removed once using an AVAILABLE state"},{"line_number":807,"context_line":"            node.target_provision_state \u003d None"},{"line_number":808,"context_line":"        finally:"},{"line_number":809,"context_line":"            # NOTE(deva): there is no need to unset conductor_affinity"},{"line_number":810,"context_line":"            # because it is a reference to the most recent conductor which"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_ace0b1cd","line":807,"updated":"2014-12-12 20:45:49.000000000","message":"This bit confuses me. The process_event(\u0027done\u0027) should set the node target state to NOSTATE (None) because of this from states.py:\n\nmachine.add_transition(DELETING, NOSTATE, \u0027done\u0027)\n\nWhat am I missing?","commit_id":"d7713ff7c3e74eed596d9113bca03981150d38c2"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"46d21172c66fcf55bd914ee1facef9acfbfbdcd3","unresolved":false,"context_lines":[{"line_number":804,"context_line":"            # NOTE(deva): For compatibility with \"NOSTATE is None\""},{"line_number":805,"context_line":"            #             we need to clear the target_state here manually"},{"line_number":806,"context_line":"            #             This can be removed once using an AVAILABLE state"},{"line_number":807,"context_line":"            node.target_provision_state \u003d None"},{"line_number":808,"context_line":"        finally:"},{"line_number":809,"context_line":"            # NOTE(deva): there is no need to unset conductor_affinity"},{"line_number":810,"context_line":"            # because it is a reference to the most recent conductor which"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_c14f50bd","line":807,"updated":"2014-12-15 20:27:14.000000000","message":"fsm.py doesn\u0027t actually handle a target of NOSTATE -- if target is None, it doesn\u0027t update target, because some states don\u0027t have a target. See process_event() in fsm.py\n\n143         # clear _target if we\u0027ve reached it\n144         if (self._target_state is not None and\n145                 self._target_state \u003d\u003d replacement.name):\n146             self._target_state \u003d None\n147         # set target if there is a new one\n148         if (self._target_state is None and\n149                 self._states[replacement.name][\u0027target\u0027] is not None):\n150             self._target_state \u003d self._states[replacement.name][\u0027target\u0027]","commit_id":"d7713ff7c3e74eed596d9113bca03981150d38c2"}],"ironic/conductor/task_manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98a5973151fac3dad63d71297588bbb4e1c6058c","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        self.release_resources()"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def process_event(self, event):"},{"line_number":260,"context_line":"        \"\"\"Process an event by advancing the state machine.\"\"\""},{"line_number":261,"context_line":"        self.fsm.process_event(event)"},{"line_number":262,"context_line":"        self.node.provision_state \u003d self.fsm.current_state"},{"line_number":263,"context_line":"        self.node.target_provision_state \u003d self.fsm.target_state"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_0402b109","line":260,"updated":"2014-12-11 14:46:56.000000000","message":"maybe\n\n if self.fsm is None: raise ...","commit_id":"9e5c96acb900a6c46e10da62e8ad79a8b1f3af1b"}],"ironic/tests/conductor/test_manager.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1ab8cbdc9494a7b0c630a357b570d1d943cbd866","unresolved":false,"context_lines":[{"line_number":916,"context_line":"        # test when driver.deploy.deploy raises an exception"},{"line_number":917,"context_line":"        mock_deploy.side_effect \u003d exception.InstanceDeployFailure(\u0027test\u0027)"},{"line_number":918,"context_line":"        node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake\u0027,"},{"line_number":919,"context_line":"                                          provision_state\u003dstates.DEPLOYING)"},{"line_number":920,"context_line":"        task \u003d task_manager.TaskManager(self.context, node.uuid)"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"        self.assertRaises(exception.InstanceDeployFailure,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_9f73c314","line":919,"updated":"2014-12-16 16:26:01.000000000","message":"wrt my comment in patch 8, in conductor/manager.py\u0027s _do_node_deploy(), that if an exception is raised, node.target_provision_state is incorrect. \n\nIf this test is changed so that the provision_state is NONE here, and after you have the task (after line 920), you add task.process_event(\u0027deploy\u0027), you\u0027ll see that the test fails.\n\nI think we might need to go through the tests and make sure the task\u0027s fsm is being set correctly.","commit_id":"d8c182bd13414e7d278b7fda4c2e48e088f9572d"}]}
