)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"d87730e10d27604175e93ec7193738350fc1cbce","unresolved":false,"context_lines":[{"line_number":16,"context_line":"attempt to delete orig VM within destroy phase."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I7598afbf0dc3c527471af34224003d28e64daaff"},{"line_number":19,"context_line":"Closes-Bug: #1359138"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa98f980_7f46467c","line":19,"updated":"2014-09-06 03:26:31.000000000","message":"Seems there isn\u0027t  bug 1359138 in launchpad.","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"72b9eda82e9732a9ae0a8e48b9d32aec47b50d05","unresolved":false,"context_lines":[{"line_number":16,"context_line":"attempt to delete orig VM within destroy phase."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I7598afbf0dc3c527471af34224003d28e64daaff"},{"line_number":19,"context_line":"Closes-Bug: #1359138"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa98f980_42241ec6","line":19,"in_reply_to":"fa98f980_7f46467c","updated":"2014-09-08 15:20:45.000000000","message":"That\u0027s because it is (well, was) a private security bug under embargo. The VMT is switching it to public now since it\u0027s been prematurely disclosed through publication of a proposed fix.","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"}],"nova/tests/virt/vmwareapi/test_driver_api.py":[{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"d87730e10d27604175e93ec7193738350fc1cbce","unresolved":false,"context_lines":[{"line_number":1485,"context_line":"            mock_get.assert_called_with(self.conn._vmops._session,"},{"line_number":1486,"context_line":"                                        self.instance[\u0027uuid\u0027])"},{"line_number":1487,"context_line":"            # one for vmname uuid, one from vmname uuid-orig"},{"line_number":1488,"context_line":"            self.assertEqual(mock_get.call_count, 2)"},{"line_number":1489,"context_line":"            self.assertFalse(mock_call.called)"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"    def _rescue(self, config_drive\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_1f1b7a81","line":1488,"updated":"2014-09-06 03:26:31.000000000","message":"It would be better change to two mock_get.assert_called_with.","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ae0ff52fcc55f5fc3e17174abcffa73231631d5e","unresolved":false,"context_lines":[{"line_number":1485,"context_line":"            mock_get.assert_called_with(self.conn._vmops._session,"},{"line_number":1486,"context_line":"                                        self.instance[\u0027uuid\u0027])"},{"line_number":1487,"context_line":"            # one for vmname uuid, one from vmname uuid-orig"},{"line_number":1488,"context_line":"            self.assertEqual(mock_get.call_count, 2)"},{"line_number":1489,"context_line":"            self.assertFalse(mock_call.called)"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"    def _rescue(self, config_drive\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_47be0cd6","line":1488,"updated":"2014-09-07 08:10:43.000000000","message":"minor nit - please use the expected value as the first parameter","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"25b546f4eac4e05bbef450cd6f802933592bee03","unresolved":false,"context_lines":[{"line_number":1485,"context_line":"            mock_get.assert_called_with(self.conn._vmops._session,"},{"line_number":1486,"context_line":"                                        self.instance[\u0027uuid\u0027])"},{"line_number":1487,"context_line":"            # one for vmname uuid, one from vmname uuid-orig"},{"line_number":1488,"context_line":"            self.assertEqual(mock_get.call_count, 2)"},{"line_number":1489,"context_line":"            self.assertFalse(mock_call.called)"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"    def _rescue(self, config_drive\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_ce0d6237","line":1488,"in_reply_to":"fa98f980_196efac9","updated":"2014-09-10 02:27:42.000000000","message":"please use  \"call_args_list\" to check history calls","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"1b1f1184650eb11d1857e7f1de4c10e72b72baf3","unresolved":false,"context_lines":[{"line_number":1485,"context_line":"            mock_get.assert_called_with(self.conn._vmops._session,"},{"line_number":1486,"context_line":"                                        self.instance[\u0027uuid\u0027])"},{"line_number":1487,"context_line":"            # one for vmname uuid, one from vmname uuid-orig"},{"line_number":1488,"context_line":"            self.assertEqual(mock_get.call_count, 2)"},{"line_number":1489,"context_line":"            self.assertFalse(mock_call.called)"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"    def _rescue(self, config_drive\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_196efac9","line":1488,"in_reply_to":"fa98f980_1f1b7a81","updated":"2014-09-09 03:29:34.000000000","message":"The method mock wouldn\u0027t sustain the all history mock state. \nit will only retain the mock state of last call. By that means, if to check the method how many times to be triggered, you can only use call_count, can not use twice mock assert with different arguments.\n\nFor example:\n\n\u003e\u003e\u003e mock \u003d Mock(return_value\u003dNone)\n\u003e\u003e\u003e mock(\u0027a\u0027,1)\n\u003e\u003e\u003e mock(\u0027b\u0027,2)\n\u003e\u003e\u003e mock.assert_called_with(\u0027a\u0027,1)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/usr/lib/python2.6/site-packages/mock.py\", line 835, in assert_called_with\n    raise AssertionError(msg)\nAssertionError: Expected call: mock(\u0027a\u0027, 1)\nActual call: mock(\u0027b\u0027, 2)\n\u003e\u003e\u003e mock.assert_called_with(\u0027b\u0027,2)\n\u003e\u003e\u003e","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"1b1f1184650eb11d1857e7f1de4c10e72b72baf3","unresolved":false,"context_lines":[{"line_number":1485,"context_line":"            mock_get.assert_called_with(self.conn._vmops._session,"},{"line_number":1486,"context_line":"                                        self.instance[\u0027uuid\u0027])"},{"line_number":1487,"context_line":"            # one for vmname uuid, one from vmname uuid-orig"},{"line_number":1488,"context_line":"            self.assertEqual(mock_get.call_count, 2)"},{"line_number":1489,"context_line":"            self.assertFalse(mock_call.called)"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"    def _rescue(self, config_drive\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_661f610a","line":1488,"in_reply_to":"fa98f980_47be0cd6","updated":"2014-09-09 03:29:34.000000000","message":"Done","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ae0ff52fcc55f5fc3e17174abcffa73231631d5e","unresolved":false,"context_lines":[{"line_number":972,"context_line":"                rescue_name \u003d instance[\u0027uuid\u0027] + self._rescue_suffix"},{"line_number":973,"context_line":"                self._destroy_instance(instance,"},{"line_number":974,"context_line":"                                       destroy_disks\u003ddestroy_disks,"},{"line_number":975,"context_line":"                                       instance_name\u003drescue_name)"},{"line_number":976,"context_line":"        # When VM deletion triggered in middle of VM migration before VM"},{"line_number":977,"context_line":"        # arrive to Resized state, need to make sure uuid-orig VM got deletion"},{"line_number":978,"context_line":"        resize_orig_vmname \u003d instance[\u0027uuid\u0027] + self._migrate_suffix"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_87863412","line":975,"updated":"2014-09-07 08:10:43.000000000","message":"would something like:\n\n                if (instance.task_state in [task_states.MIGRATING,\n                                            task_states.RESIZE_MIGRATING,\n                                            task_states.RESIZE_MIGRATED,\n                                            task_states.RESIZE_FINISH]\n                    or instance.vm_state in [vm_states.RESIZED]):\n\nhelp?","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"1b1f1184650eb11d1857e7f1de4c10e72b72baf3","unresolved":false,"context_lines":[{"line_number":972,"context_line":"                rescue_name \u003d instance[\u0027uuid\u0027] + self._rescue_suffix"},{"line_number":973,"context_line":"                self._destroy_instance(instance,"},{"line_number":974,"context_line":"                                       destroy_disks\u003ddestroy_disks,"},{"line_number":975,"context_line":"                                       instance_name\u003drescue_name)"},{"line_number":976,"context_line":"        # When VM deletion triggered in middle of VM migration before VM"},{"line_number":977,"context_line":"        # arrive to Resized state, need to make sure uuid-orig VM got deletion"},{"line_number":978,"context_line":"        resize_orig_vmname \u003d instance[\u0027uuid\u0027] + self._migrate_suffix"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_f1edd08f","line":975,"in_reply_to":"fa98f980_87863412","updated":"2014-09-09 03:29:34.000000000","message":"no, this wouldn\u0027t work. because the task_state will be \u0027deleting\u0027 when deletion is triggered. And RESIZED state is the final state with resize which means complete, and the leak wouldn\u0027t happen for success case.","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"286aaefb29060c3978daaee6395d0ab38f784fc7","unresolved":false,"context_lines":[{"line_number":975,"context_line":"                                       instance_name\u003drescue_name)"},{"line_number":976,"context_line":"        # When VM deletion triggered in middle of VM migration before VM"},{"line_number":977,"context_line":"        # arrive to Resized state, need to make sure uuid-orig VM got deletion"},{"line_number":978,"context_line":"        resize_orig_vmname \u003d instance[\u0027uuid\u0027] + self._migrate_suffix"},{"line_number":979,"context_line":"        self._destroy_instance(instance,"},{"line_number":980,"context_line":"                               destroy_disks\u003ddestroy_disks,"},{"line_number":981,"context_line":"                               instance_name\u003dresize_orig_vmname)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_126d5304","line":978,"updated":"2014-09-05 02:25:13.000000000","message":"This code path shouldn\u0027t be executed every time, need a condition check here.","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"93b0fb81a3d32ecd76fd388e2bbfdb2462980522","unresolved":false,"context_lines":[{"line_number":975,"context_line":"                                       instance_name\u003drescue_name)"},{"line_number":976,"context_line":"        # When VM deletion triggered in middle of VM migration before VM"},{"line_number":977,"context_line":"        # arrive to Resized state, need to make sure uuid-orig VM got deletion"},{"line_number":978,"context_line":"        resize_orig_vmname \u003d instance[\u0027uuid\u0027] + self._migrate_suffix"},{"line_number":979,"context_line":"        self._destroy_instance(instance,"},{"line_number":980,"context_line":"                               destroy_disks\u003ddestroy_disks,"},{"line_number":981,"context_line":"                               instance_name\u003dresize_orig_vmname)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_c5022309","line":978,"in_reply_to":"fa98f980_126d5304","updated":"2014-09-05 02:31:20.000000000","message":"Actually, as there will be no condition in place for the vmstate as well as the task state to do it. For upper layer, it will having task state to be \u0027deleting\u0027 while vmstate is \u0027Active\u0027. There are common state.","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"1b1f1184650eb11d1857e7f1de4c10e72b72baf3","unresolved":false,"context_lines":[{"line_number":975,"context_line":"                                       instance_name\u003drescue_name)"},{"line_number":976,"context_line":"        # When VM deletion triggered in middle of VM migration before VM"},{"line_number":977,"context_line":"        # arrive to Resized state, need to make sure uuid-orig VM got deletion"},{"line_number":978,"context_line":"        resize_orig_vmname \u003d instance[\u0027uuid\u0027] + self._migrate_suffix"},{"line_number":979,"context_line":"        self._destroy_instance(instance,"},{"line_number":980,"context_line":"                               destroy_disks\u003ddestroy_disks,"},{"line_number":981,"context_line":"                               instance_name\u003dresize_orig_vmname)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_860fe52d","line":978,"in_reply_to":"fa98f980_bf226eb6","updated":"2014-09-09 03:29:34.000000000","message":"This vm leak does not happen for all hypervisors, the reason is that the clone VM logic via vmware and libvirt were different and in different phase. Libvirt will migrate disk to the host, and cp an instance_resize disk folder. while it will already keeps one VM in hypervisor(virsh list). While vmware will attempt to clone VM started in migrate_disk_and_power_off which will be two VMs in hypervisors. . \n\nwithin _destroy_instance, it will check if the vmref exist or not if not log an message. \nhttps://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L742\n\nyeah, i will add more comment for that.","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"d87730e10d27604175e93ec7193738350fc1cbce","unresolved":false,"context_lines":[{"line_number":975,"context_line":"                                       instance_name\u003drescue_name)"},{"line_number":976,"context_line":"        # When VM deletion triggered in middle of VM migration before VM"},{"line_number":977,"context_line":"        # arrive to Resized state, need to make sure uuid-orig VM got deletion"},{"line_number":978,"context_line":"        resize_orig_vmname \u003d instance[\u0027uuid\u0027] + self._migrate_suffix"},{"line_number":979,"context_line":"        self._destroy_instance(instance,"},{"line_number":980,"context_line":"                               destroy_disks\u003ddestroy_disks,"},{"line_number":981,"context_line":"                               instance_name\u003dresize_orig_vmname)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_bf226eb6","line":978,"in_reply_to":"fa98f980_c5022309","updated":"2014-09-06 03:26:31.000000000","message":"Does this problem exist on all hypervisor type , if yes, better way to handle this in API layer .\n\nwhat will happen if there is no  resize_orig_vmname ? at least add comment about there is no side effect even when resize_orig_vmname doesn\u0027t exist.","commit_id":"a91dbba4fd71430648b3b14be0ce54919e85e90d"},{"author":{"_account_id":8531,"name":"Yu Zhang","email":"zhangyu11@huawei.com","username":"zhyu"},"change_message_id":"23920019a280ca538780b0f372ff44b17f06844b","unresolved":false,"context_lines":[{"line_number":977,"context_line":"        # arrive RESIZED state, uuid-orig VM need to deleted to avoid"},{"line_number":978,"context_line":"        # VM leak. Within method _destroy_instance it will check vmref"},{"line_number":979,"context_line":"        # exist or not before attempt deletion."},{"line_number":980,"context_line":"        resize_orig_vmname \u003d instance[\u0027uuid\u0027] + self._migrate_suffix"},{"line_number":981,"context_line":"        self._destroy_instance(instance,"},{"line_number":982,"context_line":"                               destroy_disks\u003ddestroy_disks,"},{"line_number":983,"context_line":"                               instance_name\u003dresize_orig_vmname)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_a19328a3","line":980,"updated":"2014-09-16 13:17:27.000000000","message":"Could we do anything here as follows:\n\n    vm_ref \u003d vm_util.get_vm_ref_from_name(self._session, resize_orig_vmname)\n    if vm_ref is not None:\n        ...\n\nSince this uuid-orig VM deletion happens only in your mentioned cases, I\u0027d prefer we have a judgement here and will not mix it with the common-case execution flow to help the code more understandable.","commit_id":"d82fde2947c60270aaee895f1460b99ab1101a18"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"1c608bd6fca969b4cb6f4bcc2d33e54b8ec46532","unresolved":false,"context_lines":[{"line_number":977,"context_line":"        # arrive RESIZED state, uuid-orig VM need to deleted to avoid"},{"line_number":978,"context_line":"        # VM leak. Within method _destroy_instance it will check vmref"},{"line_number":979,"context_line":"        # exist or not before attempt deletion."},{"line_number":980,"context_line":"        resize_orig_vmname \u003d instance[\u0027uuid\u0027] + self._migrate_suffix"},{"line_number":981,"context_line":"        self._destroy_instance(instance,"},{"line_number":982,"context_line":"                               destroy_disks\u003ddestroy_disks,"},{"line_number":983,"context_line":"                               instance_name\u003dresize_orig_vmname)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_c7fcbc42","line":980,"in_reply_to":"fa98f980_a19328a3","updated":"2014-09-16 14:47:21.000000000","message":"Hi Yu, actually this check is already embedded under _destroy_instance. no need to move it out separately so as to avoid more ref calls.","commit_id":"d82fde2947c60270aaee895f1460b99ab1101a18"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9fdc22aba8dc480bd45b7095dfa607b1889e9ca3","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        try:"},{"line_number":762,"context_line":"            vm_ref \u003d vm_util.get_vm_ref_from_name(self._session, instance_name)"},{"line_number":763,"context_line":"            if vm_ref is None:"},{"line_number":764,"context_line":"                LOG.warning(_(\u0027Instance does not exist on backend\u0027),"},{"line_number":765,"context_line":"                            instance\u003dinstance)"},{"line_number":766,"context_line":"                return"},{"line_number":767,"context_line":"            lst_properties \u003d [\"config.files.vmPathName\", \"runtime.powerState\","}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_855c7027","line":764,"updated":"2014-09-29 09:53:52.000000000","message":"I think your change will trigger this log message on every build.\n\nMaybe check for the rescue VM before calling into here?","commit_id":"7a893958c8ef6a34aaf65296cf8c4560924bdbb7"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"a647c5c7166127b98dd508e94c17add04165b368","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        try:"},{"line_number":762,"context_line":"            vm_ref \u003d vm_util.get_vm_ref_from_name(self._session, instance_name)"},{"line_number":763,"context_line":"            if vm_ref is None:"},{"line_number":764,"context_line":"                LOG.warning(_(\u0027Instance does not exist on backend\u0027),"},{"line_number":765,"context_line":"                            instance\u003dinstance)"},{"line_number":766,"context_line":"                return"},{"line_number":767,"context_line":"            lst_properties \u003d [\"config.files.vmPathName\", \"runtime.powerState\","}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_2f72a97c","line":764,"in_reply_to":"baa201ad_855c7027","updated":"2014-09-30 03:51:37.000000000","message":"John, thanks for comments. considering the possibilities for deletion during resize is very low. It would not make overahead vmref checks if move it to outside. will fix in next patch.","commit_id":"7a893958c8ef6a34aaf65296cf8c4560924bdbb7"}]}
