)]}'
{"nova/compute/api.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"ef129f19e5653954e71b19c1dc3cfd27c4fb220e","unresolved":false,"context_lines":[{"line_number":1462,"context_line":""},{"line_number":1463,"context_line":"            if instance[\u0027vm_state\u0027] \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1464,"context_line":"                #If instance state is SHELVED_OFFLOADED, instance[\u0027host\u0027] is"},{"line_number":1465,"context_line":"                #None, use local_delete to clean up its bdms and network info."},{"line_number":1466,"context_line":"                self._local_delete(context, instance, bdms, delete_type, cb)"},{"line_number":1467,"context_line":"                if reservations:"},{"line_number":1468,"context_line":"                    QUOTAS.commit(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FfpQ%3D","line":1465,"updated":"2014-04-21 10:19:37.000000000","message":"#[blank]","commit_id":"e532cb2e638fbd7685080b7e47954caa1a78bf55"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"ef129f19e5653954e71b19c1dc3cfd27c4fb220e","unresolved":false,"context_lines":[{"line_number":1470,"context_line":"                                  project_id\u003dproject_id,"},{"line_number":1471,"context_line":"                                  user_id\u003duser_id)"},{"line_number":1472,"context_line":"                    reservations \u003d None"},{"line_number":1473,"context_line":"                    return"},{"line_number":1474,"context_line":"            if not host:"},{"line_number":1475,"context_line":"                try:"},{"line_number":1476,"context_line":"                    compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2Fffw%3D","line":1473,"updated":"2014-04-21 10:19:37.000000000","message":"this return should be move 4 indent ?","commit_id":"e532cb2e638fbd7685080b7e47954caa1a78bf55"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"9626e5937d0197571d91f53691091db8ecfcfe50","unresolved":false,"context_lines":[{"line_number":1452,"context_line":"                                  user_id\u003duser_id)"},{"line_number":1453,"context_line":"                return"},{"line_number":1454,"context_line":"            shelved_offloaded \u003d \\"},{"line_number":1455,"context_line":"                instance[\u0027vm_state\u0027] \u003d\u003d vm_states.SHELVED_OFFLOADED"},{"line_number":1456,"context_line":"            if not host and not shelved_offloaded:"},{"line_number":1457,"context_line":"                try:"},{"line_number":1458,"context_line":"                    compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_074aeeab","line":1455,"updated":"2014-05-12 02:00:15.000000000","message":"I was told that the \u0027\\\u0027 may lead to rebase issue :)\nis it possible to change?","commit_id":"65bc90bd3eb9f967a5b44a5e0e496abdd77e8014"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3bd01808613386bf2a65cc990b96230f07c755a8","unresolved":false,"context_lines":[{"line_number":1452,"context_line":"                                  user_id\u003duser_id)"},{"line_number":1453,"context_line":"                return"},{"line_number":1454,"context_line":"            shelved_offloaded \u003d \\"},{"line_number":1455,"context_line":"                instance[\u0027vm_state\u0027] \u003d\u003d vm_states.SHELVED_OFFLOADED"},{"line_number":1456,"context_line":"            if not host and not shelved_offloaded:"},{"line_number":1457,"context_line":"                try:"},{"line_number":1458,"context_line":"                    compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_ca464d21","line":1455,"in_reply_to":"7adec928_074aeeab","updated":"2014-05-12 04:04:33.000000000","message":"thanks, done","commit_id":"65bc90bd3eb9f967a5b44a5e0e496abdd77e8014"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"9626e5937d0197571d91f53691091db8ecfcfe50","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"                    service \u003d service_obj.Service.get_by_compute_host("},{"line_number":1482,"context_line":"                        context.elevated(), instance.host)"},{"line_number":1483,"context_line":"                    is_local \u003d not self.servicegroup_api.service_is_up(service)"},{"line_number":1484,"context_line":"                if not is_local:"},{"line_number":1485,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1486,"context_line":"                                                  task_states.SOFT_DELETING):"},{"line_number":1487,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_a7021a3c","line":1484,"updated":"2014-05-12 02:00:15.000000000","message":"is it possible that VM in \u0027SHELVED_OFFLOAD\" vm_state \nin DELETING task state?","commit_id":"65bc90bd3eb9f967a5b44a5e0e496abdd77e8014"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"6ca947aa1fd4d3c1cf40906d928b09c82dca12fa","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"                    service \u003d service_obj.Service.get_by_compute_host("},{"line_number":1482,"context_line":"                        context.elevated(), instance.host)"},{"line_number":1483,"context_line":"                    is_local \u003d not self.servicegroup_api.service_is_up(service)"},{"line_number":1484,"context_line":"                if not is_local:"},{"line_number":1485,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1486,"context_line":"                                                  task_states.SOFT_DELETING):"},{"line_number":1487,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_4d9fb7b4","line":1484,"in_reply_to":"7adec928_a7021a3c","updated":"2014-05-12 06:32:37.000000000","message":"But for PS5, jenkins run failed, because when instance in \"DELETING\" task_state, (it may because the stuck in DELETING while the compute service down.) it can accept a second deleting request to deleting the instance info in db.","commit_id":"65bc90bd3eb9f967a5b44a5e0e496abdd77e8014"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3bd01808613386bf2a65cc990b96230f07c755a8","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"                    service \u003d service_obj.Service.get_by_compute_host("},{"line_number":1482,"context_line":"                        context.elevated(), instance.host)"},{"line_number":1483,"context_line":"                    is_local \u003d not self.servicegroup_api.service_is_up(service)"},{"line_number":1484,"context_line":"                if not is_local:"},{"line_number":1485,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1486,"context_line":"                                                  task_states.SOFT_DELETING):"},{"line_number":1487,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_6a10d901","line":1484,"in_reply_to":"7adec928_a7021a3c","updated":"2014-05-12 04:04:33.000000000","message":"It seem has the possibility, even though the local deleting is in short time. it better to allow the checking:)\n\nthanks for pointing out that.","commit_id":"65bc90bd3eb9f967a5b44a5e0e496abdd77e8014"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"9626e5937d0197571d91f53691091db8ecfcfe50","unresolved":false,"context_lines":[{"line_number":1616,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1617,"context_line":"        if instance[\u0027vm_state\u0027] \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1618,"context_line":"            LOG.warning(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1619,"context_line":"                          \" the instance\u0027s info from datebase.\"),"},{"line_number":1620,"context_line":"                        instance\u003dinstance)"},{"line_number":1621,"context_line":"        else:"},{"line_number":1622,"context_line":"            LOG.warning(_(\"instance\u0027s host %s is down, deleting from \""}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_27c8ca21","line":1619,"updated":"2014-05-12 02:00:15.000000000","message":"database","commit_id":"65bc90bd3eb9f967a5b44a5e0e496abdd77e8014"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"71ed048b74ae08ec1f56992a0ba1f7deec83d515","unresolved":false,"context_lines":[{"line_number":1619,"context_line":"                        instance\u003dinstance)"},{"line_number":1620,"context_line":"        else:"},{"line_number":1621,"context_line":"            LOG.warning(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1622,"context_line":"                        \"database\") % instance[\u0027host\u0027], instance\u003dinstance)"},{"line_number":1623,"context_line":"        instance.info_cache.delete()"},{"line_number":1624,"context_line":"        compute_utils.notify_about_instance_usage("},{"line_number":1625,"context_line":"            self.notifier, context, instance, \"%s.start\" % delete_type)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ae8d1ca_dcc66249","line":1622,"updated":"2014-05-27 09:30:30.000000000","message":"guess we need to use the new log style?\nand I saw someone is using warn to replace warning...","commit_id":"407cda2ec7d1f2bbf8399eeec11de183e1bcebd8"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3a5c83dcf1c98828ddf36f573f19f4a93169a44f","unresolved":false,"context_lines":[{"line_number":1619,"context_line":"                        instance\u003dinstance)"},{"line_number":1620,"context_line":"        else:"},{"line_number":1621,"context_line":"            LOG.warning(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1622,"context_line":"                        \"database\") % instance[\u0027host\u0027], instance\u003dinstance)"},{"line_number":1623,"context_line":"        instance.info_cache.delete()"},{"line_number":1624,"context_line":"        compute_utils.notify_about_instance_usage("},{"line_number":1625,"context_line":"            self.notifier, context, instance, \"%s.start\" % delete_type)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ae8d1ca_6003c3b8","line":1622,"in_reply_to":"3ae8d1ca_dcc66249","updated":"2014-05-28 01:46:45.000000000","message":"thanks for pointing out. Done","commit_id":"407cda2ec7d1f2bbf8399eeec11de183e1bcebd8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ed0c37eda0ab8b883b561f1d98928b94326b9b51","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"        return reservations"},{"line_number":1613,"context_line":""},{"line_number":1614,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1615,"context_line":"        if instance[\u0027vm_state\u0027] \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1616,"context_line":"            LOG.warn(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1617,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1618,"context_line":"                     instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_38cd6b32","line":1615,"updated":"2014-05-28 07:30:44.000000000","message":"th einstance is an object. please use instance.vm_state (similar for the changes below)","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2658855f7af34445e61f3f8dfa1acc85f4e55287","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"        return reservations"},{"line_number":1613,"context_line":""},{"line_number":1614,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1615,"context_line":"        if instance[\u0027vm_state\u0027] \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1616,"context_line":"            LOG.warn(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1617,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1618,"context_line":"                     instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_30ff1bac","line":1615,"in_reply_to":"3ae8d1ca_38cd6b32","updated":"2014-05-29 03:51:39.000000000","message":"thanks, Done","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ed0c37eda0ab8b883b561f1d98928b94326b9b51","unresolved":false,"context_lines":[{"line_number":1618,"context_line":"                     instance\u003dinstance)"},{"line_number":1619,"context_line":"        else:"},{"line_number":1620,"context_line":"            LOG.warn(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1621,"context_line":"                       \"database\") % instance[\u0027host\u0027], instance\u003dinstance)"},{"line_number":1622,"context_line":"        instance.info_cache.delete()"},{"line_number":1623,"context_line":"        compute_utils.notify_about_instance_usage("},{"line_number":1624,"context_line":"            self.notifier, context, instance, \"%s.start\" % delete_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_986d9f35","line":1621,"updated":"2014-05-28 07:30:44.000000000","message":"please use a , instead of the %","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2658855f7af34445e61f3f8dfa1acc85f4e55287","unresolved":false,"context_lines":[{"line_number":1618,"context_line":"                     instance\u003dinstance)"},{"line_number":1619,"context_line":"        else:"},{"line_number":1620,"context_line":"            LOG.warn(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1621,"context_line":"                       \"database\") % instance[\u0027host\u0027], instance\u003dinstance)"},{"line_number":1622,"context_line":"        instance.info_cache.delete()"},{"line_number":1623,"context_line":"        compute_utils.notify_about_instance_usage("},{"line_number":1624,"context_line":"            self.notifier, context, instance, \"%s.start\" % delete_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_90270f64","line":1621,"in_reply_to":"3ae8d1ca_986d9f35","updated":"2014-05-29 03:51:39.000000000","message":"thanks Done","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ed0c37eda0ab8b883b561f1d98928b94326b9b51","unresolved":false,"context_lines":[{"line_number":1633,"context_line":"            orig_host \u003d instance[\u0027host\u0027]"},{"line_number":1634,"context_line":"            try:"},{"line_number":1635,"context_line":"                if instance[\u0027vm_state\u0027] \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1636,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1637,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1638,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1639,"context_line":"                                                         instance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_58d237d3","line":1636,"updated":"2014-05-28 07:30:44.000000000","message":"do we need to do an instance.save here?","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2658855f7af34445e61f3f8dfa1acc85f4e55287","unresolved":false,"context_lines":[{"line_number":1633,"context_line":"            orig_host \u003d instance[\u0027host\u0027]"},{"line_number":1634,"context_line":"            try:"},{"line_number":1635,"context_line":"                if instance[\u0027vm_state\u0027] \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1636,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1637,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1638,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1639,"context_line":"                                                         instance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_30c47b5e","line":1636,"in_reply_to":"3ae8d1ca_58d237d3","updated":"2014-05-29 03:51:39.000000000","message":"here just set the instance[\u0027host\u0027] for nova-network rpc call in multi_host scenario, please see:\nhttps://github.com/openstack/nova/blob/master/nova/network/rpcapi.py#L194\n\nthe instance in SHELVE_OFFLOADED state, the instance.host is None (to schedule and choice an host if *unshelve*), so use try...finally clause, so here, I think it don\u0027t need \"instance.save\"","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ed0c37eda0ab8b883b561f1d98928b94326b9b51","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1639,"context_line":"                                                         instance)"},{"line_number":1640,"context_line":"            finally:"},{"line_number":1641,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1642,"context_line":""},{"line_number":1643,"context_line":"        # cleanup volumes"},{"line_number":1644,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_18efcf88","line":1641,"updated":"2014-05-28 07:30:44.000000000","message":"please use instance.host","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2658855f7af34445e61f3f8dfa1acc85f4e55287","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1639,"context_line":"                                                         instance)"},{"line_number":1640,"context_line":"            finally:"},{"line_number":1641,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1642,"context_line":""},{"line_number":1643,"context_line":"        # cleanup volumes"},{"line_number":1644,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_d0951741","line":1641,"in_reply_to":"3ae8d1ca_18efcf88","updated":"2014-05-29 03:51:39.000000000","message":"for the github code url in above reply, here should use instance[\u0027host\u0027] not the instance.host","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ff33db4bae959a8d55fac7b6b3f9c22acad07fd4","unresolved":false,"context_lines":[{"line_number":1487,"context_line":"                    service \u003d service_obj.Service.get_by_compute_host("},{"line_number":1488,"context_line":"                        context.elevated(), instance.host)"},{"line_number":1489,"context_line":"                    is_local \u003d not self.servicegroup_api.service_is_up(service)"},{"line_number":1490,"context_line":"                if not is_local:"},{"line_number":1491,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1492,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1493,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_5f46af22","line":1490,"updated":"2014-06-16 15:48:07.000000000","message":"-ETOOMANYNEGATIONS\n\nThat made my head hurt. Suggests \u0027is_local\u0027 is the wrong selector. What was wrong with \u0027is_up\u0027? How about \u0027has_host\u0027?","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"583bab2fb4cda3d03e4775a165654bfb594b2853","unresolved":false,"context_lines":[{"line_number":1487,"context_line":"                    service \u003d service_obj.Service.get_by_compute_host("},{"line_number":1488,"context_line":"                        context.elevated(), instance.host)"},{"line_number":1489,"context_line":"                    is_local \u003d not self.servicegroup_api.service_is_up(service)"},{"line_number":1490,"context_line":"                if not is_local:"},{"line_number":1491,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1492,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1493,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_86f61e8f","line":1490,"in_reply_to":"1ae5cdf2_5f46af22","updated":"2014-06-17 04:04:56.000000000","message":"well, the \"is_up\" flag means *not* servicegroup_api.service_is_up; but here if the instance in SHELVED_OFFLOADED state, the instance[\u0027host\u0027] is None, so use \"is_local\" to include these 2 scearios. the \u0027has_host\u0027 is also a bit unreasonable, the instance.host may be not None, but the service is not up.","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"62f9a293f71ce143499a49aafbc9f07e9f6fba3a","unresolved":false,"context_lines":[{"line_number":1487,"context_line":"                    service \u003d service_obj.Service.get_by_compute_host("},{"line_number":1488,"context_line":"                        context.elevated(), instance.host)"},{"line_number":1489,"context_line":"                    is_local \u003d not self.servicegroup_api.service_is_up(service)"},{"line_number":1490,"context_line":"                if not is_local:"},{"line_number":1491,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1492,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1493,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_b86e6494","line":1490,"in_reply_to":"1ae5cdf2_5f94d08b","updated":"2014-06-19 07:00:32.000000000","message":"yeah, maybe \"is_local_delete\" better?","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"86b5569053afa33a3dc4cd81de188074cedf2dd3","unresolved":false,"context_lines":[{"line_number":1487,"context_line":"                    service \u003d service_obj.Service.get_by_compute_host("},{"line_number":1488,"context_line":"                        context.elevated(), instance.host)"},{"line_number":1489,"context_line":"                    is_local \u003d not self.servicegroup_api.service_is_up(service)"},{"line_number":1490,"context_line":"                if not is_local:"},{"line_number":1491,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1492,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1493,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_5f94d08b","line":1490,"in_reply_to":"1ae5cdf2_86f61e8f","updated":"2014-06-17 08:58:05.000000000","message":"It\u0027s hard to read, which suggests that there\u0027s either a better name or flow here. However, I\u0027d call it a nit.","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ff33db4bae959a8d55fac7b6b3f9c22acad07fd4","unresolved":false,"context_lines":[{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1622,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1623,"context_line":"            LOG.warn(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1624,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1625,"context_line":"                     instance\u003dinstance)"},{"line_number":1626,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_bf025370","line":1623,"updated":"2014-06-16 15:48:07.000000000","message":"Should this be a warning? Sounds like something the user has done deliberately.","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"86b5569053afa33a3dc4cd81de188074cedf2dd3","unresolved":false,"context_lines":[{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1622,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1623,"context_line":"            LOG.warn(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1624,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1625,"context_line":"                     instance\u003dinstance)"},{"line_number":1626,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_848451b2","line":1623,"in_reply_to":"1ae5cdf2_2481bdfb","updated":"2014-06-17 08:58:05.000000000","message":"Yeah, I was suggesting that it should be info at most. You don\u0027t really want to write a warning to the log for something the user has done deliberately. Appreciate that\u0027s what it did before, but you\u0027re fixing it, right?","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"62f9a293f71ce143499a49aafbc9f07e9f6fba3a","unresolved":false,"context_lines":[{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1622,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1623,"context_line":"            LOG.warn(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1624,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1625,"context_line":"                     instance\u003dinstance)"},{"line_number":1626,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_b8c66447","line":1623,"in_reply_to":"1ae5cdf2_848451b2","updated":"2014-06-19 07:00:32.000000000","message":"Done, thanks :)","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"0bdc0915c01e764ab22a608a5d3f4eb24e84ed44","unresolved":false,"context_lines":[{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1622,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1623,"context_line":"            LOG.warn(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1624,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1625,"context_line":"                     instance\u003dinstance)"},{"line_number":1626,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_2481bdfb","line":1623,"in_reply_to":"1ae5cdf2_8959ca5d","updated":"2014-06-17 08:36:46.000000000","message":"Maybe, here use warn just keep consistent with previous code, and I personally think here should be warning for this deleting process is a little unconventional. maybe.. I didn\u0027t got Matthew Booth\u0027s point :(","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"8494abb89cede2826dad32092731cf2898c9af95","unresolved":false,"context_lines":[{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1622,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1623,"context_line":"            LOG.warn(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1624,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1625,"context_line":"                     instance\u003dinstance)"},{"line_number":1626,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_8959ca5d","line":1623,"in_reply_to":"1ae5cdf2_a6fdda3d","updated":"2014-06-17 08:21:01.000000000","message":"Guess Matt suggest it to be a info or debug \ninstead of warning...","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"583bab2fb4cda3d03e4775a165654bfb594b2853","unresolved":false,"context_lines":[{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1622,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1623,"context_line":"            LOG.warn(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1624,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1625,"context_line":"                     instance\u003dinstance)"},{"line_number":1626,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_a6fdda3d","line":1623,"in_reply_to":"1ae5cdf2_bf025370","updated":"2014-06-17 04:04:56.000000000","message":"you mean change about warning-\u003ewarn? in PS8 jichenjc has pointed out that there is a new log style, I I remember also :)","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ff33db4bae959a8d55fac7b6b3f9c22acad07fd4","unresolved":false,"context_lines":[{"line_number":1641,"context_line":"            try:"},{"line_number":1642,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1643,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1644,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1645,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1646,"context_line":"                                                         instance)"},{"line_number":1647,"context_line":"            finally:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_5fd6afc4","line":1644,"updated":"2014-06-16 15:48:07.000000000","message":"Eww...  This looks like a failure of the deallocate_for_instance() api. Have you looked at changing it to add an optional host parameter? I appreciate that would have significant bureaucratic overhead.","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"62f9a293f71ce143499a49aafbc9f07e9f6fba3a","unresolved":false,"context_lines":[{"line_number":1641,"context_line":"            try:"},{"line_number":1642,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1643,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1644,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1645,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1646,"context_line":"                                                         instance)"},{"line_number":1647,"context_line":"            finally:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_5ba1daf5","line":1644,"in_reply_to":"1ae5cdf2_2411bd5d","updated":"2014-06-19 07:00:32.000000000","message":"Sorry, I haven\u0027t got you meaning clearly:(, did you mean there is another patch is changing the deallocate_for_instance() method to add a \"host\" parameter? and we should wait the merging?","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"86b5569053afa33a3dc4cd81de188074cedf2dd3","unresolved":false,"context_lines":[{"line_number":1641,"context_line":"            try:"},{"line_number":1642,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1643,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1644,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1645,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1646,"context_line":"                                                         instance)"},{"line_number":1647,"context_line":"            finally:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_2411bd5d","line":1644,"in_reply_to":"1ae5cdf2_463a56e8","updated":"2014-06-17 08:58:05.000000000","message":"By \u0027failure\u0027 I meant that the api isn\u0027t sufficiently expressive to cover its valid uses cases, hence this little dance. If you can\u0027t guarantee to get the host from the instance in all cases, assuming you can would be a bug.\n\nHowever, I wouldn\u0027t want to hold up a real fix while waiting on an api change!","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"c76d97930c7d2abb6964abb9632cdc521089fedd","unresolved":false,"context_lines":[{"line_number":1641,"context_line":"            try:"},{"line_number":1642,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1643,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1644,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1645,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1646,"context_line":"                                                         instance)"},{"line_number":1647,"context_line":"            finally:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_ed65f1e2","line":1644,"in_reply_to":"1ae5cdf2_5ba1daf5","updated":"2014-06-24 16:00:15.000000000","message":"I\u0027m not aware of anything pending. The code is ugly, but I don\u0027t think there\u0027s anything you can do about it in this patch. This is fine, imho.","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"583bab2fb4cda3d03e4775a165654bfb594b2853","unresolved":false,"context_lines":[{"line_number":1641,"context_line":"            try:"},{"line_number":1642,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1643,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1644,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1645,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1646,"context_line":"                                                         instance)"},{"line_number":1647,"context_line":"            finally:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_463a56e8","line":1644,"in_reply_to":"1ae5cdf2_5fd6afc4","updated":"2014-06-17 04:04:56.000000000","message":"generally, the host parameter is exist and not None, so there is no failure of deallocate_for_instance() api, only in SHELVED_OFFLOADED instance state, the instance[\u0027host\u0027] is *None*, here changes just for nova-network sceanron.","commit_id":"ff4dedba12315e8d22d4378153fbc9877211cd1c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"84548570901af03e5772bf003a668f84653fcdf2","unresolved":false,"context_lines":[{"line_number":1446,"context_line":"                                  project_id\u003dproject_id,"},{"line_number":1447,"context_line":"                                  user_id\u003duser_id)"},{"line_number":1448,"context_line":"                return"},{"line_number":1449,"context_line":"            shelved_offloaded \u003d (instance[\u0027vm_state\u0027]"},{"line_number":1450,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1451,"context_line":"            if not host and not shelved_offloaded:"},{"line_number":1452,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_5d5124d7","line":1449,"updated":"2014-07-02 07:17:11.000000000","message":"why not use instance.vm_state here?","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2966934b5e8914e7bbf1237c4b0418e7d88e4241","unresolved":false,"context_lines":[{"line_number":1446,"context_line":"                                  project_id\u003dproject_id,"},{"line_number":1447,"context_line":"                                  user_id\u003duser_id)"},{"line_number":1448,"context_line":"                return"},{"line_number":1449,"context_line":"            shelved_offloaded \u003d (instance[\u0027vm_state\u0027]"},{"line_number":1450,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1451,"context_line":"            if not host and not shelved_offloaded:"},{"line_number":1452,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_9605597c","line":1449,"in_reply_to":"baada198_5d5124d7","updated":"2014-07-02 08:58:26.000000000","message":"it is my mistake, Done","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"84548570901af03e5772bf003a668f84653fcdf2","unresolved":false,"context_lines":[{"line_number":1608,"context_line":""},{"line_number":1609,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1610,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1611,"context_line":"            LOG.info(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1612,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1613,"context_line":"                     instance\u003dinstance)"},{"line_number":1614,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_dd5c54f0","line":1611,"updated":"2014-07-02 07:17:11.000000000","message":"please use the translation hint _LI","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2966934b5e8914e7bbf1237c4b0418e7d88e4241","unresolved":false,"context_lines":[{"line_number":1608,"context_line":""},{"line_number":1609,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1610,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1611,"context_line":"            LOG.info(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1612,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1613,"context_line":"                     instance\u003dinstance)"},{"line_number":1614,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_36f48d86","line":1611,"in_reply_to":"baada198_dd5c54f0","updated":"2014-07-02 08:58:26.000000000","message":"Did nova need patches or bp to uniformly do the changes about log translation?","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"84548570901af03e5772bf003a668f84653fcdf2","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1613,"context_line":"                     instance\u003dinstance)"},{"line_number":1614,"context_line":"        else:"},{"line_number":1615,"context_line":"            LOG.warn(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1616,"context_line":"                       \"database\"), instance.host, instance\u003dinstance)"},{"line_number":1617,"context_line":"        instance.info_cache.delete()"},{"line_number":1618,"context_line":"        compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_fd72f87a","line":1615,"updated":"2014-07-02 07:17:11.000000000","message":"_LW","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2966934b5e8914e7bbf1237c4b0418e7d88e4241","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1613,"context_line":"                     instance\u003dinstance)"},{"line_number":1614,"context_line":"        else:"},{"line_number":1615,"context_line":"            LOG.warn(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1616,"context_line":"                       \"database\"), instance.host, instance\u003dinstance)"},{"line_number":1617,"context_line":"        instance.info_cache.delete()"},{"line_number":1618,"context_line":"        compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_363bad39","line":1615,"in_reply_to":"baada198_fd72f87a","updated":"2014-07-02 08:58:26.000000000","message":"Done","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"84548570901af03e5772bf003a668f84653fcdf2","unresolved":false,"context_lines":[{"line_number":1628,"context_line":"            orig_host \u003d instance.host"},{"line_number":1629,"context_line":"            try:"},{"line_number":1630,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1631,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1632,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1633,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1634,"context_line":"                                                         instance)"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_5d684487","line":1631,"updated":"2014-07-02 07:17:11.000000000","message":"why not instance.host?","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2966934b5e8914e7bbf1237c4b0418e7d88e4241","unresolved":false,"context_lines":[{"line_number":1628,"context_line":"            orig_host \u003d instance.host"},{"line_number":1629,"context_line":"            try:"},{"line_number":1630,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1631,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1632,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1633,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1634,"context_line":"                                                         instance)"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_9632b90e","line":1631,"in_reply_to":"baada198_5d684487","updated":"2014-07-02 08:58:26.000000000","message":"well, I have replied you about the same question in PS9, haha :)\nhttps://review.openstack.org/#/c/89298/9/nova/compute/api.py","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"84548570901af03e5772bf003a668f84653fcdf2","unresolved":false,"context_lines":[{"line_number":1633,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1634,"context_line":"                                                         instance)"},{"line_number":1635,"context_line":"            finally:"},{"line_number":1636,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"        # cleanup volumes"},{"line_number":1639,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_9d09fcdf","line":1636,"updated":"2014-07-02 07:17:11.000000000","message":"ditto","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2966934b5e8914e7bbf1237c4b0418e7d88e4241","unresolved":false,"context_lines":[{"line_number":1633,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1634,"context_line":"                                                         instance)"},{"line_number":1635,"context_line":"            finally:"},{"line_number":1636,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"        # cleanup volumes"},{"line_number":1639,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_f63f75d4","line":1636,"in_reply_to":"baada198_9d09fcdf","updated":"2014-07-02 08:58:26.000000000","message":"ditto","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"84548570901af03e5772bf003a668f84653fcdf2","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"                                                         instance)"},{"line_number":1635,"context_line":"            finally:"},{"line_number":1636,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"        # cleanup volumes"},{"line_number":1639,"context_line":"        for bdm in bdms:"},{"line_number":1640,"context_line":"            if bdm.is_volume:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_bd108002","line":1637,"updated":"2014-07-02 07:17:11.000000000","message":"if you are changing the instance why are you not doing an instance.save()?","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2966934b5e8914e7bbf1237c4b0418e7d88e4241","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"                                                         instance)"},{"line_number":1635,"context_line":"            finally:"},{"line_number":1636,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"        # cleanup volumes"},{"line_number":1639,"context_line":"        for bdm in bdms:"},{"line_number":1640,"context_line":"            if bdm.is_volume:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_56302101","line":1637,"in_reply_to":"baada198_bd108002","updated":"2014-07-02 08:58:26.000000000","message":"ditto","commit_id":"66545886375c589e57646e00ed9305f5dda1c708"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"303441c84ba0c6c6369274e3d889bb84973d9ba9","unresolved":false,"context_lines":[{"line_number":1390,"context_line":"            LOG.info(_(\u0027instance termination disabled\u0027),"},{"line_number":1391,"context_line":"                     instance\u003dinstance)"},{"line_number":1392,"context_line":"            return"},{"line_number":1393,"context_line":""},{"line_number":1394,"context_line":"        host \u003d instance.host"},{"line_number":1395,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":1396,"context_line":"            context, instance.uuid)"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_f5e6a449","line":1393,"updated":"2014-07-23 02:34:17.000000000","message":"just style-only change","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ef001b7badbf4ef0dad10d600019bed269626a3","unresolved":false,"context_lines":[{"line_number":1448,"context_line":"                return"},{"line_number":1449,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1450,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1451,"context_line":"            if not host and not shelved_offloaded:"},{"line_number":1452,"context_line":"                try:"},{"line_number":1453,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1454,"context_line":"                            self.notifier, context, instance,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_8955b41f","line":1451,"updated":"2014-07-21 19:06:31.000000000","message":"Isn\u0027t SHELVED_OFFLOADED the only status that would have instance.host set to None? Therefore, I don\u0027t see any other scenarios where this block of code would get executed?","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"303441c84ba0c6c6369274e3d889bb84973d9ba9","unresolved":false,"context_lines":[{"line_number":1448,"context_line":"                return"},{"line_number":1449,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1450,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1451,"context_line":"            if not host and not shelved_offloaded:"},{"line_number":1452,"context_line":"                try:"},{"line_number":1453,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1454,"context_line":"                            self.notifier, context, instance,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_ba909bee","line":1451,"in_reply_to":"baada198_8955b41f","updated":"2014-07-23 02:34:17.000000000","message":"yes I just found this case, the instance.host will be set to None.","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"303441c84ba0c6c6369274e3d889bb84973d9ba9","unresolved":false,"context_lines":[{"line_number":1469,"context_line":""},{"line_number":1470,"context_line":"            if instance.vm_state \u003d\u003d vm_states.RESIZED:"},{"line_number":1471,"context_line":"                self._confirm_resize_on_deleting(context, instance)"},{"line_number":1472,"context_line":""},{"line_number":1473,"context_line":"            is_local_delete \u003d True"},{"line_number":1474,"context_line":"            try:"},{"line_number":1475,"context_line":"                if not shelved_offloaded:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_15d31860","line":1472,"updated":"2014-07-23 02:34:17.000000000","message":"change of  following block of code is style-only","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ef001b7badbf4ef0dad10d600019bed269626a3","unresolved":false,"context_lines":[{"line_number":1479,"context_line":"                        service)"},{"line_number":1480,"context_line":"                if not is_local_delete:"},{"line_number":1481,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1482,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1483,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"},{"line_number":1484,"context_line":"                                   \u0027ignoring this request\u0027), instance\u003dinstance)"},{"line_number":1485,"context_line":"                        if reservations:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_77b11843","line":1482,"updated":"2014-07-21 19:06:31.000000000","message":"Please note that extraneous style-only changes like this do make it more difficult to review your patch, since the reviewer needs to context-switch between important changes that have to do with the bug fix, and style-only changes. It\u0027s generally better to group style-only changes like this (and the changes from dict usage to object attribute usage) in a separate patch.","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"303441c84ba0c6c6369274e3d889bb84973d9ba9","unresolved":false,"context_lines":[{"line_number":1479,"context_line":"                        service)"},{"line_number":1480,"context_line":"                if not is_local_delete:"},{"line_number":1481,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1482,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1483,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"},{"line_number":1484,"context_line":"                                   \u0027ignoring this request\u0027), instance\u003dinstance)"},{"line_number":1485,"context_line":"                        if reservations:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_da52af34","line":1482,"in_reply_to":"baada198_77b11843","updated":"2014-07-23 02:34:17.000000000","message":"yes, thanks a lot for your suggestion, maybe need adding some comment in review page for the style-only than notes in code is also better :D. this style-only changes is mostly according to reviewers\u0027 suggestion (in PS8 etc.), Done","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"303441c84ba0c6c6369274e3d889bb84973d9ba9","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"                    cb(context, instance, bdms, reservations\u003dreservations)"},{"line_number":1494,"context_line":"            except exception.ComputeHostNotFound:"},{"line_number":1495,"context_line":"                pass"},{"line_number":1496,"context_line":""},{"line_number":1497,"context_line":"            if is_local_delete:"},{"line_number":1498,"context_line":"                # instance in shelved_offloaded state or compute node isn\u0027t up,"},{"line_number":1499,"context_line":"                # delete instance from db and clean bdms info and network info"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_5512f009","line":1496,"updated":"2014-07-23 02:34:17.000000000","message":"change of is_up -\u003e is_local_delet is style-only change","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ef001b7badbf4ef0dad10d600019bed269626a3","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1637,"context_line":"                                                         instance)"},{"line_number":1638,"context_line":"            finally:"},{"line_number":1639,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"        # cleanup volumes"},{"line_number":1642,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_0cc8d2a6","line":1639,"updated":"2014-07-21 19:06:31.000000000","message":"I don\u0027t feel that this is the appropriate place for this code. Shouldn\u0027t the deallocate_for_instance() call be done when the instance is SHELVED_OFFLOADED? Seems like when the instance is offloaded is the appropriate time to release any resources that the instance had used.","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"25ad4722d53073dc76a085ab90c01faf69f6f7ca","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1637,"context_line":"                                                         instance)"},{"line_number":1638,"context_line":"            finally:"},{"line_number":1639,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"        # cleanup volumes"},{"line_number":1642,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_7fc1ee2d","line":1639,"in_reply_to":"baada198_0cc8d2a6","updated":"2014-07-21 19:39:52.000000000","message":"When the instance is offloaded only the nova resources are released.  Network and volume resources remain allocated so that they are available when the instance is unshelved.  Of course the resources can be release/reallocated outside of Nova but Nova doesn\u0027t release them.","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"303441c84ba0c6c6369274e3d889bb84973d9ba9","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1637,"context_line":"                                                         instance)"},{"line_number":1638,"context_line":"            finally:"},{"line_number":1639,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"        # cleanup volumes"},{"line_number":1642,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_95900898","line":1639,"in_reply_to":"baada198_7fc1ee2d","updated":"2014-07-23 02:34:17.000000000","message":"For the shelve-offload action, in my opinion, instance in SHELVED_OFFLOADED state, shouldn\u0027t release any resource of the instance, and just release resource in libvirt (destroy the domain), when do the *unshelve* action, nova will call scheduler to re-select a host for the instance to boot(this is the reason why the instance.host be set to None), and the instance will use the previous resource (port, volume, etc.) without any change","commit_id":"3570609890bc28534856c796c05b89f21b73618e"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"c898e81378a4f0d845a1b453b27173e98d18d119","unresolved":false,"context_lines":[{"line_number":1560,"context_line":"                return"},{"line_number":1561,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1562,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1563,"context_line":"            if not host and not shelved_offloaded:"},{"line_number":1564,"context_line":"                try:"},{"line_number":1565,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1566,"context_line":"                            self.notifier, context, instance,"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_eaaa1018","line":1563,"updated":"2014-09-24 09:01:11.000000000","message":"check the function of _delete, the \u0027host\u0027 is only used here,\nso can we just use instance.host here and remove the \u0027host\u0027 variable defined in 1511?\n\ndoes the instance\u0027s host changed after \u0027host \u003d instance.host\u0027 or is there anything I missing??\n\nEli","commit_id":"a698cfeb1ece70d6c59256227bb95fcdf53e7ac9"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"5a4656c2205542e34ddd9592078436ed06e16570","unresolved":false,"context_lines":[{"line_number":1560,"context_line":"                return"},{"line_number":1561,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1562,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1563,"context_line":"            if not host and not shelved_offloaded:"},{"line_number":1564,"context_line":"                try:"},{"line_number":1565,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1566,"context_line":"                            self.notifier, context, instance,"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_85b417d2","line":1563,"in_reply_to":"da9df570_eaaa1018","updated":"2014-09-24 09:35:53.000000000","message":"yeah,you are right, the L1511 is redundant, I will upload a new patcheset to remove that line, thanks for pointing out that :)","commit_id":"a698cfeb1ece70d6c59256227bb95fcdf53e7ac9"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"c898e81378a4f0d845a1b453b27173e98d18d119","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"                        service)"},{"line_number":1588,"context_line":"                if not is_local_delete:"},{"line_number":1589,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1590,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1591,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"},{"line_number":1592,"context_line":"                                   \u0027ignoring this request\u0027), instance\u003dinstance)"},{"line_number":1593,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_aa2568c3","line":1590,"updated":"2014-09-24 09:01:11.000000000","message":"seems here you touched a new line , anything special you need to do so?","commit_id":"a698cfeb1ece70d6c59256227bb95fcdf53e7ac9"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"c7b6adabc24ee40b067d34f00a396db7ddc54752","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"                        service)"},{"line_number":1588,"context_line":"                if not is_local_delete:"},{"line_number":1589,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1590,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1591,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"},{"line_number":1592,"context_line":"                                   \u0027ignoring this request\u0027), instance\u003dinstance)"},{"line_number":1593,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_cb30edea","line":1590,"in_reply_to":"da9df570_25328b10","updated":"2014-09-24 10:47:47.000000000","message":"1588","commit_id":"a698cfeb1ece70d6c59256227bb95fcdf53e7ac9"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"5a4656c2205542e34ddd9592078436ed06e16570","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"                        service)"},{"line_number":1588,"context_line":"                if not is_local_delete:"},{"line_number":1589,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1590,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1591,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"},{"line_number":1592,"context_line":"                                   \u0027ignoring this request\u0027), instance\u003dinstance)"},{"line_number":1593,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_25328b10","line":1590,"in_reply_to":"da9df570_aa2568c3","updated":"2014-09-24 09:35:53.000000000","message":"sorry, which line did you mean?","commit_id":"a698cfeb1ece70d6c59256227bb95fcdf53e7ac9"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3a03da92865f2909b2b1d0879c8db7509d495862","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"                        service)"},{"line_number":1588,"context_line":"                if not is_local_delete:"},{"line_number":1589,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1590,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1591,"context_line":"                        LOG.info(_(\u0027Instance is already in deleting state, \u0027"},{"line_number":1592,"context_line":"                                   \u0027ignoring this request\u0027), instance\u003dinstance)"},{"line_number":1593,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_ff7acbef","line":1590,"in_reply_to":"da9df570_cb30edea","updated":"2014-09-24 13:48:24.000000000","message":"well, here \"is_local_delete\" include cases of instance in \"shelved_offloaded\" state and instance\u0027s host not up, the \"not is_local_delete\" means not shelved_offloaded and service not up.","commit_id":"a698cfeb1ece70d6c59256227bb95fcdf53e7ac9"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"b8faf29a7c4a3dd916fb7c070050336f9b4fbba2","unresolved":false,"context_lines":[{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1709,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1710,"context_line":"            LOG.info(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1711,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1712,"context_line":"                     instance\u003dinstance)"},{"line_number":1713,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_937afe23","line":1710,"range":{"start_line":1710,"start_character":12,"end_line":1710,"end_character":23},"updated":"2014-10-09 11:30:36.000000000","message":"Please use here `_LI`","commit_id":"cc46485a0b97f0708f6ec9f4133e1523b25d23d0"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"a349648440d7ccc34571bab8ae6cc592c557df84","unresolved":false,"context_lines":[{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def _local_delete(self, context, instance, bdms, delete_type, cb):"},{"line_number":1709,"context_line":"        if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1710,"context_line":"            LOG.info(_(\"instance is in SHELVED_OFFLOADED state, cleanup\""},{"line_number":1711,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1712,"context_line":"                     instance\u003dinstance)"},{"line_number":1713,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_fc2067b2","line":1710,"in_reply_to":"baa201ad_937afe23","updated":"2014-10-10 03:40:15.000000000","message":"I have found the log translation hints of \"info\"(LI) and \"warn\"(LW) isn\u0027t cover this py file (only LE), I believe there is (or will be) some patches to add the log translation hints of \"info\" and \"warn\", but I will upload a new ps, Done :)","commit_id":"cc46485a0b97f0708f6ec9f4133e1523b25d23d0"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"b8faf29a7c4a3dd916fb7c070050336f9b4fbba2","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"                       \" the instance\u0027s info from database.\"),"},{"line_number":1712,"context_line":"                     instance\u003dinstance)"},{"line_number":1713,"context_line":"        else:"},{"line_number":1714,"context_line":"            LOG.warn(_(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1715,"context_line":"                       \"database\"), instance.host, instance\u003dinstance)"},{"line_number":1716,"context_line":"        instance.info_cache.delete()"},{"line_number":1717,"context_line":"        compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_d3748638","line":1714,"range":{"start_line":1714,"start_character":12,"end_line":1714,"end_character":23},"updated":"2014-10-09 11:30:36.000000000","message":"Please use here `LOG.warning(_LW(...))`","commit_id":"cc46485a0b97f0708f6ec9f4133e1523b25d23d0"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"019a3d82bc945fc2973f1487e3421f30276845e8","unresolved":false,"context_lines":[{"line_number":1721,"context_line":"                         \" the instance\u0027s info from database.\"),"},{"line_number":1722,"context_line":"                     instance\u003dinstance)"},{"line_number":1723,"context_line":"        else:"},{"line_number":1724,"context_line":"            LOG.warn(_LW(\"instance\u0027s host %s is down, deleting from \""},{"line_number":1725,"context_line":"                         \"database\"), instance.host, instance\u003dinstance)"},{"line_number":1726,"context_line":"        instance.info_cache.delete()"},{"line_number":1727,"context_line":"        compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":23,"id":"baa201ad_379ada6e","line":1724,"range":{"start_line":1724,"start_character":12,"end_line":1724,"end_character":20},"updated":"2014-10-13 06:44:18.000000000","message":"Please use `LOG.warning`.\nWe still should be stick to warning() because although warn() was kept as backwards compatibility in PY3 it\u0027s not even documented there[1] and they recommended to use warning()\n[1] https://docs.python.org/3/library/logging.html","commit_id":"c05151d694b7dd610fb7a6001165a6a94b57e157"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"6677f426c5b8e40c701108cf4363d8de0867c77f","unresolved":false,"context_lines":[{"line_number":1514,"context_line":""},{"line_number":1515,"context_line":"    def _delete(self, context, instance, delete_type, cb, **instance_attrs):"},{"line_number":1516,"context_line":"        if instance.disable_terminate:"},{"line_number":1517,"context_line":"            LOG.info(_LI(\u0027instance termination disabled\u0027),"},{"line_number":1518,"context_line":"                     instance\u003dinstance)"},{"line_number":1519,"context_line":"            return"},{"line_number":1520,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_b6be85ac","line":1517,"range":{"start_line":1517,"start_character":12,"end_line":1517,"end_character":26},"updated":"2014-10-15 07:25:12.000000000","message":"Unrelated changes with this patch. Please do not change it.","commit_id":"5f40c125eb52386cd2e310fba1e33043be21a2d2"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"6677f426c5b8e40c701108cf4363d8de0867c77f","unresolved":false,"context_lines":[{"line_number":1527,"context_line":"        if instance.vm_state in (vm_states.SHELVED,"},{"line_number":1528,"context_line":"                                 vm_states.SHELVED_OFFLOADED):"},{"line_number":1529,"context_line":"            snapshot_id \u003d instance.system_metadata.get(\u0027shelved_image_id\u0027)"},{"line_number":1530,"context_line":"            LOG.info(_LI(\"Working on deleting snapshot %s \""},{"line_number":1531,"context_line":"                         \"from shelved instance...\"),"},{"line_number":1532,"context_line":"                     snapshot_id, instance\u003dinstance)"},{"line_number":1533,"context_line":"            try:"},{"line_number":1534,"context_line":"                self.image_api.delete(context, snapshot_id)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_76c89d55","line":1531,"range":{"start_line":1530,"start_character":12,"end_line":1531,"end_character":53},"updated":"2014-10-15 07:25:12.000000000","message":"Unrelated changes with this patch. Please do not change it.","commit_id":"5f40c125eb52386cd2e310fba1e33043be21a2d2"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"6677f426c5b8e40c701108cf4363d8de0867c77f","unresolved":false,"context_lines":[{"line_number":1534,"context_line":"                self.image_api.delete(context, snapshot_id)"},{"line_number":1535,"context_line":"            except (exception.ImageNotFound,"},{"line_number":1536,"context_line":"                    exception.ImageNotAuthorized) as exc:"},{"line_number":1537,"context_line":"                LOG.warn(_LW(\"Failed to delete snapshot \""},{"line_number":1538,"context_line":"                             \"from shelved instance (%s).\"),"},{"line_number":1539,"context_line":"                            exc.format_message(), instance\u003dinstance)"},{"line_number":1540,"context_line":"            except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_f6e3add6","line":1537,"range":{"start_line":1537,"start_character":16,"end_line":1537,"end_character":29},"updated":"2014-10-15 07:25:12.000000000","message":"Unrelated changes with this patch. Please do not change it.","commit_id":"5f40c125eb52386cd2e310fba1e33043be21a2d2"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"6677f426c5b8e40c701108cf4363d8de0867c77f","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"                if not is_local_delete:"},{"line_number":1598,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1599,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1600,"context_line":"                        LOG.info(_LI(\u0027Instance is already in deleting state, \u0027"},{"line_number":1601,"context_line":"                                     \u0027ignoring this request\u0027),"},{"line_number":1602,"context_line":"                                 instance\u003dinstance)"},{"line_number":1603,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_16e591db","line":1600,"range":{"start_line":1600,"start_character":24,"end_line":1600,"end_character":37},"updated":"2014-10-15 07:25:12.000000000","message":"Unrelated changes with this patch. Please do not change it.","commit_id":"5f40c125eb52386cd2e310fba1e33043be21a2d2"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"6e603d809f3e731b7935bf3c9da2c52880fc54ec","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"                if not is_local_delete:"},{"line_number":1598,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1599,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1600,"context_line":"                        LOG.info(_LI(\u0027Instance is already in deleting state, \u0027"},{"line_number":1601,"context_line":"                                     \u0027ignoring this request\u0027),"},{"line_number":1602,"context_line":"                                 instance\u003dinstance)"},{"line_number":1603,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_4c694cbd","line":1600,"in_reply_to":"baa201ad_16e591db","updated":"2014-10-15 08:33:56.000000000","message":"here should apply this change because this code block has been indented, otherwise, it will easily cause conflict with your patches","commit_id":"5f40c125eb52386cd2e310fba1e33043be21a2d2"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"c5b6cb0bd935d0463a3bee5376a370edfc11b893","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"                if not is_local_delete:"},{"line_number":1598,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1599,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1600,"context_line":"                        LOG.info(_LI(\u0027Instance is already in deleting state, \u0027"},{"line_number":1601,"context_line":"                                     \u0027ignoring this request\u0027),"},{"line_number":1602,"context_line":"                                 instance\u003dinstance)"},{"line_number":1603,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baa201ad_191a1a7d","line":1600,"range":{"start_line":1600,"start_character":24,"end_line":1600,"end_character":37},"updated":"2014-10-15 13:39:06.000000000","message":"I do not agree with the change of the LOG, it is unrelated change with your patch.","commit_id":"087ed5a7f1a74f1a3ff4434ef5c1f45000e6ce17"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"522558e7f1ec294466bafa87ed33fd65cbf419e4","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"                if not is_local_delete:"},{"line_number":1598,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1599,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1600,"context_line":"                        LOG.info(_LI(\u0027Instance is already in deleting state, \u0027"},{"line_number":1601,"context_line":"                                     \u0027ignoring this request\u0027),"},{"line_number":1602,"context_line":"                                 instance\u003dinstance)"},{"line_number":1603,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":25,"id":"9aa7fdbe_aa9f7502","line":1600,"in_reply_to":"9aa7fdbe_91a4af58","updated":"2014-10-20 09:41:27.000000000","message":"... please see my forward reply in last ps !!!\n I really cannot understand why you think this is unrelated to this patch, Yes I have found your patches, do you think all patches in review state shouldn\u0027t apply log translation hint? and there will be another patch to do this work?\n\ndid you this the indent of this code block ? that means this code block is new and that will avoid conflict with your patches, thanks very very much for your review !!!","commit_id":"087ed5a7f1a74f1a3ff4434ef5c1f45000e6ce17"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"1eee8e2297649c0b148e37cf0916862f17125f5a","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"                if not is_local_delete:"},{"line_number":1598,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1599,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1600,"context_line":"                        LOG.info(_LI(\u0027Instance is already in deleting state, \u0027"},{"line_number":1601,"context_line":"                                     \u0027ignoring this request\u0027),"},{"line_number":1602,"context_line":"                                 instance\u003dinstance)"},{"line_number":1603,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":25,"id":"9aa7fdbe_55ff8a01","line":1600,"in_reply_to":"9aa7fdbe_aa9f7502","updated":"2014-10-20 09:42:54.000000000","message":"s/did you this the/did you have found the/","commit_id":"087ed5a7f1a74f1a3ff4434ef5c1f45000e6ce17"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"60fa6bf4debdb779c645a03e969f7608cd79d5f3","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"                if not is_local_delete:"},{"line_number":1598,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1599,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1600,"context_line":"                        LOG.info(_LI(\u0027Instance is already in deleting state, \u0027"},{"line_number":1601,"context_line":"                                     \u0027ignoring this request\u0027),"},{"line_number":1602,"context_line":"                                 instance\u003dinstance)"},{"line_number":1603,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baa201ad_fcb29247","line":1600,"in_reply_to":"baa201ad_191a1a7d","updated":"2014-10-16 01:05:08.000000000","message":"... this LOG is changed by my patch, why do you think this is unrelated with my patch? please see L1721, do you think new patches shouldn\u0027t apply log translation hint? sorry, I don\u0027t agree.","commit_id":"087ed5a7f1a74f1a3ff4434ef5c1f45000e6ce17"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"0534f2b824810077812d1278179685ab2a8b3f1a","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"                if not is_local_delete:"},{"line_number":1598,"context_line":"                    if original_task_state in (task_states.DELETING,"},{"line_number":1599,"context_line":"                                               task_states.SOFT_DELETING):"},{"line_number":1600,"context_line":"                        LOG.info(_LI(\u0027Instance is already in deleting state, \u0027"},{"line_number":1601,"context_line":"                                     \u0027ignoring this request\u0027),"},{"line_number":1602,"context_line":"                                 instance\u003dinstance)"},{"line_number":1603,"context_line":"                        quotas.rollback()"}],"source_content_type":"text/x-python","patch_set":25,"id":"9aa7fdbe_91a4af58","line":1600,"in_reply_to":"baa201ad_fcb29247","updated":"2014-10-19 21:48:55.000000000","message":"If you disagree with me then why you put -1? And if it\u0027s related with this patch it must be shown in commit message. And I have patch that changes all the `_` on `_LI` in `LOG.info`.","commit_id":"087ed5a7f1a74f1a3ff4434ef5c1f45000e6ce17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"526a1e38ca23e1ab50437245767f29440896de15","unresolved":false,"context_lines":[{"line_number":1535,"context_line":"        project_id, user_id \u003d quotas_obj.ids_from_instance(context, instance)"},{"line_number":1536,"context_line":""},{"line_number":1537,"context_line":"        # At these states an instance has a snapshot associate."},{"line_number":1538,"context_line":"        if instance.vm_state in (vm_states.SHELVED,"},{"line_number":1539,"context_line":"                                 vm_states.SHELVED_OFFLOADED):"},{"line_number":1540,"context_line":"            snapshot_id \u003d instance.system_metadata.get(\u0027shelved_image_id\u0027)"},{"line_number":1541,"context_line":"            LOG.info(_(\"Working on deleting snapshot %s \""}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_7ef66b5e","line":1538,"updated":"2014-10-27 18:29:32.000000000","message":"style-only change...","commit_id":"12c538c7b17377346e72fa5c3b69215f9c4dd7c1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"526a1e38ca23e1ab50437245767f29440896de15","unresolved":false,"context_lines":[{"line_number":1580,"context_line":"                return"},{"line_number":1581,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1582,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1583,"context_line":"            if not instance.host and not shelved_offloaded:"},{"line_number":1584,"context_line":"                try:"},{"line_number":1585,"context_line":"                    compute_utils.notify_about_instance_usage("},{"line_number":1586,"context_line":"                            self.notifier, context, instance,"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_9e986f1d","line":1583,"updated":"2014-10-27 18:29:32.000000000","message":"I\u0027m actually still not convinced this change is actually needed. I can\u0027t think of any situation *other* than an instance being in shelved_offloaded vm_state that the host attribute would be None.","commit_id":"12c538c7b17377346e72fa5c3b69215f9c4dd7c1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"526a1e38ca23e1ab50437245767f29440896de15","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1756,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1757,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1758,"context_line":"                                                         instance)"},{"line_number":1759,"context_line":"            finally:"},{"line_number":1760,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1761,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_be9b7316","line":1758,"updated":"2014-10-27 18:29:32.000000000","message":"I thought in a previous review, alaski said that when shelving, we don\u0027t deallocate network or volume resources, only the compute resources?","commit_id":"12c538c7b17377346e72fa5c3b69215f9c4dd7c1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"81eb8ea75a3a1ae25dbdb1bdd98fc9bcf2f3b929","unresolved":false,"context_lines":[{"line_number":1536,"context_line":""},{"line_number":1537,"context_line":"        # At these states an instance has a snapshot associate."},{"line_number":1538,"context_line":"        if instance.vm_state in (vm_states.SHELVED,"},{"line_number":1539,"context_line":"                                 vm_states.SHELVED_OFFLOADED):"},{"line_number":1540,"context_line":"            snapshot_id \u003d instance.system_metadata.get(\u0027shelved_image_id\u0027)"},{"line_number":1541,"context_line":"            LOG.info(_(\"Working on deleting snapshot %s \""},{"line_number":1542,"context_line":"                       \"from shelved instance...\"),"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a8c0949_2e2b9cec","line":1539,"updated":"2014-10-30 09:50:16.000000000","message":"this change is not really related.","commit_id":"b85b5e350acb9df1e89140dcd4879761f1f97683"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"cf94f9874aff074ddd17ecd314154ca81f87e34e","unresolved":false,"context_lines":[{"line_number":1536,"context_line":""},{"line_number":1537,"context_line":"        # At these states an instance has a snapshot associate."},{"line_number":1538,"context_line":"        if instance.vm_state in (vm_states.SHELVED,"},{"line_number":1539,"context_line":"                                 vm_states.SHELVED_OFFLOADED):"},{"line_number":1540,"context_line":"            snapshot_id \u003d instance.system_metadata.get(\u0027shelved_image_id\u0027)"},{"line_number":1541,"context_line":"            LOG.info(_(\"Working on deleting snapshot %s \""},{"line_number":1542,"context_line":"                       \"from shelved instance...\"),"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a8c0949_046cff9b","line":1539,"in_reply_to":"7a8c0949_2e2b9cec","updated":"2014-10-30 11:00:08.000000000","message":"this change is according to the previous other reviewers\u0027 suggestion.","commit_id":"b85b5e350acb9df1e89140dcd4879761f1f97683"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"81eb8ea75a3a1ae25dbdb1bdd98fc9bcf2f3b929","unresolved":false,"context_lines":[{"line_number":1752,"context_line":"            orig_host \u003d instance.host"},{"line_number":1753,"context_line":"            try:"},{"line_number":1754,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1755,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1756,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1757,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1758,"context_line":"                                                         instance)"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a8c0949_ce693827","line":1755,"updated":"2014-10-30 09:50:16.000000000","message":"any reason to not use instance.host here - lets try and be consistent with other changes","commit_id":"b85b5e350acb9df1e89140dcd4879761f1f97683"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"aa5f1dae15237252f27abe5bc5f4138b65d2889b","unresolved":false,"context_lines":[{"line_number":1752,"context_line":"            orig_host \u003d instance.host"},{"line_number":1753,"context_line":"            try:"},{"line_number":1754,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1755,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1756,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1757,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1758,"context_line":"                                                         instance)"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_623017e9","line":1755,"in_reply_to":"5a890539_4df8ba7c","updated":"2014-11-12 12:02:45.000000000","message":"please see the code of master: https://github.com/openstack/nova/blob/master/nova/network/rpcapi.py#L209\nthe context of rpc call is still use \"instance[\u0027host\u0027]\" not the \"instance.host\" now, so, I think maybe we cannot use instance.host here, anyway, I should test in openstack environment (note here the original \"instance[\u0027host\u0027]\" and  instance.host is None)","commit_id":"b85b5e350acb9df1e89140dcd4879761f1f97683"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"4e25456131421f805379c64575f88b0d96d21f2e","unresolved":false,"context_lines":[{"line_number":1752,"context_line":"            orig_host \u003d instance.host"},{"line_number":1753,"context_line":"            try:"},{"line_number":1754,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1755,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1756,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1757,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1758,"context_line":"                                                         instance)"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_4df8ba7c","line":1755,"in_reply_to":"7a8c0949_84ab8f88","updated":"2014-11-12 00:24:34.000000000","message":"Hi liusheng,\n\nI have tested multi_host scenario in both ways instance.host and instance[\u0027host\u0027] and it works as expected.\nTested using latest master code.\n\nIMO, only in case of havana release, you might need to use instance[\u0027host\u0027].","commit_id":"b85b5e350acb9df1e89140dcd4879761f1f97683"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"cf94f9874aff074ddd17ecd314154ca81f87e34e","unresolved":false,"context_lines":[{"line_number":1752,"context_line":"            orig_host \u003d instance.host"},{"line_number":1753,"context_line":"            try:"},{"line_number":1754,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1755,"context_line":"                    instance[\u0027host\u0027] \u003d instance._system_metadata.get("},{"line_number":1756,"context_line":"                        \u0027shelved_host\u0027)"},{"line_number":1757,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1758,"context_line":"                                                         instance)"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a8c0949_84ab8f88","line":1755,"in_reply_to":"7a8c0949_ce693827","updated":"2014-10-30 11:00:08.000000000","message":"Hi garyk, this question you have asked twice in PS9 and PS15, I have replied you :), I\u0027d almost forgotten that :)","commit_id":"b85b5e350acb9df1e89140dcd4879761f1f97683"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"81eb8ea75a3a1ae25dbdb1bdd98fc9bcf2f3b929","unresolved":false,"context_lines":[{"line_number":1757,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1758,"context_line":"                                                         instance)"},{"line_number":1759,"context_line":"            finally:"},{"line_number":1760,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1761,"context_line":""},{"line_number":1762,"context_line":"        # cleanup volumes"},{"line_number":1763,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a8c0949_4e654844","line":1760,"updated":"2014-10-30 09:50:16.000000000","message":"ditto","commit_id":"b85b5e350acb9df1e89140dcd4879761f1f97683"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"cf94f9874aff074ddd17ecd314154ca81f87e34e","unresolved":false,"context_lines":[{"line_number":1757,"context_line":"                self.network_api.deallocate_for_instance(elevated,"},{"line_number":1758,"context_line":"                                                         instance)"},{"line_number":1759,"context_line":"            finally:"},{"line_number":1760,"context_line":"                instance[\u0027host\u0027] \u003d orig_host"},{"line_number":1761,"context_line":""},{"line_number":1762,"context_line":"        # cleanup volumes"},{"line_number":1763,"context_line":"        for bdm in bdms:"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a8c0949_a4b08bf5","line":1760,"in_reply_to":"7a8c0949_4e654844","updated":"2014-10-30 11:00:08.000000000","message":"ditto","commit_id":"b85b5e350acb9df1e89140dcd4879761f1f97683"}],"nova/tests/compute/test_compute_api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ed0c37eda0ab8b883b561f1d98928b94326b9b51","unresolved":false,"context_lines":[{"line_number":547,"context_line":""},{"line_number":548,"context_line":"        cast \u003d True"},{"line_number":549,"context_line":"        commit_quotas \u003d True"},{"line_number":550,"context_line":"        if self.cell_type !\u003d \u0027api\u0027:"},{"line_number":551,"context_line":"            if inst.vm_state \u003d\u003d vm_states.RESIZED:"},{"line_number":552,"context_line":"                self._test_delete_resized_part(inst)"},{"line_number":553,"context_line":"            if inst.vm_state !\u003d vm_states.SHELVED_OFFLOADED:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_78ee138a","line":550,"updated":"2014-05-28 07:30:44.000000000","message":"can you please add a test for the case with the network flow that you have chnaged","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"2658855f7af34445e61f3f8dfa1acc85f4e55287","unresolved":false,"context_lines":[{"line_number":547,"context_line":""},{"line_number":548,"context_line":"        cast \u003d True"},{"line_number":549,"context_line":"        commit_quotas \u003d True"},{"line_number":550,"context_line":"        if self.cell_type !\u003d \u0027api\u0027:"},{"line_number":551,"context_line":"            if inst.vm_state \u003d\u003d vm_states.RESIZED:"},{"line_number":552,"context_line":"                self._test_delete_resized_part(inst)"},{"line_number":553,"context_line":"            if inst.vm_state !\u003d vm_states.SHELVED_OFFLOADED:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_507ae7f1","line":550,"in_reply_to":"3ae8d1ca_78ee138a","updated":"2014-05-29 03:51:39.000000000","message":"Hi garyk, Sorry, this test frame has mocked the \"deallocate_for_instance\", please see L507, and most unittests in this py file is base on this _test_delete(), so I am not sure I can add test easily for *network flow* as you commented :(.\n\nno need of unittest for \"network flow\" or give me a hand about the test, thank you very very much! ^^^","commit_id":"924c0176a9212427bbe765e20c3a4682eaa6c2d0"},{"author":{"_account_id":10614,"name":"Alex Frolov","email":"afrolov@mirantis.com","username":"afrolov"},"change_message_id":"62f0ea1f898e839c228a8840b1c0362782df40bf","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                        mox.IsA(objects.Service)).AndReturn("},{"line_number":664,"context_line":"                                inst.host !\u003d \u0027down-host\u0027)"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"            if (inst.host \u003d\u003d \u0027down-host\u0027 or"},{"line_number":667,"context_line":"                    inst.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED):"},{"line_number":668,"context_line":""},{"line_number":669,"context_line":"                self._test_downed_host_part(inst, updates, delete_time,"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_0fa47649","line":666,"updated":"2014-09-12 08:56:29.000000000","message":"Opening and closing brackets are not needed here.","commit_id":"80843e187f1584d21e92029a7ee3093ea29f72a7"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"b63aff5290381aa51b284767a9ce3ef024d8cf83","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                        mox.IsA(objects.Service)).AndReturn("},{"line_number":664,"context_line":"                                inst.host !\u003d \u0027down-host\u0027)"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"            if (inst.host \u003d\u003d \u0027down-host\u0027 or"},{"line_number":667,"context_line":"                    inst.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED):"},{"line_number":668,"context_line":""},{"line_number":669,"context_line":"                self._test_downed_host_part(inst, updates, delete_time,"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_2c8785b6","line":666,"in_reply_to":"fa98f980_0fa47649","updated":"2014-09-12 10:12:59.000000000","message":"it is better to use brackets to avoid \"\\\" for line feed, because \"\\\" will easily lead rebase conflict, please see previous review record.","commit_id":"80843e187f1584d21e92029a7ee3093ea29f72a7"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"56eb2b81fe9d315998bc22ccec4c661026f398eb","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                        mox.IsA(objects.Service)).AndReturn("},{"line_number":664,"context_line":"                                inst.host !\u003d \u0027down-host\u0027)"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"            if (inst.host \u003d\u003d \u0027down-host\u0027 or"},{"line_number":667,"context_line":"                    inst.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED):"},{"line_number":668,"context_line":""},{"line_number":669,"context_line":"                self._test_downed_host_part(inst, updates, delete_time,"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_9d29168c","line":666,"in_reply_to":"fa98f980_0fa47649","updated":"2014-09-17 01:55:57.000000000","message":"please don\u0027t give \"-1\" for your ignorance and no response for author\u0027s reply.","commit_id":"80843e187f1584d21e92029a7ee3093ea29f72a7"}]}
