)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"255e918e0b2ac896effc5f851bddd678673a48c2","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The instance group policy is not being honored during live"},{"line_number":10,"context_line":"migration due to the failure to update the instance group"},{"line_number":11,"context_line":"object in the request spec passed to the live migration"},{"line_number":12,"context_line":"task."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I1e71c4a27559b23b992f203592d7df030505f03e"},{"line_number":15,"context_line":"Closes-Bug: #1600251"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"dada55a8_ca175ba1","line":12,"updated":"2016-07-26 15:57:30.000000000","message":"You should also explain that it\u0027s okay to not verify whether the scheduler filters are running, because we basically agreed on that being a wrong idea to do that in the conductor.","commit_id":"4ec81b2fb118b194fff8c8e65d1f377c890c8ef1"}],"nova/conductor/tasks/live_migrate.py":[{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"09d1f6b2944335493f5962cb1b0a55ad31de21be","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        request_spec.instance_group \u003d \\"},{"line_number":185,"context_line":"            objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":186,"context_line":"                                                       self.instance.uuid)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        host \u003d None"},{"line_number":189,"context_line":"        while host is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_200602ce","line":186,"updated":"2016-07-12 14:28:50.000000000","message":"I\u0027m not sure this is the right. The instance group information is set up for filter properties above in L#165.\n\nRequestSpec.from_components() already sets the group information from filter properties using  RequestSpec._populate_group_info().\n\nThe update you are trying to do here should only be done for the else branch above and should be done using the same method. Maybe a new method on RequestSpec that calls _populate_group_info() or go directly to that method.","commit_id":"07957e2d688bde35bc9d5bb298d80d77dfa28163"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1daf335f19f0144759ea37c050b912fd74f88742","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        request_spec.instance_group \u003d \\"},{"line_number":185,"context_line":"            objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":186,"context_line":"                                                       self.instance.uuid)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        host \u003d None"},{"line_number":189,"context_line":"        while host is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_30376b4e","line":186,"in_reply_to":"1aa78d24_200602ce","updated":"2016-07-12 15:49:32.000000000","message":"I think I\u0027m getting it. So, for some reason, we don\u0027t persist the instance_group information when creating first the RequestSpec :\nhttps://github.com/openstack/nova/blob/232ffaea589cb88fcd90fd90e36056da1826ee3b/nova/compute/api.py#L923\n\nThat\u0027s mostly due, I guess, because we don\u0027t call out setup_instance_group() for correctly updating filter_properties, so when we get it back here, we don\u0027t have those.\n\nThat works in an usual case (and worked before my patch to re-use the existing) because we\u0027re doing the explicit calls in the conductor methods like _schedule_instances().","commit_id":"07957e2d688bde35bc9d5bb298d80d77dfa28163"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"255e918e0b2ac896effc5f851bddd678673a48c2","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            # is not forced to be the original host"},{"line_number":182,"context_line":"            request_spec.reset_forced_destinations()"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            request_spec.instance_group \u003d \\"},{"line_number":185,"context_line":"                objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":186,"context_line":"                                                           self.instance.uuid)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_2ae437de","line":184,"updated":"2016-07-26 15:57:30.000000000","message":"I would appreciate some comment here explaining why we need to update the instance group information.","commit_id":"4ec81b2fb118b194fff8c8e65d1f377c890c8ef1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"df93800bb52265024a86ef320d5484f9f70c54b3","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            # instance was created not the current membership. Thus we need"},{"line_number":188,"context_line":"            # to update this information in case the instance is a member of"},{"line_number":189,"context_line":"            # a server group."},{"line_number":190,"context_line":"            request_spec.instance_group \u003d \\"},{"line_number":191,"context_line":"                objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":192,"context_line":"                                                           self.instance.uuid)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_be567f59","line":190,"updated":"2016-07-27 12:34:44.000000000","message":"I was putting a TODO because I think that change is just a bugfix and we should rather make sure that the nested instance_group field is lazy-loadable. Anyway, that\u0027s a nit.","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"d2df14dede290655ec18eaa550f798494f21ce26","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            # instance was created not the current membership. Thus we need"},{"line_number":188,"context_line":"            # to update this information in case the instance is a member of"},{"line_number":189,"context_line":"            # a server group."},{"line_number":190,"context_line":"            request_spec.instance_group \u003d \\"},{"line_number":191,"context_line":"                objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":192,"context_line":"                                                           self.instance.uuid)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_223003e8","line":190,"in_reply_to":"dada55a8_be567f59","updated":"2016-09-07 06:20:45.000000000","message":"Done","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"19f739e49cb132d7298c120c0c877606e380eee1","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            # to update this information in case the instance is a member of"},{"line_number":189,"context_line":"            # a server group."},{"line_number":190,"context_line":"            request_spec.instance_group \u003d \\"},{"line_number":191,"context_line":"                objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":192,"context_line":"                                                           self.instance.uuid)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        host \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_abb89fe6","line":191,"updated":"2016-08-03 09:36:28.000000000","message":"So this will raise an InstanceGroupNotFound exception if no instance_group is found:\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L6515\n\nI don\u0027t think that is what we want here. I think just checking to see if request_spec.instance_group is not null might do the trick in most cases, but maybe safer to also swallow that exception?","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"d2df14dede290655ec18eaa550f798494f21ce26","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            # to update this information in case the instance is a member of"},{"line_number":189,"context_line":"            # a server group."},{"line_number":190,"context_line":"            request_spec.instance_group \u003d \\"},{"line_number":191,"context_line":"                objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":192,"context_line":"                                                           self.instance.uuid)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        host \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_34bbf8e6","line":191,"in_reply_to":"bacf61ea_88263e66","updated":"2016-09-07 06:20:45.000000000","message":"Done","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"d2df14dede290655ec18eaa550f798494f21ce26","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            # to update this information in case the instance is a member of"},{"line_number":189,"context_line":"            # a server group."},{"line_number":190,"context_line":"            request_spec.instance_group \u003d \\"},{"line_number":191,"context_line":"                objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":192,"context_line":"                                                           self.instance.uuid)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        host \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_14eef4eb","line":191,"in_reply_to":"bacf61ea_abb89fe6","updated":"2016-09-07 06:20:45.000000000","message":"Done","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"b80ca148fd4d74b23e248d1d99e4cd33442eaf3d","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            # to update this information in case the instance is a member of"},{"line_number":189,"context_line":"            # a server group."},{"line_number":190,"context_line":"            request_spec.instance_group \u003d \\"},{"line_number":191,"context_line":"                objects.InstanceGroup.get_by_instance_uuid(self.context,"},{"line_number":192,"context_line":"                                                           self.instance.uuid)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        host \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_88263e66","line":191,"in_reply_to":"bacf61ea_abb89fe6","updated":"2016-08-04 10:45:32.000000000","message":"Good catch John. If we have that exception the live migration will fail, just tested :(","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"1de9bddb0654f4bae3a06f50625fb0264c57b2f6","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                        objects.InstanceGroup.get_by_instance_uuid("},{"line_number":194,"context_line":"                                                            self.context,"},{"line_number":195,"context_line":"                                                            self.instance.uuid)"},{"line_number":196,"context_line":"            except exception.InstanceGroupNotFound:"},{"line_number":197,"context_line":"                pass"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        host \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_5e862d66","line":196,"updated":"2016-09-09 10:44:02.000000000","message":"Given that you added if condition, is this still necessary? I\u0027m not very familiar with this part of nova, but if an instance already have instance group and here it just needs to be reloaded, can it somehow disappear from the database so that InstanceGroupNotFound exception will occur?","commit_id":"cf4394ce84f977450b7a4dd22fb9774e286dcc8b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"60872a90915f4ad1a5f707da3aea7f8ac996e244","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                        objects.InstanceGroup.get_by_instance_uuid("},{"line_number":194,"context_line":"                                                            self.context,"},{"line_number":195,"context_line":"                                                            self.instance.uuid)"},{"line_number":196,"context_line":"            except exception.InstanceGroupNotFound:"},{"line_number":197,"context_line":"                pass"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        host \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_21006eaa","line":196,"in_reply_to":"9a89bdaa_5e862d66","updated":"2016-09-09 11:03:25.000000000","message":"probably not but it provides a safety net, I can remove the try/except.  It shouldn\u0027t be possible to delete a server-group that has instances using it so probably not.","commit_id":"cf4394ce84f977450b7a4dd22fb9774e286dcc8b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d02a2b66ebdbb30cb5e1d2d634b62925ee8ebc96","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                                            self.context,"},{"line_number":195,"context_line":"                                                            self.instance.uuid)"},{"line_number":196,"context_line":"            except exception.InstanceGroupNotFound:"},{"line_number":197,"context_line":"                pass"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        host \u003d None"},{"line_number":200,"context_line":"        while host is None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_af97aa46","line":197,"range":{"start_line":197,"start_character":16,"end_line":197,"end_character":20},"updated":"2016-11-01 14:38:36.000000000","message":"Is pass the right thing to do here? If instance group is not found, what does that mean? feels like we might want to fail in that case rather than just ignore it.","commit_id":"5f3749a1955cba22df9663b56a0ef8586354c6e8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"54e17fac42ecf569841313216c6a2b0f53e11cb1","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                                            self.context,"},{"line_number":195,"context_line":"                                                            self.instance.uuid)"},{"line_number":196,"context_line":"            except exception.InstanceGroupNotFound:"},{"line_number":197,"context_line":"                pass"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        host \u003d None"},{"line_number":200,"context_line":"        while host is None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_af224a50","line":197,"updated":"2016-11-01 14:36:57.000000000","message":"So this sounds correct, but it seems like we have the same problem for migrate:\nhttps://github.com/openstack/nova/blob/master/nova/conductor/tasks/migrate.py#L58\n\nLooks like there are a set of workarounds we want here, maybe reset_forced_destinations needs a rename/rework to include all the workaround when request_spec is being \"reused\" in some sense.\n\nI would love to get bauzas to take another peak at this.","commit_id":"5f3749a1955cba22df9663b56a0ef8586354c6e8"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"078c48f76e4f87815eba52af2f1a3994f62af752","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                                            self.context,"},{"line_number":195,"context_line":"                                                            self.instance.uuid)"},{"line_number":196,"context_line":"            except exception.InstanceGroupNotFound:"},{"line_number":197,"context_line":"                pass"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        host \u003d None"},{"line_number":200,"context_line":"        while host is None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_c8c3f487","line":197,"in_reply_to":"ba5da102_af224a50","updated":"2016-11-01 15:42:59.000000000","message":"I think the proper solution is to make the request spec \u0027load from db\u0027 operation populate the instance_groups (and possibly other nested objects) with an up to date version.  However I think the issue was that because this would require an object version bump it could not be backported so this approach was seen as a band aid that could be backported to Newton and Mitaka stable.","commit_id":"5f3749a1955cba22df9663b56a0ef8586354c6e8"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"078c48f76e4f87815eba52af2f1a3994f62af752","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                                            self.context,"},{"line_number":195,"context_line":"                                                            self.instance.uuid)"},{"line_number":196,"context_line":"            except exception.InstanceGroupNotFound:"},{"line_number":197,"context_line":"                pass"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        host \u003d None"},{"line_number":200,"context_line":"        while host is None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_8812dc07","line":197,"range":{"start_line":197,"start_character":16,"end_line":197,"end_character":20},"in_reply_to":"ba5da102_af97aa46","updated":"2016-11-01 15:42:59.000000000","message":"This would mean a change to the api because of the new exception so I think the same issue with backporting applies here too?","commit_id":"5f3749a1955cba22df9663b56a0ef8586354c6e8"}],"nova/tests/unit/conductor/tasks/test_live_migrate.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"19f739e49cb132d7298c120c0c877606e380eee1","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    @mock.patch.object(objects.InstanceGroup, \u0027get_by_instance_uuid\u0027)"},{"line_number":289,"context_line":"    def test_find_destination_works_with_no_request_spec(self,"},{"line_number":290,"context_line":"                                                         mock_inst_group):"},{"line_number":291,"context_line":"        mock_inst_group.return_value \u003d None"},{"line_number":292,"context_line":"        task \u003d live_migrate.LiveMigrationTask("},{"line_number":293,"context_line":"            self.context, self.instance, self.destination,"},{"line_number":294,"context_line":"            self.block_migration, self.disk_over_commit, self.migration,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_2b9caf68","line":291,"updated":"2016-08-03 09:36:28.000000000","message":"Thats not actually what happens.","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"d2df14dede290655ec18eaa550f798494f21ce26","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    @mock.patch.object(objects.InstanceGroup, \u0027get_by_instance_uuid\u0027)"},{"line_number":289,"context_line":"    def test_find_destination_works_with_no_request_spec(self,"},{"line_number":290,"context_line":"                                                         mock_inst_group):"},{"line_number":291,"context_line":"        mock_inst_group.return_value \u003d None"},{"line_number":292,"context_line":"        task \u003d live_migrate.LiveMigrationTask("},{"line_number":293,"context_line":"            self.context, self.instance, self.destination,"},{"line_number":294,"context_line":"            self.block_migration, self.disk_over_commit, self.migration,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_a25a5328","line":291,"in_reply_to":"bacf61ea_2b9caf68","updated":"2016-09-07 06:20:45.000000000","message":"Done","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"b0cf4c13c054273dd87379b43c8dd495def418ed","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        mock_inst_group.return_value \u003d self.fake_group"},{"line_number":354,"context_line":"        self.instance[\u0027image_ref\u0027] \u003d \u0027\u0027"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        self.mox.StubOutWithMock(scheduler_utils, \u0027setup_instance_group\u0027)"},{"line_number":357,"context_line":"        self.mox.StubOutWithMock(self.task.scheduler_client,"},{"line_number":358,"context_line":"                                 \u0027select_destinations\u0027)"},{"line_number":359,"context_line":"        self.mox.StubOutWithMock(self.task,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_06067d85","line":356,"range":{"start_line":356,"start_character":7,"end_line":356,"end_character":16},"updated":"2016-08-01 09:32:08.000000000","message":"I do understand that this test class uses mox but I do not think we should add more mox tests as we are trying to get rid of them.\nSpending time to write a new test without mox it is quite useful as it will become the example to follow when we will manage to remove the oter mox here.","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"19f739e49cb132d7298c120c0c877606e380eee1","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        mock_inst_group.return_value \u003d self.fake_group"},{"line_number":354,"context_line":"        self.instance[\u0027image_ref\u0027] \u003d \u0027\u0027"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        self.mox.StubOutWithMock(scheduler_utils, \u0027setup_instance_group\u0027)"},{"line_number":357,"context_line":"        self.mox.StubOutWithMock(self.task.scheduler_client,"},{"line_number":358,"context_line":"                                 \u0027select_destinations\u0027)"},{"line_number":359,"context_line":"        self.mox.StubOutWithMock(self.task,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_eb3617e6","line":356,"range":{"start_line":356,"start_character":7,"end_line":356,"end_character":16},"in_reply_to":"bacf61ea_06067d85","updated":"2016-08-03 09:36:28.000000000","message":"+1\n\nI really am not keen on mixing mox and mock, but I am ignoring that for now.","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"d2df14dede290655ec18eaa550f798494f21ce26","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        mock_inst_group.return_value \u003d self.fake_group"},{"line_number":354,"context_line":"        self.instance[\u0027image_ref\u0027] \u003d \u0027\u0027"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        self.mox.StubOutWithMock(scheduler_utils, \u0027setup_instance_group\u0027)"},{"line_number":357,"context_line":"        self.mox.StubOutWithMock(self.task.scheduler_client,"},{"line_number":358,"context_line":"                                 \u0027select_destinations\u0027)"},{"line_number":359,"context_line":"        self.mox.StubOutWithMock(self.task,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_c243d740","line":356,"range":{"start_line":356,"start_character":7,"end_line":356,"end_character":16},"in_reply_to":"bacf61ea_eb3617e6","updated":"2016-09-07 06:20:45.000000000","message":"Done","commit_id":"7e88141b1724d90692e090ab05724a6de8e325d7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b82714703f7e30fb320dbd3ec0a907aa328b0c02","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.disk_over_commit \u003d \"doc\""},{"line_number":51,"context_line":"        self.migration \u003d objects.Migration()"},{"line_number":52,"context_line":"        self.fake_spec \u003d objects.RequestSpec()"},{"line_number":53,"context_line":"        self.fake_spec.instance_group \u003d None"},{"line_number":54,"context_line":"        self._generate_task()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _generate_task(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ffa3b31_d33bec35","line":53,"updated":"2017-04-17 09:28:41.000000000","message":"The instance_group is None, that means the mock of \u0027objects.InstanceGroup.get_by_instance_uuid\u0027 in each test is meanless.","commit_id":"7ccfe94abd6b830d11427284623fbc83979dd72c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b82714703f7e30fb320dbd3ec0a907aa328b0c02","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    @mock.patch.object(objects.InstanceGroup, \u0027get_by_instance_uuid\u0027)"},{"line_number":260,"context_line":"    def test_find_destination_works(self, mock_inst_group):"},{"line_number":261,"context_line":"        mock_inst_group.side_effect \u003d \\"},{"line_number":262,"context_line":"            exception.InstanceGroupNotFound(group_uuid\u003d\u0027\u0027)"},{"line_number":263,"context_line":"        self.mox.StubOutWithMock(utils, \u0027get_image_from_system_metadata\u0027)"},{"line_number":264,"context_line":"        self.mox.StubOutWithMock(scheduler_utils, \u0027setup_instance_group\u0027)"},{"line_number":265,"context_line":"        self.mox.StubOutWithMock(objects.RequestSpec,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ffa3b31_73065889","line":262,"updated":"2017-04-17 09:28:41.000000000","message":"Since line 53 already set \u0027self.fake_spec.instance_group\u0027 to None, then we needn\u0027t this mock, When \u0027self.fake_spec.instance_group\u0027 is None, it will call \u0027objects.InstanceGroup.get_by_instance_uuid\u0027","commit_id":"7ccfe94abd6b830d11427284623fbc83979dd72c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b82714703f7e30fb320dbd3ec0a907aa328b0c02","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    def test_find_destination_works_with_no_request_spec(self,"},{"line_number":290,"context_line":"                                                         mock_inst_group):"},{"line_number":291,"context_line":"        mock_inst_group.side_effect \u003d \\"},{"line_number":292,"context_line":"            exception.InstanceGroupNotFound(group_uuid\u003d\u0027\u0027)"},{"line_number":293,"context_line":"        task \u003d live_migrate.LiveMigrationTask("},{"line_number":294,"context_line":"            self.context, self.instance, self.destination,"},{"line_number":295,"context_line":"            self.block_migration, self.disk_over_commit, self.migration,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ffa3b31_d3f64c90","line":292,"updated":"2017-04-17 09:28:41.000000000","message":"ditto, line 297 pass the request_spec as None, so this mock is useless","commit_id":"7ccfe94abd6b830d11427284623fbc83979dd72c"}]}
