)]}'
{"ironic/nova/virt/ironic/driver.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"f91c24897dfe6702982778b64959f8f4f6e8bb77","unresolved":false,"context_lines":[{"line_number":432,"context_line":""},{"line_number":433,"context_line":"        # wait for the node to be marked as ACTIVE in Ironic"},{"line_number":434,"context_line":"        def _wait_for_active(node_uuid):"},{"line_number":435,"context_line":"            node \u003d icli.node.get(node_uuid)"},{"line_number":436,"context_line":"            if node.provision_state \u003d\u003d ironic_states.ACTIVE:"},{"line_number":437,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":438,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2F%2FN0%3D","line":435,"updated":"2014-03-12 14:27:37.000000000","message":"should also compare the instance_uuid to be sure that the node has /this/ instance provisioned on it, not another.","commit_id":"d2d62aa0a946676e0c3eb33b42fba6d86362fbb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5c8601a73d7762ab3eba07de43577363d469304e","unresolved":false,"context_lines":[{"line_number":432,"context_line":""},{"line_number":433,"context_line":"        # wait for the node to be marked as ACTIVE in Ironic"},{"line_number":434,"context_line":"        def _wait_for_active(node_uuid):"},{"line_number":435,"context_line":"            node \u003d icli.node.get(node_uuid)"},{"line_number":436,"context_line":"            if node.provision_state \u003d\u003d ironic_states.ACTIVE:"},{"line_number":437,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":438,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2F%2Bz0%3D","line":435,"in_reply_to":"AAAAWH%2F%2F%2FN0%3D","updated":"2014-03-12 15:13:08.000000000","message":"+1 will do","commit_id":"d2d62aa0a946676e0c3eb33b42fba6d86362fbb0"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"ed0b8edfc605569ed2181569f56f67a2f0aa3440","unresolved":false,"context_lines":[{"line_number":439,"context_line":"            if node.provision_state \u003d\u003d ironic_states.DEPLOYFAIL:"},{"line_number":440,"context_line":"                msg \u003d _(\"Failed to provision node %(node)s\") % node_uuid"},{"line_number":441,"context_line":"                LOG.error(msg)"},{"line_number":442,"context_line":"                raise exception.NovaException(msg)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_for_active,"},{"line_number":445,"context_line":"                                                     node_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2F%2FNE%3D","line":442,"updated":"2014-03-12 14:28:52.000000000","message":"also needs to handle what happens if the instance is deleted before provisioning finishes","commit_id":"d2d62aa0a946676e0c3eb33b42fba6d86362fbb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5c8601a73d7762ab3eba07de43577363d469304e","unresolved":false,"context_lines":[{"line_number":439,"context_line":"            if node.provision_state \u003d\u003d ironic_states.DEPLOYFAIL:"},{"line_number":440,"context_line":"                msg \u003d _(\"Failed to provision node %(node)s\") % node_uuid"},{"line_number":441,"context_line":"                LOG.error(msg)"},{"line_number":442,"context_line":"                raise exception.NovaException(msg)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_for_active,"},{"line_number":445,"context_line":"                                                     node_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2F%2Bzs%3D","line":442,"in_reply_to":"AAAAWH%2F%2F%2FNE%3D","updated":"2014-03-12 15:13:08.000000000","message":"+1","commit_id":"d2d62aa0a946676e0c3eb33b42fba6d86362fbb0"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"010c37f5ca30590383e74556803a4f4556820509","unresolved":false,"context_lines":[{"line_number":438,"context_line":"                msg \u003d (_(\"Can\u0027t find a node associated with the instance %s\")"},{"line_number":439,"context_line":"                       % instance[\u0027uuid\u0027])"},{"line_number":440,"context_line":"                LOG.error(msg)"},{"line_number":441,"context_line":"                raise exception.NodeNotFound(msg)"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"            if node.provision_state \u003d\u003d ironic_states.ACTIVE:"},{"line_number":444,"context_line":"                raise loopingcall.LoopingCallDone()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F%2Bbw%3D","line":441,"updated":"2014-03-12 15:48:59.000000000","message":"Oh, and this should raise nova\u0027s exception for InstanceNotFound as well.","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5c0604c0dfda4d9f035a74d51a3438862d94e1e9","unresolved":false,"context_lines":[{"line_number":438,"context_line":"                msg \u003d (_(\"Can\u0027t find a node associated with the instance %s\")"},{"line_number":439,"context_line":"                       % instance[\u0027uuid\u0027])"},{"line_number":440,"context_line":"                LOG.error(msg)"},{"line_number":441,"context_line":"                raise exception.NodeNotFound(msg)"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"            if node.provision_state \u003d\u003d ironic_states.ACTIVE:"},{"line_number":444,"context_line":"                raise loopingcall.LoopingCallDone()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8%2Bo%3D","line":441,"in_reply_to":"AAAAWH%2F%2F%2Bbw%3D","updated":"2014-03-13 09:47:27.000000000","message":"will fix :) thanks","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a9280550dc9755df3e0ebb311314fdba9405afe3","unresolved":false,"context_lines":[{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            # return in case the node is set to be deleted or the state"},{"line_number":453,"context_line":"            # transition is already finished"},{"line_number":454,"context_line":"            if node.target_provision_state in [ironic_states.NOSTATE,"},{"line_number":455,"context_line":"                                               ironic_states.DELETED]:"},{"line_number":456,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":457,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8cw%3D","line":454,"updated":"2014-03-12 19:12:27.000000000","message":"https://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L444\n\nIronic does not currently set state to DELETED -- the driver returns that to ConductorManager, which then sets the state back to NOSTATE when the delete is finished successfully.","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5c0604c0dfda4d9f035a74d51a3438862d94e1e9","unresolved":false,"context_lines":[{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            # return in case the node is set to be deleted or the state"},{"line_number":453,"context_line":"            # transition is already finished"},{"line_number":454,"context_line":"            if node.target_provision_state in [ironic_states.NOSTATE,"},{"line_number":455,"context_line":"                                               ironic_states.DELETED]:"},{"line_number":456,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":457,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F3To%3D","line":454,"in_reply_to":"AAAAWH%2F%2F7js%3D","updated":"2014-03-13 09:47:27.000000000","message":"+1","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"b77bfcfc5c63185a95b90a13d24c77649c5776a3","unresolved":false,"context_lines":[{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            # return in case the node is set to be deleted or the state"},{"line_number":453,"context_line":"            # transition is already finished"},{"line_number":454,"context_line":"            if node.target_provision_state in [ironic_states.NOSTATE,"},{"line_number":455,"context_line":"                                               ironic_states.DELETED]:"},{"line_number":456,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":457,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F7js%3D","line":454,"in_reply_to":"AAAAWH%2F%2F8VQ%3D","updated":"2014-03-12 21:13:34.000000000","message":"Agree, makes sense to me.","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"6b64d4864c783ad0c52a9adfae3620740c7cc51f","unresolved":false,"context_lines":[{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            # return in case the node is set to be deleted or the state"},{"line_number":453,"context_line":"            # transition is already finished"},{"line_number":454,"context_line":"            if node.target_provision_state in [ironic_states.NOSTATE,"},{"line_number":455,"context_line":"                                               ironic_states.DELETED]:"},{"line_number":456,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":457,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8VQ%3D","line":454,"in_reply_to":"AAAAWH%2F%2F8Zo%3D","updated":"2014-03-12 19:30:10.000000000","message":"Yea. So I would change this slightly:\n\n  if node.target_prov_state \u003d\u003d DELETED:\n    # ironic is trying to delete it now\n    raise InstanceNotFound\n  if node.prov_state \u003d\u003d NOSTATE:\n    # ironic already deleted it\n    raise InstanceNotFound\n  if node.prov_state \u003d\u003d DEPLOYFAIL:\n    # ironic failed to deploy\n    raise DeployFail","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"427cf7a5010c90300e50f6ac87222ec943d48496","unresolved":false,"context_lines":[{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            # return in case the node is set to be deleted or the state"},{"line_number":453,"context_line":"            # transition is already finished"},{"line_number":454,"context_line":"            if node.target_provision_state in [ironic_states.NOSTATE,"},{"line_number":455,"context_line":"                                               ironic_states.DELETED]:"},{"line_number":456,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":457,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8Zo%3D","line":454,"in_reply_to":"AAAAWH%2F%2F8cw%3D","updated":"2014-03-12 19:19:53.000000000","message":"So NOSTATE should be treated as DELETED as far as nova is concerned?  Ie, raise InstanceNotFound?","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"d966d71a24b9b2213bee72f817f3f765a042e304","unresolved":false,"context_lines":[{"line_number":452,"context_line":"            # return in case the node is set to be deleted or the state"},{"line_number":453,"context_line":"            # transition is already finished"},{"line_number":454,"context_line":"            if node.target_provision_state in [ironic_states.NOSTATE,"},{"line_number":455,"context_line":"                                               ironic_states.DELETED]:"},{"line_number":456,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"        timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_for_active,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F%2BdE%3D","line":455,"updated":"2014-03-12 15:48:22.000000000","message":"I think DELETED should raise nova.exception.InstanceNotFound so that compute manager can manage the race properly and not set the instance to ACTIVE.  I don\u0027t understand the NOSTATE state, so I\u0027m not sure if setting to ACTIVE is appropriate for it or not.","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"79a912c8ccea9def3b53abd9b3c2333f44ebb3cd","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_for_active,"},{"line_number":459,"context_line":"                                                     node_uuid)"},{"line_number":460,"context_line":"        # TODO(lucasagomes): Make the time configurable"},{"line_number":461,"context_line":"        timer.start(interval\u003d10).wait()"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"    def destroy(self, context, instance, network_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8dc%3D","line":461,"updated":"2014-03-12 19:10:33.000000000","message":"I think there should be a timeout on this too, configure.","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5c0604c0dfda4d9f035a74d51a3438862d94e1e9","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_for_active,"},{"line_number":459,"context_line":"                                                     node_uuid)"},{"line_number":460,"context_line":"        # TODO(lucasagomes): Make the time configurable"},{"line_number":461,"context_line":"        timer.start(interval\u003d10).wait()"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"    def destroy(self, context, instance, network_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F3T0%3D","line":461,"in_reply_to":"AAAAWH%2F%2F8dc%3D","updated":"2014-03-13 09:47:27.000000000","message":"Right, the thing about the timeout is hard, cause how much time should we wait? I think that it might vary a lot from one deployment to another. I could set it to something very high tho, but I don\u0027t think it\u0027s totally ideal.\n\nMy idea here was to rely on the timeouts from Ironic, since it already has a timeout for the deployment and that will mark the provision_state of the node to DEPLOYFAIL if it\u0027s time up I can just wait for it here.","commit_id":"7d7f486facedb931258a1ed888b59913db849cf5"}]}
