)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"50890318825f35b039e84afc76701e0a9c606968","unresolved":false,"context_lines":[{"line_number":2898,"context_line":"        rt \u003d self._get_resource_tracker(node)"},{"line_number":2899,"context_line":"        with rt.resize_claim(context, instance, instance_type,"},{"line_number":2900,"context_line":"                             limits\u003dlimits) as claim:"},{"line_number":2901,"context_line":"            LOG.audit(_(\u0027Migrating\u0027), context\u003dcontext, instance\u003dinstance)"},{"line_number":2902,"context_line":"            self.compute_rpcapi.resize_instance(context, instance,"},{"line_number":2903,"context_line":"                    claim.migration, image, instance_type, reservations)"},{"line_number":2904,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FO48%3D","line":2901,"updated":"2013-10-20 11:31:25.000000000","message":"The changes to resize_instance() below will result in claims being applied twice. Once here, and once in the modified resize_instance() method.\n\nI guess this code path is only here for backwards compatibility but unless it can be removed can\u0027t be broken.","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"50890318825f35b039e84afc76701e0a9c606968","unresolved":false,"context_lines":[{"line_number":3045,"context_line":"    @wrap_instance_event"},{"line_number":3046,"context_line":"    @wrap_instance_fault"},{"line_number":3047,"context_line":"    def resize_instance(self, context, instance, image, instance_type,"},{"line_number":3048,"context_line":"                        reservations\u003dNone, dest_node\u003dNone, limits\u003d{}):"},{"line_number":3049,"context_line":"        \"\"\"Starts the migration of a running instance to another host.\"\"\""},{"line_number":3050,"context_line":""},{"line_number":3051,"context_line":"        if dest_node is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FO7E%3D","line":3048,"updated":"2013-10-20 11:31:25.000000000","message":"mutable default, instead set limits\u003dNone and then:\n\n if limits is None:\n     limits \u003d {}","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7ae58c036059cee6006a91ab2f14cbab715f4e13","unresolved":false,"context_lines":[{"line_number":3039,"context_line":""},{"line_number":3040,"context_line":"    def _resize_instance(self, context, instance, image,"},{"line_number":3041,"context_line":"                         reservations\u003dNone, migration\u003dNone,"},{"line_number":3042,"context_line":"                         migration_id\u003dNone, instance_type\u003dNone):"},{"line_number":3043,"context_line":"        if not migration:"},{"line_number":3044,"context_line":"            migration \u003d migration_obj.Migration.get_by_id("},{"line_number":3045,"context_line":"                    context.elevated(), migration_id)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2Fpio%3D","line":3042,"updated":"2013-10-30 22:16:08.000000000","message":"Is there any reason to keep migration_id here?  The one caller of this method isn\u0027t passing it in.","commit_id":"3a993060fb0519c7d0aece84f76d3531c9bac067"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7ae58c036059cee6006a91ab2f14cbab715f4e13","unresolved":false,"context_lines":[{"line_number":3040,"context_line":"    def _resize_instance(self, context, instance, image,"},{"line_number":3041,"context_line":"                         reservations\u003dNone, migration\u003dNone,"},{"line_number":3042,"context_line":"                         migration_id\u003dNone, instance_type\u003dNone):"},{"line_number":3043,"context_line":"        if not migration:"},{"line_number":3044,"context_line":"            migration \u003d migration_obj.Migration.get_by_id("},{"line_number":3045,"context_line":"                    context.elevated(), migration_id)"},{"line_number":3046,"context_line":"        with self._error_out_instance_on_exception(context, instance.uuid,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2Fpik%3D","line":3043,"updated":"2013-10-30 22:16:08.000000000","message":"and this block isn\u0027t necessary now it seems.  Since you\u0027re claiming a migration in resize_instance below.","commit_id":"3a993060fb0519c7d0aece84f76d3531c9bac067"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f6d9fddc0c30ce754f9adfa12e7c6e12ca283cf2","unresolved":false,"context_lines":[{"line_number":3226,"context_line":""},{"line_number":3227,"context_line":"        rt \u003d self._get_resource_tracker(dest_node)"},{"line_number":3228,"context_line":"        with rt.resize_claim(context, instance, instance_type, limits\u003dlimits) \\"},{"line_number":3229,"context_line":"                as claim:"},{"line_number":3230,"context_line":"            # NOTE(timello): This is for backward-compatibility. Old version"},{"line_number":3231,"context_line":"            # could be passing migration through the rpc call."},{"line_number":3232,"context_line":"            if not migration:"}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAUX%2F%2FyBg%3D","line":3229,"updated":"2014-02-10 21:04:50.000000000","message":"Minor style nit: could this be reformatted to eliminate the backslash?  One possibility is:\n\n    with rt.resize_claim(context, instance, instance_type,\n                         limits\u003dlimits) as claim:","commit_id":"c9b650328c0987e6579e9eaaa45d8857b1f9c50d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ad4453902c30507285e7cec3520d1b0731ccc227","unresolved":false,"context_lines":[{"line_number":2744,"context_line":"        network_info \u003d self._get_instance_nw_info(context, instance)"},{"line_number":2745,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":2746,"context_line":"                \"unrescue.start\", network_info\u003dnetwork_info)"},{"line_number":2747,"context_line":"        with compute_utils.error_out_instance_on_exception(context, instance):"},{"line_number":2748,"context_line":"            self.driver.unrescue(instance,"},{"line_number":2749,"context_line":"                                 network_info)"},{"line_number":2750,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"AAAAVn%2F%2F5UU%3D","line":2747,"updated":"2014-03-03 15:32:06.000000000","message":"Seems like a separate, but useful change. Please pull into a separate patch.\n\nCan\u0027t see here why you changed things from instance_uuid, its hard to review all this at once.","commit_id":"b37b863fb6731abfd974a5c69222a18208f9fb08"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"50890318825f35b039e84afc76701e0a9c606968","unresolved":false,"context_lines":[{"line_number":615,"context_line":"            instance \u003d jsonutils.to_primitive("},{"line_number":616,"context_line":"                    objects_base.obj_to_primitive(instance))"},{"line_number":617,"context_line":"            migration \u003d jsonutils.to_primitive("},{"line_number":618,"context_line":"                    objects_base.obj_to_primitive(migration))"},{"line_number":619,"context_line":"            version \u003d \u00272.16\u0027"},{"line_number":620,"context_line":"        instance_type_p \u003d jsonutils.to_primitive(instance_type)"},{"line_number":621,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FO5g%3D","side":"PARENT","line":618,"updated":"2013-10-20 11:31:25.000000000","message":"Not sure migration can be removed without breaking backwards compatibility although I think the object conversions are not needed anymore.","commit_id":"7c68f0e787040d2a4cb160669a9af1faf00f78ec"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"926f7112e47c8000b2e67e570b13bdd2c11941ac","unresolved":false,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    def resize_instance(self, ctxt, instance, image, instance_type,"},{"line_number":613,"context_line":"                        reservations\u003dNone, dest_node\u003dNone, limits\u003dNone):"},{"line_number":614,"context_line":"        if self.client.can_send_version(\u00272.48\u0027):"},{"line_number":615,"context_line":"            version \u003d \u00272.48\u0027"},{"line_number":616,"context_line":"        else:"},{"line_number":617,"context_line":"            instance \u003d jsonutils.to_primitive("}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FPTA%3D","line":614,"updated":"2013-10-20 00:17:53.000000000","message":"how about the case which version is 2.45?","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"50890318825f35b039e84afc76701e0a9c606968","unresolved":false,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    def resize_instance(self, ctxt, instance, image, instance_type,"},{"line_number":613,"context_line":"                        reservations\u003dNone, dest_node\u003dNone, limits\u003dNone):"},{"line_number":614,"context_line":"        if self.client.can_send_version(\u00272.48\u0027):"},{"line_number":615,"context_line":"            version \u003d \u00272.48\u0027"},{"line_number":616,"context_line":"        else:"},{"line_number":617,"context_line":"            instance \u003d jsonutils.to_primitive("}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FO50%3D","line":614,"in_reply_to":"AAAATH%2F%2FPTA%3D","updated":"2013-10-20 11:31:25.000000000","message":"Not sure 2.45 matters anymore, although support for 2.47 would be needed since that is what Havana supports.","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"64f6456b4bc63efdaaf8e963f8e52c83e4de8670","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        else:"},{"line_number":617,"context_line":"            instance \u003d jsonutils.to_primitive("},{"line_number":618,"context_line":"                    objects_base.obj_to_primitive(instance))"},{"line_number":619,"context_line":"            version \u003d \u00272.16\u0027"},{"line_number":620,"context_line":"        instance_type_p \u003d jsonutils.to_primitive(instance_type)"},{"line_number":621,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":622,"context_line":"                                    version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2FupI%3D","line":619,"updated":"2013-10-29 19:50:07.000000000","message":"This breaks things, right? If we\u0027re clamped to 2.16 then not sending the migration is just going to cause this to fail, right?","commit_id":"3a993060fb0519c7d0aece84f76d3531c9bac067"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"3e4f4c69be861bdf772a8aa8e86e23667bfa9e8f","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        3.0 - Remove 2.x compatibility"},{"line_number":215,"context_line":"        3.1 - Update get_spice_console() to take an instance object"},{"line_number":216,"context_line":"        3.2 - Remove migration parameter, add filter_properties"},{"line_number":217,"context_line":"               and node parameters to the resize_instance()."},{"line_number":218,"context_line":"    \u0027\u0027\u0027"},{"line_number":219,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2BE78%3D","line":216,"updated":"2013-12-02 19:46:58.000000000","message":"Actual parameters are not the same as mentioned here.","commit_id":"8fe382df622c1f5372a61021b13bf0562ef961d4"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"ed0dc13bf2e393b374b7f671c27caec1c0535dd9","unresolved":false,"context_lines":[{"line_number":632,"context_line":"    def resize_instance(self, ctxt, instance, migration, image, instance_type,"},{"line_number":633,"context_line":"                        reservations\u003dNone):"},{"line_number":634,"context_line":"        # NOTE(russellb) Havana compat"},{"line_number":635,"context_line":"        version \u003d self._get_compat_version(\u00273.0\u0027, \u00272.45\u0027)"},{"line_number":636,"context_line":"        instance_type_p \u003d jsonutils.to_primitive(instance_type)"},{"line_number":637,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":638,"context_line":"                version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F96gM%3D","side":"PARENT","line":635,"updated":"2013-12-04 15:28:00.000000000","message":"I think you must leave this as is and add separate handling for the new version above the compat code.\n\nFor reference, see get_spice_console() at L427 above.","commit_id":"3b32669390ec980d3e0aa62397f73d4787cb27cc"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"ed0dc13bf2e393b374b7f671c27caec1c0535dd9","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                   instance\u003dinstance, migration\u003dmigration, image\u003dimage,"},{"line_number":642,"context_line":"                   instance_type\u003dinstance_type_p,"},{"line_number":643,"context_line":"                   reservations\u003dreservations,"},{"line_number":644,"context_line":"                   dest_node\u003ddest_node, limits\u003dlimits)"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"    def resume_instance(self, ctxt, instance):"},{"line_number":647,"context_line":"        # NOTE(russellb) Havana compat"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F96i4%3D","line":644,"updated":"2013-12-04 15:28:00.000000000","message":"Is this really backwards compatible? What if you send to a havana compute? Will it accept the extra parameters?","commit_id":"acb6301a993601e5416da7b35bc2d38ee28a4933"}],"nova/compute/utils.py":[{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"3e4f4c69be861bdf772a8aa8e86e23667bfa9e8f","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"@contextlib.contextmanager"},{"line_number":439,"context_line":"def error_out_instance_on_exception(context, instance, conductor,"},{"line_number":440,"context_line":"            reservations\u003dNone, instance_state\u003dvm_states.ACTIVE):"},{"line_number":441,"context_line":"    instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":442,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2BE%2BQ%3D","line":439,"updated":"2013-12-02 19:46:58.000000000","message":"Some callers of this send a new world instance object while some send the instance as a dict. This need to be handled somehow.","commit_id":"8fe382df622c1f5372a61021b13bf0562ef961d4"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"3e4f4c69be861bdf772a8aa8e86e23667bfa9e8f","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        yield"},{"line_number":444,"context_line":"    except NotImplementedError as error:"},{"line_number":445,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":446,"context_line":"            conductor.quota_rollback(context, reservations)"},{"line_number":447,"context_line":"            LOG.info(_(\"Setting instance back to %(state)s after: \""},{"line_number":448,"context_line":"                        \"%(error)s\") %"},{"line_number":449,"context_line":"                        {\u0027state\u0027: instance_state, \u0027error\u0027: error},"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2BE9U%3D","line":446,"updated":"2013-12-02 19:46:58.000000000","message":"If using new world quotas object, there is no need to take conductor as a parameter to this function.\n\n from nova.objects import quotas as quotas_obj\n\n quotas \u003d quotas_obj.Quotas.from_reservations(context, reservations, instance\u003dinstance)\n quotas.rollback()","commit_id":"8fe382df622c1f5372a61021b13bf0562ef961d4"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"b99384cf385d24e1a0fc3804cc7801de579568fc","unresolved":false,"context_lines":[{"line_number":445,"context_line":"        instance \u003d instance_obj.Instance._from_db_object("},{"line_number":446,"context_line":"                context, instance_obj.Instance(), instance)"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":449,"context_line":"    quotas \u003d quotas_obj.Quotas.from_reservations("},{"line_number":450,"context_line":"            context, reservations, instance\u003dinstance)"},{"line_number":451,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F9%2Fyg%3D","line":448,"updated":"2013-12-03 17:16:48.000000000","message":"instance.uuid","commit_id":"b752d24b245ddd16c0c53c13977a5e0ce6263a86"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"b99384cf385d24e1a0fc3804cc7801de579568fc","unresolved":false,"context_lines":[{"line_number":452,"context_line":"        yield"},{"line_number":453,"context_line":"    except NotImplementedError as error:"},{"line_number":454,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":455,"context_line":"            quotas.rollback(context)"},{"line_number":456,"context_line":"            LOG.info(_(\"Setting instance back to %(state)s after: \""},{"line_number":457,"context_line":"                        \"%(error)s\") %"},{"line_number":458,"context_line":"                        {\u0027state\u0027: instance_state, \u0027error\u0027: error},"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F9%2FxA%3D","line":455,"updated":"2013-12-03 17:16:48.000000000","message":"context is not needed, it is already stored in the object from when it was created.","commit_id":"b752d24b245ddd16c0c53c13977a5e0ce6263a86"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"b99384cf385d24e1a0fc3804cc7801de579568fc","unresolved":false,"context_lines":[{"line_number":461,"context_line":"            instance.task_state \u003d None"},{"line_number":462,"context_line":"            instance.save()"},{"line_number":463,"context_line":"    except exception.InstanceFaultRollback as error:"},{"line_number":464,"context_line":"        quotas.rollback(context)"},{"line_number":465,"context_line":"        LOG.info(_(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":466,"context_line":"                    error, instance_uuid\u003dinstance_uuid)"},{"line_number":467,"context_line":"        instance.vm_state \u003d vm_states.ACTIVE"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F9%2Fww%3D","line":464,"updated":"2013-12-03 17:16:48.000000000","message":"same here","commit_id":"b752d24b245ddd16c0c53c13977a5e0ce6263a86"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"b99384cf385d24e1a0fc3804cc7801de579568fc","unresolved":false,"context_lines":[{"line_number":472,"context_line":"        LOG.exception(_(\u0027Setting instance vm_state to ERROR\u0027),"},{"line_number":473,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":474,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":475,"context_line":"            quotas.rollback(context)"},{"line_number":476,"context_line":"            _set_instance_error_state(context, instance)"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F9%2Fw8%3D","line":475,"updated":"2013-12-03 17:16:48.000000000","message":"same here","commit_id":"b752d24b245ddd16c0c53c13977a5e0ce6263a86"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"ed0dc13bf2e393b374b7f671c27caec1c0535dd9","unresolved":false,"context_lines":[{"line_number":483,"context_line":"    except exception.InstanceNotFound:"},{"line_number":484,"context_line":"        LOG.debug(_(\u0027Instance has been destroyed from under us while \u0027"},{"line_number":485,"context_line":"                    \u0027trying to set it to ERROR\u0027),"},{"line_number":486,"context_line":"                  instance_uuid\u003dinstance[\u0027uuid\u0027])"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"class EventReporter(object):"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F96nc%3D","line":486,"updated":"2013-12-04 15:28:00.000000000","message":"instance.uuid\n\nSorry for not finding this previously :-)","commit_id":"acb6301a993601e5416da7b35bc2d38ee28a4933"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"cb06b3ebf6810b6b861f1b26d9a86d0ad66e973e","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        instance.task_state \u003d None"},{"line_number":462,"context_line":"        instance.save()"},{"line_number":463,"context_line":"        raise error.inner_exception"},{"line_number":464,"context_line":"    except exception.MigrationError as error:"},{"line_number":465,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":466,"context_line":"            quotas.rollback()"},{"line_number":467,"context_line":"            LOG.info(_(\"Setting instance back to ACTIVE after: %s\"),"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAVX%2F%2F3SE%3D","line":464,"updated":"2014-02-27 18:30:46.000000000","message":"I think the only thing this should do is re-raise the MigrationError.\n\nEverything else including quota rollback, logging and setting instance state has already been taken care of by the innermost handler.","commit_id":"c338f8928a13e78891d60fe6de282549beb51993"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"531d3083cbb62391ca772458320e0222528d9382","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        instance.task_state \u003d None"},{"line_number":462,"context_line":"        instance.save()"},{"line_number":463,"context_line":"        raise error.inner_exception"},{"line_number":464,"context_line":"    except exception.MigrationError as error:"},{"line_number":465,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":466,"context_line":"            quotas.rollback()"},{"line_number":467,"context_line":"            LOG.info(_(\"Setting instance back to ACTIVE after: %s\"),"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAVX%2F%2Fwfo%3D","line":464,"in_reply_to":"AAAAVX%2F%2F3SE%3D","updated":"2014-02-28 16:03:12.000000000","message":"Actually, it takes care when the exception is specifically NoValidHost. But not when the reschedule attempt has failed for instance.","commit_id":"c338f8928a13e78891d60fe6de282549beb51993"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"4237af4efb282abfe0548d5f4ccb6a46036e2fb2","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        instance.task_state \u003d None"},{"line_number":462,"context_line":"        instance.save()"},{"line_number":463,"context_line":"        raise error.inner_exception"},{"line_number":464,"context_line":"    except exception.MigrationError as error:"},{"line_number":465,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":466,"context_line":"            quotas.rollback()"},{"line_number":467,"context_line":"            LOG.info(_(\"Setting instance back to ACTIVE after: %s\"),"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAVn%2F%2F09s%3D","line":464,"in_reply_to":"AAAAVX%2F%2Fwfo%3D","updated":"2014-03-03 22:46:30.000000000","message":"Not entirely sure I understand what you mean?\nThis is catching MigrationError right not NoValidHost?\n\nWhat I was trying to say before was that the innermost rescheduling attempt if not successful will end up here as one of either NotImplementedError/InstanceFaultRollback in which case the instance will be set to active, or some other exception in which case it will be set to error. After this, the reraised exception will once again get caught and turned into a MigrationError in conductor manager. This MigrationError is what is going to be rolled back up to previous instances of this handler and is why I think that if we get MigrationError here it should just re-raise and do nothing more.","commit_id":"c338f8928a13e78891d60fe6de282549beb51993"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"cb06b3ebf6810b6b861f1b26d9a86d0ad66e973e","unresolved":false,"context_lines":[{"line_number":469,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":470,"context_line":"            instance.task_state \u003d None"},{"line_number":471,"context_line":"            instance.save()"},{"line_number":472,"context_line":"    except Exception as error:"},{"line_number":473,"context_line":"        LOG.exception(_(\u0027Setting instance vm_state to ERROR\u0027),"},{"line_number":474,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":475,"context_line":"        with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAVX%2F%2F3Yo%3D","line":472,"updated":"2014-02-27 18:30:46.000000000","message":"logging must be moved below\n with excutils.save_and_reraise_exception():","commit_id":"c338f8928a13e78891d60fe6de282549beb51993"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"531d3083cbb62391ca772458320e0222528d9382","unresolved":false,"context_lines":[{"line_number":469,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":470,"context_line":"            instance.task_state \u003d None"},{"line_number":471,"context_line":"            instance.save()"},{"line_number":472,"context_line":"    except Exception as error:"},{"line_number":473,"context_line":"        LOG.exception(_(\u0027Setting instance vm_state to ERROR\u0027),"},{"line_number":474,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":475,"context_line":"        with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAVX%2F%2Fwfk%3D","line":472,"in_reply_to":"AAAAVX%2F%2F3Yo%3D","updated":"2014-02-28 16:03:12.000000000","message":"Done","commit_id":"c338f8928a13e78891d60fe6de282549beb51993"}],"nova/conductor/manager.py":[{"author":{"_account_id":7899,"name":"Kun Ge","email":"gekun@cn.ibm.com","username":"gekun"},"change_message_id":"6eb9374e58a3f49ac41b8b4bc0353aaab14da62c","unresolved":false,"context_lines":[{"line_number":773,"context_line":"            image \u003d self._get_image(context, image_ref)"},{"line_number":774,"context_line":"        else:"},{"line_number":775,"context_line":"            image \u003d {}"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"        request_spec \u003d scheduler_utils.build_request_spec("},{"line_number":778,"context_line":"            context, image, [instance])"},{"line_number":779,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAASn%2F%2Fnz0%3D","line":776,"updated":"2013-09-02 10:47:36.000000000","message":"From the perspective of backward compatibility, I think this is a potential issue here: the instanceType of the request_spec should be based on \u0027flavor\u0027 which indicates the flavor to resize to, instead of the instanceType it currently belongs to.\r\n\r\nI have opened a bug to track this issue: https://bugs.launchpad.net/nova/+bug/1219761","commit_id":"59330e26454012f32e405bb4322d0798f8538861"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"75589c1b8d03c63b63dea569ffd050ba79ef3080","unresolved":false,"context_lines":[{"line_number":773,"context_line":"            image \u003d self._get_image(context, image_ref)"},{"line_number":774,"context_line":"        else:"},{"line_number":775,"context_line":"            image \u003d {}"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"        request_spec \u003d scheduler_utils.build_request_spec("},{"line_number":778,"context_line":"            context, image, [instance])"},{"line_number":779,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAASn%2F%2FnIc%3D","line":776,"in_reply_to":"AAAASn%2F%2Fnz0%3D","updated":"2013-09-02 14:24:21.000000000","message":"Hey. Thanks for pointing this out. I\u0027ll take a look and update the patch accordingly.","commit_id":"59330e26454012f32e405bb4322d0798f8538861"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"72f20804c0a6e3a0df7c037bc89466fb171eb221","unresolved":false,"context_lines":[{"line_number":745,"context_line":"                    context, instance[\u0027uuid\u0027], system_metadata\u003dsys_meta)"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"            limits \u003d filter_properties.get(\u0027limits\u0027, {})"},{"line_number":748,"context_line":"            migration_ref \u003d self.compute_rpcapi.resize_claim("},{"line_number":749,"context_line":"                    context, instance, flavor, limits, node)"},{"line_number":750,"context_line":"            LOG.audit(_(\u0027Migrating\u0027), context\u003dcontext, instance\u003dinstance)"},{"line_number":751,"context_line":"            image_p \u003d jsonutils.to_primitive(image)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAASn%2F%2Fisg%3D","line":748,"updated":"2013-09-03 17:30:52.000000000","message":"could this not just be part of the resize_instance call?","commit_id":"b1d4f3937e36e89dbb9aaa8c5a2198f516988bba"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b9bf98dd26383472d74e8db85a67bef379e92227","unresolved":false,"context_lines":[{"line_number":698,"context_line":"    def _reschedule_cold_migrate(self, context, instance, flavor,"},{"line_number":699,"context_line":"                                 filter_properties, reservations, exc_info):"},{"line_number":700,"context_line":"        instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":701,"context_line":"        compute_utils.add_instance_fault_from_exc(context, ConductorManager(),"},{"line_number":702,"context_line":"                instance, exc_info[0], exc_info\u003dexc_info)"},{"line_number":703,"context_line":"        try:"},{"line_number":704,"context_line":"            task_state \u003d task_states.RESIZE_PREP"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FPAo%3D","line":701,"updated":"2013-10-20 09:04:03.000000000","message":"would it not be better to read this into a variable at init (ConductorManager())","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"af486ba986b72a7d10beb4679f3ffdd2f0609bc0","unresolved":false,"context_lines":[{"line_number":698,"context_line":"    def _reschedule_cold_migrate(self, context, instance, flavor,"},{"line_number":699,"context_line":"                                 filter_properties, reservations, exc_info):"},{"line_number":700,"context_line":"        instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":701,"context_line":"        compute_utils.add_instance_fault_from_exc(context, ConductorManager(),"},{"line_number":702,"context_line":"                instance, exc_info[0], exc_info\u003dexc_info)"},{"line_number":703,"context_line":"        try:"},{"line_number":704,"context_line":"            task_state \u003d task_states.RESIZE_PREP"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FML0%3D","line":701,"in_reply_to":"AAAATH%2F%2FMSw%3D","updated":"2013-10-21 17:24:27.000000000","message":"Maybe it would be ok to replace ConductorManager() with self.db?","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"9b6c12ea6e01fb9b34075d5f3bdffdf15fffd209","unresolved":false,"context_lines":[{"line_number":698,"context_line":"    def _reschedule_cold_migrate(self, context, instance, flavor,"},{"line_number":699,"context_line":"                                 filter_properties, reservations, exc_info):"},{"line_number":700,"context_line":"        instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":701,"context_line":"        compute_utils.add_instance_fault_from_exc(context, ConductorManager(),"},{"line_number":702,"context_line":"                instance, exc_info[0], exc_info\u003dexc_info)"},{"line_number":703,"context_line":"        try:"},{"line_number":704,"context_line":"            task_state \u003d task_states.RESIZE_PREP"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FMSw%3D","line":701,"in_reply_to":"AAAATH%2F%2FPAo%3D","updated":"2013-10-21 17:04:54.000000000","message":"If we do that... it will cause a recursion because ConductorManager() instantiates an ComputeTaskManager object. Maybe there\u0027s another solution for that...","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b9bf98dd26383472d74e8db85a67bef379e92227","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        try:"},{"line_number":704,"context_line":"            task_state \u003d task_states.RESIZE_PREP"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"            retry \u003d filter_properties.get(\u0027retry\u0027, None)"},{"line_number":707,"context_line":"            if not retry:"},{"line_number":708,"context_line":"                # no retry information, do not reschedule."},{"line_number":709,"context_line":"                LOG.debug(_(\"Retry info not present, will not reschedule\"),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FPA4%3D","line":706,"updated":"2013-10-20 09:04:03.000000000","message":"the get should return None by default","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"9b6c12ea6e01fb9b34075d5f3bdffdf15fffd209","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        try:"},{"line_number":704,"context_line":"            task_state \u003d task_states.RESIZE_PREP"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"            retry \u003d filter_properties.get(\u0027retry\u0027, None)"},{"line_number":707,"context_line":"            if not retry:"},{"line_number":708,"context_line":"                # no retry information, do not reschedule."},{"line_number":709,"context_line":"                LOG.debug(_(\"Retry info not present, will not reschedule\"),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FMSs%3D","line":706,"in_reply_to":"AAAATH%2F%2FPA4%3D","updated":"2013-10-21 17:04:54.000000000","message":"Done","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b9bf98dd26383472d74e8db85a67bef379e92227","unresolved":false,"context_lines":[{"line_number":711,"context_line":"                raise exc_info[0], exc_info[1], exc_info[2]"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"            LOG.debug(_(\"Re-scheduling migrate server: attempt %(num)d\") %"},{"line_number":714,"context_line":"                    {\u0027num\u0027: retry[\u0027num_attempts\u0027]},"},{"line_number":715,"context_line":"                      instance_uuid\u003dinstance_uuid)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"            # reset the task state:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FPA0%3D","line":714,"updated":"2013-10-20 09:04:03.000000000","message":"minor nit - if you have only one parameter you do not need a dictionary","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"9b6c12ea6e01fb9b34075d5f3bdffdf15fffd209","unresolved":false,"context_lines":[{"line_number":711,"context_line":"                raise exc_info[0], exc_info[1], exc_info[2]"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"            LOG.debug(_(\"Re-scheduling migrate server: attempt %(num)d\") %"},{"line_number":714,"context_line":"                    {\u0027num\u0027: retry[\u0027num_attempts\u0027]},"},{"line_number":715,"context_line":"                      instance_uuid\u003dinstance_uuid)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"            # reset the task state:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FMSQ%3D","line":714,"in_reply_to":"AAAATH%2F%2FPA0%3D","updated":"2013-10-21 17:04:54.000000000","message":"Done","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"926f7112e47c8000b2e67e570b13bdd2c11941ac","unresolved":false,"context_lines":[{"line_number":750,"context_line":"            # NOTE(mriedem): Stash the old vm_state so we can set the"},{"line_number":751,"context_line":"            # resized/reverted instance back to the same state later."},{"line_number":752,"context_line":"            vm_state \u003d instance[\u0027vm_state\u0027]"},{"line_number":753,"context_line":"            LOG.debug(\u0027Stashing vm_state: %s\u0027 % vm_state, instance\u003dinstance)"},{"line_number":754,"context_line":"            sys_meta[\u0027old_vm_state\u0027] \u003d vm_state"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"            instance.save()"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FPTM%3D","line":753,"updated":"2013-10-20 00:17:53.000000000","message":"i18n","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"9b6c12ea6e01fb9b34075d5f3bdffdf15fffd209","unresolved":false,"context_lines":[{"line_number":750,"context_line":"            # NOTE(mriedem): Stash the old vm_state so we can set the"},{"line_number":751,"context_line":"            # resized/reverted instance back to the same state later."},{"line_number":752,"context_line":"            vm_state \u003d instance[\u0027vm_state\u0027]"},{"line_number":753,"context_line":"            LOG.debug(\u0027Stashing vm_state: %s\u0027 % vm_state, instance\u003dinstance)"},{"line_number":754,"context_line":"            sys_meta[\u0027old_vm_state\u0027] \u003d vm_state"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"            instance.save()"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FMSM%3D","line":753,"in_reply_to":"AAAATH%2F%2FPTM%3D","updated":"2013-10-21 17:04:54.000000000","message":"Done","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b9bf98dd26383472d74e8db85a67bef379e92227","unresolved":false,"context_lines":[{"line_number":766,"context_line":"                self._reschedule_cold_migrate(context, instance, flavor,"},{"line_number":767,"context_line":"                        filter_properties, reservations, exc_info)"},{"line_number":768,"context_line":"        finally:"},{"line_number":769,"context_line":"            extra_usage_info \u003d dict("},{"line_number":770,"context_line":"                    new_instance_type\u003dflavor[\u0027name\u0027],"},{"line_number":771,"context_line":"                    new_instance_type_id\u003dflavor[\u0027id\u0027])"},{"line_number":772,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FPAw%3D","line":769,"updated":"2013-10-20 09:04:03.000000000","message":"please use {} instead of dict","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"9b6c12ea6e01fb9b34075d5f3bdffdf15fffd209","unresolved":false,"context_lines":[{"line_number":766,"context_line":"                self._reschedule_cold_migrate(context, instance, flavor,"},{"line_number":767,"context_line":"                        filter_properties, reservations, exc_info)"},{"line_number":768,"context_line":"        finally:"},{"line_number":769,"context_line":"            extra_usage_info \u003d dict("},{"line_number":770,"context_line":"                    new_instance_type\u003dflavor[\u0027name\u0027],"},{"line_number":771,"context_line":"                    new_instance_type_id\u003dflavor[\u0027id\u0027])"},{"line_number":772,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FMSI%3D","line":769,"in_reply_to":"AAAATH%2F%2FPAw%3D","updated":"2013-10-21 17:04:54.000000000","message":"Done","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b9bf98dd26383472d74e8db85a67bef379e92227","unresolved":false,"context_lines":[{"line_number":826,"context_line":"                    self.quotas.rollback(context, reservations)"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"    def _instance_update(self, context, instance_uuid, **kwargs):"},{"line_number":829,"context_line":"        (old_ref, instance_ref) \u003d self.db.instance_update_and_get_original("},{"line_number":830,"context_line":"                context, instance_uuid, kwargs)"},{"line_number":831,"context_line":"        notifications.send_update(context, old_ref, instance_ref, \u0027conductor\u0027)"},{"line_number":832,"context_line":"        return instance_ref"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FPAc%3D","line":829,"updated":"2013-10-20 09:04:03.000000000","message":"Could this be accessed via the instance objects?","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"9b6c12ea6e01fb9b34075d5f3bdffdf15fffd209","unresolved":false,"context_lines":[{"line_number":826,"context_line":"                    self.quotas.rollback(context, reservations)"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"    def _instance_update(self, context, instance_uuid, **kwargs):"},{"line_number":829,"context_line":"        (old_ref, instance_ref) \u003d self.db.instance_update_and_get_original("},{"line_number":830,"context_line":"                context, instance_uuid, kwargs)"},{"line_number":831,"context_line":"        notifications.send_update(context, old_ref, instance_ref, \u0027conductor\u0027)"},{"line_number":832,"context_line":"        return instance_ref"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATH%2F%2FMR8%3D","line":829,"in_reply_to":"AAAATH%2F%2FPAc%3D","updated":"2013-10-21 17:04:54.000000000","message":"Done","commit_id":"b07991caf4d78a485eefd5b056f684367f0a4f16"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7ae58c036059cee6006a91ab2f14cbab715f4e13","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import contextlib"},{"line_number":18,"context_line":"import sys"},{"line_number":19,"context_line":"import traceback"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from nova.api.ec2 import ec2utils"},{"line_number":22,"context_line":"from nova import block_device"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2FpeA%3D","line":19,"updated":"2013-10-30 22:16:08.000000000","message":"I would really like to not have this imported.  Does str(exception) not provide enough information?","commit_id":"3a993060fb0519c7d0aece84f76d3531c9bac067"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7ae58c036059cee6006a91ab2f14cbab715f4e13","unresolved":false,"context_lines":[{"line_number":669,"context_line":"            raise NotImplementedError()"},{"line_number":670,"context_line":""},{"line_number":671,"context_line":"    @contextlib.contextmanager"},{"line_number":672,"context_line":"    def _error_out_instance_on_exception(self, context, instance,"},{"line_number":673,"context_line":"                                        reservations\u003dNone):"},{"line_number":674,"context_line":"        try:"},{"line_number":675,"context_line":"            yield"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2Fpe4%3D","line":672,"updated":"2013-10-30 22:16:08.000000000","message":"I would rather not see this get copied over from the compute manager.  It doesn\u0027t need access to anything in the class except for the global QUOTAS object so it would be better moved out to a utility method.\n\nI\u0027m not really a fan of it at all actually and would rather see it split into two parts, one to deal with erroring an instance and another to deal with quotas.  But that\u0027s outside the scope of this.","commit_id":"3a993060fb0519c7d0aece84f76d3531c9bac067"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7ae58c036059cee6006a91ab2f14cbab715f4e13","unresolved":false,"context_lines":[{"line_number":708,"context_line":"        try:"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"            retry \u003d filter_properties.get(\u0027retry\u0027)"},{"line_number":711,"context_line":"            if not retry:"},{"line_number":712,"context_line":"                # no retry information, do not reschedule."},{"line_number":713,"context_line":"                LOG.debug(_(\"Retry info not present, will not reschedule\"),"},{"line_number":714,"context_line":"                        instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2FpeI%3D","line":711,"updated":"2013-10-30 22:16:08.000000000","message":"I\u0027m working to remove this paradigm from the spawn path and would prefer it to not be introduced here.","commit_id":"3a993060fb0519c7d0aece84f76d3531c9bac067"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"3e4f4c69be861bdf772a8aa8e86e23667bfa9e8f","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        self.quotas \u003d quota.QUOTAS"},{"line_number":641,"context_line":"        self.notifier \u003d notifier"},{"line_number":642,"context_line":"        self._conductor_manager \u003d None"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"    @property"},{"line_number":645,"context_line":"    def conductor_manager(self):"},{"line_number":646,"context_line":"        if self._conductor_manager is None:"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2BFAs%3D","line":643,"updated":"2013-12-02 19:46:58.000000000","message":"conductor_manager is not needed, see below.","commit_id":"8fe382df622c1f5372a61021b13bf0562ef961d4"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"3e4f4c69be861bdf772a8aa8e86e23667bfa9e8f","unresolved":false,"context_lines":[{"line_number":670,"context_line":"                               block_migration, disk_over_commit)"},{"line_number":671,"context_line":"        elif not live and not rebuild and flavor:"},{"line_number":672,"context_line":"            instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":673,"context_line":"            with compute_utils.EventReporter(context, self.conductor_manager,"},{"line_number":674,"context_line":"                                         \u0027cold_migrate\u0027, instance_uuid):"},{"line_number":675,"context_line":"                self._cold_migrate(context, instance, flavor,"},{"line_number":676,"context_line":"                                   scheduler_hint[\u0027filter_properties\u0027],"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2BFAY%3D","line":673,"updated":"2013-12-02 19:46:58.000000000","message":"No need to proxy through conductor since db access is allowed from here. Use self.db instead.\n\nActually, is this just in need of a rebase? It looks ok before this change.","commit_id":"8fe382df622c1f5372a61021b13bf0562ef961d4"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"3e4f4c69be861bdf772a8aa8e86e23667bfa9e8f","unresolved":false,"context_lines":[{"line_number":682,"context_line":"                                 filter_properties, reservations, exc_info):"},{"line_number":683,"context_line":"        instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":684,"context_line":"        compute_utils.add_instance_fault_from_exc("},{"line_number":685,"context_line":"                context, ConductorManager(),"},{"line_number":686,"context_line":"                instance, exc_info[0], exc_info\u003dexc_info)"},{"line_number":687,"context_line":"        try:"},{"line_number":688,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2BE%2F4%3D","line":685,"updated":"2013-12-02 19:46:58.000000000","message":"Same here, use self.db instead of ConductorManager().","commit_id":"8fe382df622c1f5372a61021b13bf0562ef961d4"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"cfe0d5ebd7a779f37d0053f27165d1af53f5b580","unresolved":false,"context_lines":[{"line_number":693,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":694,"context_line":"                raise exc_info[0], exc_info[1], exc_info[2]"},{"line_number":695,"context_line":""},{"line_number":696,"context_line":"            LOG.debug(_(\"Re-scheduling migrate server: attempt %(num)d\"),"},{"line_number":697,"context_line":"                      retry[\u0027num_attempts\u0027])"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"            # reset the task state:"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2BC1Q%3D","line":696,"updated":"2013-12-03 05:14:41.000000000","message":"the log message format is wrong, need a explicitly mapping name {\u0027num\u0027: retry[\u0027num_attempts\u0027]} or %s","commit_id":"8fe382df622c1f5372a61021b13bf0562ef961d4"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"3e4f4c69be861bdf772a8aa8e86e23667bfa9e8f","unresolved":false,"context_lines":[{"line_number":796,"context_line":""},{"line_number":797,"context_line":"            (host, node) \u003d (host_state[\u0027host\u0027], host_state[\u0027nodename\u0027])"},{"line_number":798,"context_line":"            with compute_utils.error_out_instance_on_exception("},{"line_number":799,"context_line":"                    context, instance, self.conductor_manager, reservations):"},{"line_number":800,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":801,"context_line":"                    host, reservations, request_spec, filter_properties, node)"},{"line_number":802,"context_line":"        except Exception as ex:"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2BFAA%3D","line":799,"updated":"2013-12-02 19:46:58.000000000","message":"Same here, use self.db instead.","commit_id":"8fe382df622c1f5372a61021b13bf0562ef961d4"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"b99384cf385d24e1a0fc3804cc7801de579568fc","unresolved":false,"context_lines":[{"line_number":675,"context_line":"                                 filter_properties, reservations, exc_info):"},{"line_number":676,"context_line":"        instance_uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":677,"context_line":"        compute_utils.add_instance_fault_from_exc("},{"line_number":678,"context_line":"                context, ConductorManager(),"},{"line_number":679,"context_line":"                instance, exc_info[0], exc_info\u003dexc_info)"},{"line_number":680,"context_line":"        try:"},{"line_number":681,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F9%2Fqo%3D","line":678,"updated":"2013-12-03 17:16:48.000000000","message":"still no need to proxy through conductor from here","commit_id":"b752d24b245ddd16c0c53c13977a5e0ce6263a86"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"b99384cf385d24e1a0fc3804cc7801de579568fc","unresolved":false,"context_lines":[{"line_number":738,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":739,"context_line":"                # try to re-schedule the resize elsewhere:"},{"line_number":740,"context_line":"                exc_info \u003d sys.exc_info()"},{"line_number":741,"context_line":"                self._reschedule_cold_migrate(context, instance, flavor,"},{"line_number":742,"context_line":"                        filter_properties, reservations, exc_info)"},{"line_number":743,"context_line":"        finally:"},{"line_number":744,"context_line":"            extra_usage_info \u003d {"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F9%2Fo0%3D","line":741,"updated":"2013-12-03 17:16:48.000000000","message":"what am I missing here?\n\non a reschedule attempt, the causing exception is still going to propagate since there is a save_and_reraise_exception() just above.\n\nif I read this correctly, it will lead to the instance being set to error state which I think will conflict with the rescheduling attempt.","commit_id":"b752d24b245ddd16c0c53c13977a5e0ce6263a86"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"b99384cf385d24e1a0fc3804cc7801de579568fc","unresolved":false,"context_lines":[{"line_number":788,"context_line":"            request_spec[\u0027instance_type\u0027].pop(\u0027extra_specs\u0027)"},{"line_number":789,"context_line":""},{"line_number":790,"context_line":"            (host, node) \u003d (host_state[\u0027host\u0027], host_state[\u0027nodename\u0027])"},{"line_number":791,"context_line":"            with compute_utils.error_out_instance_on_exception("},{"line_number":792,"context_line":"                    context, instance, reservations):"},{"line_number":793,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":794,"context_line":"                    host, reservations, request_spec, filter_properties, node)"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F9%2Fok%3D","line":791,"updated":"2013-12-03 17:16:48.000000000","message":"Here, the instance will be set to error on exception from the call to _prep_cold_migrate().","commit_id":"b752d24b245ddd16c0c53c13977a5e0ce6263a86"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"01abc24b4672745f44240c4de90c8706ca630090","unresolved":false,"context_lines":[{"line_number":788,"context_line":"            request_spec[\u0027instance_type\u0027].pop(\u0027extra_specs\u0027)"},{"line_number":789,"context_line":""},{"line_number":790,"context_line":"            (host, node) \u003d (host_state[\u0027host\u0027], host_state[\u0027nodename\u0027])"},{"line_number":791,"context_line":"            with compute_utils.error_out_instance_on_exception("},{"line_number":792,"context_line":"                    context, instance, reservations):"},{"line_number":793,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":794,"context_line":"                    host, reservations, request_spec, filter_properties, node)"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F97FA%3D","line":791,"in_reply_to":"AAAATn%2F9%2Fok%3D","updated":"2013-12-04 12:51:30.000000000","message":"I think this is what is expected according to what is implemented in compute/manager.py ... In case the re-scheduling does not work, the instance will be set to error.","commit_id":"b752d24b245ddd16c0c53c13977a5e0ce6263a86"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"ed0dc13bf2e393b374b7f671c27caec1c0535dd9","unresolved":false,"context_lines":[{"line_number":695,"context_line":"            if exc_info:"},{"line_number":696,"context_line":"                # stringify to avoid circular ref problem in"},{"line_number":697,"context_line":"                # json serialization:"},{"line_number":698,"context_line":"                retry[\u0027exc\u0027] \u003d traceback.format_exception(*exc_info)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"            self._cold_migrate(context, instance, flavor, filter_properties,"},{"line_number":701,"context_line":"                               reservations)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F96bw%3D","line":698,"updated":"2013-12-04 15:28:00.000000000","message":"What is retry for? It\u0027s currently not used anywhere?","commit_id":"acb6301a993601e5416da7b35bc2d38ee28a4933"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"c762890d1ddaad04495e9b705e58cadd48fefee5","unresolved":false,"context_lines":[{"line_number":695,"context_line":"            if exc_info:"},{"line_number":696,"context_line":"                # stringify to avoid circular ref problem in"},{"line_number":697,"context_line":"                # json serialization:"},{"line_number":698,"context_line":"                retry[\u0027exc\u0027] \u003d traceback.format_exception(*exc_info)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"            self._cold_migrate(context, instance, flavor, filter_properties,"},{"line_number":701,"context_line":"                               reservations)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F9t8Y%3D","line":698,"in_reply_to":"AAAATn%2F96bw%3D","updated":"2013-12-06 19:42:06.000000000","message":"It is the filter_properties key which is passed by reference to the cold_migrate method below.","commit_id":"acb6301a993601e5416da7b35bc2d38ee28a4933"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"12beb5c6f5f2176c1c44550dffaa628ce0e80ab3","unresolved":false,"context_lines":[{"line_number":695,"context_line":"            if exc_info:"},{"line_number":696,"context_line":"                # stringify to avoid circular ref problem in"},{"line_number":697,"context_line":"                # json serialization:"},{"line_number":698,"context_line":"                retry[\u0027exc\u0027] \u003d traceback.format_exception(*exc_info)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"            self._cold_migrate(context, instance, flavor, filter_properties,"},{"line_number":701,"context_line":"                               reservations)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F9tmA%3D","line":698,"in_reply_to":"AAAATn%2F9t8Y%3D","updated":"2013-12-06 21:03:39.000000000","message":"Yes, I can see that now, thanks.","commit_id":"acb6301a993601e5416da7b35bc2d38ee28a4933"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"ed0dc13bf2e393b374b7f671c27caec1c0535dd9","unresolved":false,"context_lines":[{"line_number":701,"context_line":"                               reservations)"},{"line_number":702,"context_line":""},{"line_number":703,"context_line":"            type_, value, tb \u003d exc_info"},{"line_number":704,"context_line":"            LOG.error(_(\u0027Error: %s\u0027) %"},{"line_number":705,"context_line":"                    traceback.format_exception(type_, value, tb),"},{"line_number":706,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":707,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F96aU%3D","line":704,"updated":"2013-12-04 15:28:00.000000000","message":"Should successful rescheduling log an error? Maybe warn or something else would be better.","commit_id":"acb6301a993601e5416da7b35bc2d38ee28a4933"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"c762890d1ddaad04495e9b705e58cadd48fefee5","unresolved":false,"context_lines":[{"line_number":701,"context_line":"                               reservations)"},{"line_number":702,"context_line":""},{"line_number":703,"context_line":"            type_, value, tb \u003d exc_info"},{"line_number":704,"context_line":"            LOG.error(_(\u0027Error: %s\u0027) %"},{"line_number":705,"context_line":"                    traceback.format_exception(type_, value, tb),"},{"line_number":706,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":707,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F9t7s%3D","line":704,"in_reply_to":"AAAATn%2F96aU%3D","updated":"2013-12-06 19:42:06.000000000","message":"This is the case where there is no more retry left and it has failed, so I think it should be an error.","commit_id":"acb6301a993601e5416da7b35bc2d38ee28a4933"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"12beb5c6f5f2176c1c44550dffaa628ce0e80ab3","unresolved":false,"context_lines":[{"line_number":701,"context_line":"                               reservations)"},{"line_number":702,"context_line":""},{"line_number":703,"context_line":"            type_, value, tb \u003d exc_info"},{"line_number":704,"context_line":"            LOG.error(_(\u0027Error: %s\u0027) %"},{"line_number":705,"context_line":"                    traceback.format_exception(type_, value, tb),"},{"line_number":706,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":707,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAATn%2F9tjM%3D","line":704,"in_reply_to":"AAAATn%2F9t7s%3D","updated":"2013-12-06 21:03:39.000000000","message":"I fail to see that, but maybe I am wrong.\nIf the call to self._cold_migrate() at L700 finishes without errors that would mean rescheduling was successful right? Won\u0027t we hit this line in that case?","commit_id":"acb6301a993601e5416da7b35bc2d38ee28a4933"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"0544cc7279f9a2040db3263f99e11a5a04f2bf52","unresolved":false,"context_lines":[{"line_number":790,"context_line":"                    context, instance, reservations):"},{"line_number":791,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":792,"context_line":"                    host, reservations, request_spec, filter_properties, node)"},{"line_number":793,"context_line":"        except Exception as ex:"},{"line_number":794,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":795,"context_line":"                updates \u003d {\u0027vm_state\u0027: instance[\u0027vm_state\u0027],"},{"line_number":796,"context_line":"                           \u0027task_state\u0027: None}"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F9tW8%3D","line":793,"updated":"2013-12-06 21:39:42.000000000","message":"This exception handler is now mostly redundant due to the above changes.\n\nThis is a bit problematic since it effectively reverts what Change-Id: I36e4ed3842d7e33c1082ec95f860629eee23224e just did (although I\u0027m not sure I fully agree on that change).","commit_id":"a2613ae0472a169b45fdc3617e82a65a4f68a350"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"a37f60e8341d549a0cd97d9e2f83476e37de2530","unresolved":false,"context_lines":[{"line_number":707,"context_line":"                               reservations)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"            type_, value, tb \u003d exc_info"},{"line_number":710,"context_line":"            LOG.error(_(\u0027Error: %s\u0027) %"},{"line_number":711,"context_line":"                    traceback.format_exception(type_, value, tb),"},{"line_number":712,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":713,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAU3%2F%2FmS8%3D","line":710,"updated":"2014-02-25 19:42:12.000000000","message":"Here, if rescheduling returns without raising an exception we log the exception that caused us to reschedule. From looking at _cold_migrate() below this can happen either if there are no more valid hosts or if rescheduling is successful.\n\nShould we really log this as an error? I see the need to log the error that caused us to reschedule but should the log-level really be error in case rescheduling was successfully carried out?","commit_id":"c513666d992fede3a831b985ec330c0d084d6008"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"5d1c0cb0cddcda0d872190d1eb94f5874386878e","unresolved":false,"context_lines":[{"line_number":707,"context_line":"                               reservations)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"            type_, value, tb \u003d exc_info"},{"line_number":710,"context_line":"            LOG.error(_(\u0027Error: %s\u0027) %"},{"line_number":711,"context_line":"                    traceback.format_exception(type_, value, tb),"},{"line_number":712,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":713,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAU3%2F%2Fa%2Bc%3D","line":710,"in_reply_to":"AAAAU3%2F%2FmS8%3D","updated":"2014-02-27 17:39:02.000000000","message":"Indeed. IMHO, we can use info or warn.","commit_id":"c513666d992fede3a831b985ec330c0d084d6008"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"a37f60e8341d549a0cd97d9e2f83476e37de2530","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            limits \u003d filter_properties.get(\u0027limits\u0027, {})"},{"line_number":740,"context_line":"            self.compute_rpcapi.resize_instance(context, instance,"},{"line_number":741,"context_line":"                    None, image_p, flavor, reservations, node, limits)"},{"line_number":742,"context_line":"        except Exception as ex:"},{"line_number":743,"context_line":"            # try to re-schedule the resize elsewhere:"},{"line_number":744,"context_line":"            exc_info \u003d sys.exc_info()"},{"line_number":745,"context_line":"            self._reschedule_cold_migrate(context, instance, flavor,"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAU3%2F%2FmoM%3D","line":742,"updated":"2014-02-25 19:42:12.000000000","message":"femtonit: ex is not used","commit_id":"c513666d992fede3a831b985ec330c0d084d6008"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"a37f60e8341d549a0cd97d9e2f83476e37de2530","unresolved":false,"context_lines":[{"line_number":797,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":798,"context_line":"                    host, reservations, request_spec, filter_properties, node)"},{"line_number":799,"context_line":"        except Exception as ex:"},{"line_number":800,"context_line":"            self._log_and_raise_migration_error(instance, host, ex)"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"    def _set_vm_state_and_notify(self, context, method, updates, ex,"},{"line_number":803,"context_line":"                                 request_spec):"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAU3%2F%2Flhw%3D","line":800,"updated":"2014-02-25 19:42:12.000000000","message":"Not sure if I read this correctly but if a final rescheduling attempt (a nested one) results in an exception that should return the instance back to active state (NotImplementedError or InstanceFaultRollback) it will be re-raised here as a MigrationError. When sent back up the chain, an outer error_out_on_exception() handler will get that MigrationError and instead set the instance to error.","commit_id":"c513666d992fede3a831b985ec330c0d084d6008"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"5d1c0cb0cddcda0d872190d1eb94f5874386878e","unresolved":false,"context_lines":[{"line_number":797,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":798,"context_line":"                    host, reservations, request_spec, filter_properties, node)"},{"line_number":799,"context_line":"        except Exception as ex:"},{"line_number":800,"context_line":"            self._log_and_raise_migration_error(instance, host, ex)"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"    def _set_vm_state_and_notify(self, context, method, updates, ex,"},{"line_number":803,"context_line":"                                 request_spec):"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAVX%2F%2F30w%3D","line":800,"in_reply_to":"AAAAU3%2F%2Flhw%3D","updated":"2014-02-27 17:39:02.000000000","message":"Indeed. I think the error_out_instance_on_exception should deal with the MigrationError as well.","commit_id":"c513666d992fede3a831b985ec330c0d084d6008"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"0d2acc0b4c8ae87221cab34adba0cd0350c57975","unresolved":false,"context_lines":[{"line_number":796,"context_line":"            with compute_utils.error_out_instance_on_exception("},{"line_number":797,"context_line":"                    context, instance, reservations):"},{"line_number":798,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":799,"context_line":"                    host, reservations, request_spec, filter_properties, node)"},{"line_number":800,"context_line":"        except Exception as ex:"},{"line_number":801,"context_line":"            self._log_and_raise_migration_error(instance, host, ex)"},{"line_number":802,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAVX%2F%2F3Mw%3D","line":799,"updated":"2014-02-27 18:40:15.000000000","message":"Maybe it would be better to handle the MigrationError here. What do you think? Just do\n\n except exception.MigrationError:\n     raise\n\nThis way, there is no extra logging per nested call plus I think the exception reason will be overwritten otherwise.","commit_id":"c338f8928a13e78891d60fe6de282549beb51993"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"531d3083cbb62391ca772458320e0222528d9382","unresolved":false,"context_lines":[{"line_number":796,"context_line":"            with compute_utils.error_out_instance_on_exception("},{"line_number":797,"context_line":"                    context, instance, reservations):"},{"line_number":798,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":799,"context_line":"                    host, reservations, request_spec, filter_properties, node)"},{"line_number":800,"context_line":"        except Exception as ex:"},{"line_number":801,"context_line":"            self._log_and_raise_migration_error(instance, host, ex)"},{"line_number":802,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAVX%2F%2Fwe4%3D","line":799,"in_reply_to":"AAAAVX%2F%2F3Mw%3D","updated":"2014-02-28 16:03:12.000000000","message":"Indeed.","commit_id":"c338f8928a13e78891d60fe6de282549beb51993"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ad4453902c30507285e7cec3520d1b0731ccc227","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        self.scheduler_rpcapi \u003d scheduler_rpcapi.SchedulerAPI()"},{"line_number":646,"context_line":"        self.image_service \u003d glance.get_default_image_service()"},{"line_number":647,"context_line":"        self.quotas \u003d quota.QUOTAS"},{"line_number":648,"context_line":"        self.notifier \u003d notifier"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    @messaging.expected_exceptions(exception.NoValidHost,"},{"line_number":651,"context_line":"                                   exception.ComputeServiceUnavailable,"}],"source_content_type":"text/x-python","patch_set":36,"id":"AAAAVn%2F%2F5Tk%3D","line":648,"updated":"2014-03-03 15:32:06.000000000","message":"should it not have its own notifier?","commit_id":"b37b863fb6731abfd974a5c69222a18208f9fb08"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"62479295c283729101870c4c28c6dcfa22e0dc1c","unresolved":false,"context_lines":[{"line_number":805,"context_line":"                self._prep_cold_migrate(context, instance, image, flavor,"},{"line_number":806,"context_line":"                    host, reservations, request_spec, filter_properties, node)"},{"line_number":807,"context_line":"        except exception.MigrationError:"},{"line_number":808,"context_line":"            raise"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def _set_vm_state_and_notify(self, context, method, updates, ex,"},{"line_number":811,"context_line":"                                 request_spec):"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAVn%2F%2F0xI%3D","line":808,"updated":"2014-03-03 22:53:45.000000000","message":"What happened to the catch-all handler from your previous patches?\n\nThat one is needed or otherwise MigrationError will never be raised.","commit_id":"a0b77420e4ba8345367d3ac2e792ed2839629259"}],"nova/tests/conductor/test_conductor.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"53be79703139f0b97f48991cfee31532e0066a35","unresolved":false,"context_lines":[{"line_number":1756,"context_line":"                          filter_props, resvs)"},{"line_number":1757,"context_line":""},{"line_number":1758,"context_line":"    def test_prep_cold_migrate(self):"},{"line_number":1759,"context_line":"        self.mox.StubOutWithMock(compute_utils, \u0027notify_usage_exists\u0027)"},{"line_number":1760,"context_line":"        self.mox.StubOutWithMock(compute_utils, \u0027notify_about_instance_usage\u0027)"},{"line_number":1761,"context_line":"        self.mox.StubOutWithMock(self.conductor.compute_rpcapi,"},{"line_number":1762,"context_line":"                                 \u0027resize_instance\u0027)"}],"source_content_type":"text/x-python","patch_set":30,"id":"AAAAUH%2F%2FlKM%3D","line":1759,"updated":"2014-01-10 20:02:08.000000000","message":"I\u0027d like to encourage you to write the new tests with mock instead of self.mox.  I don\u0027t necessarily mean the existing tests should be rewritten to use mock, though you may do so if you wish.","commit_id":"8a4375ccb1ff4af2453e42ba57a2c4e2f3b4f40b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f6d9fddc0c30ce754f9adfa12e7c6e12ca283cf2","unresolved":false,"context_lines":[{"line_number":1760,"context_line":"            yield"},{"line_number":1761,"context_line":""},{"line_number":1762,"context_line":"        compute_utils.error_out_instance_on_exception \u003d \\"},{"line_number":1763,"context_line":"            _fake_error_out_instance_on_exception"},{"line_number":1764,"context_line":""},{"line_number":1765,"context_line":"        self.conductor_manager._prep_cold_migrate("},{"line_number":1766,"context_line":"            self.context, inst_obj, image, \u0027flavor\u0027, hosts[0][\u0027host\u0027], resvs,"}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAUX%2F%2Fx%2F4%3D","line":1763,"updated":"2014-02-10 21:04:50.000000000","message":"This really should use a stub or a mock, not a bare assignment like this…","commit_id":"c9b650328c0987e6579e9eaaa45d8857b1f9c50d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"638e3281fb06ab94b98679dec63224348284672e","unresolved":false,"context_lines":[{"line_number":1786,"context_line":"                          filter_props, resvs)"},{"line_number":1787,"context_line":""},{"line_number":1788,"context_line":"    def test_prep_cold_migrate(self):"},{"line_number":1789,"context_line":"        self.mox.StubOutWithMock(compute_utils, \u0027notify_usage_exists\u0027)"},{"line_number":1790,"context_line":"        self.mox.StubOutWithMock(compute_utils, \u0027notify_about_instance_usage\u0027)"},{"line_number":1791,"context_line":"        self.mox.StubOutWithMock(self.conductor.compute_rpcapi,"},{"line_number":1792,"context_line":"                                 \u0027resize_instance\u0027)"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAU3%2F%2Fymc%3D","line":1789,"updated":"2014-02-24 19:17:13.000000000","message":"New tests are encouraged to use mock in preference to mox (femtonit)","commit_id":"c513666d992fede3a831b985ec330c0d084d6008"}]}
