)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"623761ed568c211418a2c90cf133ba8bf3f6a047","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     ZhuChunzhan \u003czhucz@cn.fujitsu.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-20 01:07:27 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve the performance of get evacuated instances from a host which should be destroyed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When destory the evacuated instances from a host,it need to get the host\u0027s instance which are found on the hypervisor."},{"line_number":10,"context_line":"If the driver doesn\u0027t support uuids listing, it will get all the instances on openstack."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba15a1d1_aaf9864f","line":7,"updated":"2015-09-14 11:22:54.000000000","message":"Please note the line length comments here:\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure\n\nThe first line should be limited to 50 characters and should not end with a period (commit messages over 72 characters will be rejected by the gate).","commit_id":"07003efc0f344e54210b1e86a386a75104ec6b51"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"301ed871161d81e140eafdf34eec4823764b9f9d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When destory the evacuated instances from a host,"},{"line_number":10,"context_line":"it need to get the host\u0027s instance which are found on the hypervisor."},{"line_number":11,"context_line":"If the driver doesn\u0027t support uuids listing, it will get all the"},{"line_number":12,"context_line":"instances on openstack."},{"line_number":13,"context_line":"So we use evacuate instance\u0027s uuid which were evacuated from current"},{"line_number":14,"context_line":"host to filter the instance."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"ba15a1d1_08419339","line":12,"updated":"2015-09-21 11:58:30.000000000","message":"nit: on openstack ? in db?","commit_id":"05c4617928539ee7e3b4d4e04d7a31db5a19adcf"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"2bbf80a0e0d3f2edf9a8114c34825f8ab0ab8a75","unresolved":false,"context_lines":[{"line_number":11,"context_line":"If the driver doesn\u0027t support uuids listing, it will get all the"},{"line_number":12,"context_line":"instances in db."},{"line_number":13,"context_line":"So we use evacuate instance\u0027s uuid which were evacuated from current"},{"line_number":14,"context_line":"host to filter the instance."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1486026"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"9a1a9d01_c0b38f09","line":14,"updated":"2015-09-24 15:57:29.000000000","message":"Suggest:\n\n  When searching for evacuated instances on a host, if the driver\n  doesn\u0027t support UUID listing, it returns all the instances. We\n  already have the UUIDs from the evacuation objects, so filter\n  by those to reduce the amount of data the DB has to return.","commit_id":"f3c02966c365f368cf5eadc1deaafab4136bd09d"}],"nova/compute/manager.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"623761ed568c211418a2c90cf133ba8bf3f6a047","unresolved":false,"context_lines":[{"line_number":762,"context_line":"            if len(driver_uuids) \u003d\u003d 0:"},{"line_number":763,"context_line":"                # Short circuit, don\u0027t waste a DB call"},{"line_number":764,"context_line":"                return objects.InstanceList()"},{"line_number":765,"context_line":"            filters[\u0027uuid\u0027] \u003d driver_uuids"},{"line_number":766,"context_line":"            local_instances \u003d objects.InstanceList.get_by_filters("},{"line_number":767,"context_line":"                context, filters, use_slave\u003dTrue)"},{"line_number":768,"context_line":"            return local_instances"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_2ad6d6c5","line":765,"updated":"2015-09-14 11:22:54.000000000","message":"it seems like this will just over-ride the value you pass in here.\n\nI think you need to change this time for your change to make any difference?","commit_id":"07003efc0f344e54210b1e86a386a75104ec6b51"},{"author":{"_account_id":17787,"name":"ZhuChunzhan","email":"zhucz@cn.fujitsu.com","username":"zhucz"},"change_message_id":"274651fdefd4c380bbf744deb9dabcdf8c1561f3","unresolved":false,"context_lines":[{"line_number":762,"context_line":"            if len(driver_uuids) \u003d\u003d 0:"},{"line_number":763,"context_line":"                # Short circuit, don\u0027t waste a DB call"},{"line_number":764,"context_line":"                return objects.InstanceList()"},{"line_number":765,"context_line":"            filters[\u0027uuid\u0027] \u003d driver_uuids"},{"line_number":766,"context_line":"            local_instances \u003d objects.InstanceList.get_by_filters("},{"line_number":767,"context_line":"                context, filters, use_slave\u003dTrue)"},{"line_number":768,"context_line":"            return local_instances"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_a663e119","line":765,"in_reply_to":"ba15a1d1_2ad6d6c5","updated":"2015-09-15 02:39:08.000000000","message":"That is not a problem If the driver support uuids listing, \n\"filters[\u0027uuid\u0027]\" will be over-ride by driver_uuids.\nBut If the driver doesn\u0027t support uuids listing, \n\"self.driver.list_instance_uuids()\" will throw a \nNotImplementedErro, so the source below will be executed.\nThen we will get instance which were evacuated from current\n host instead of get all instances.","commit_id":"07003efc0f344e54210b1e86a386a75104ec6b51"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"258a6e27f6c6387599606f414724f7e52c7f655e","unresolved":false,"context_lines":[{"line_number":762,"context_line":"            if len(driver_uuids) \u003d\u003d 0:"},{"line_number":763,"context_line":"                # Short circuit, don\u0027t waste a DB call"},{"line_number":764,"context_line":"                return objects.InstanceList()"},{"line_number":765,"context_line":"            filters[\u0027uuid\u0027] \u003d driver_uuids"},{"line_number":766,"context_line":"            local_instances \u003d objects.InstanceList.get_by_filters("},{"line_number":767,"context_line":"                context, filters, use_slave\u003dTrue)"},{"line_number":768,"context_line":"            return local_instances"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_3f919d47","line":765,"in_reply_to":"ba15a1d1_a663e119","updated":"2015-09-17 09:52:42.000000000","message":"I kinda see what you mean, but it feels very odd.","commit_id":"07003efc0f344e54210b1e86a386a75104ec6b51"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fdd8fbce476ed16bc04974d360bf916ee26fde47","unresolved":false,"context_lines":[{"line_number":761,"context_line":"            driver_uuids \u003d self.driver.list_instance_uuids()"},{"line_number":762,"context_line":"            if len(driver_uuids) \u003d\u003d 0:"},{"line_number":763,"context_line":"                # Short circuit, don\u0027t waste a DB call"},{"line_number":764,"context_line":"                return objects.InstanceList()"},{"line_number":765,"context_line":"            filters[\u0027uuid\u0027] \u003d driver_uuids"},{"line_number":766,"context_line":"            local_instances \u003d objects.InstanceList.get_by_filters("},{"line_number":767,"context_line":"                context, filters, use_slave\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_83732815","line":764,"updated":"2015-09-15 06:28:25.000000000","message":"Check the previous comment from John, I agree with him. I think you should change this to append also. And then you can remove some useless code at line 811","commit_id":"bbb4f19a9913f1d0e999057e2d61039160afe865"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fdd8fbce476ed16bc04974d360bf916ee26fde47","unresolved":false,"context_lines":[{"line_number":808,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters)"},{"line_number":809,"context_line":"        evacuations \u003d {mig.instance_uuid: mig for mig in evacuations}"},{"line_number":810,"context_line":"        evacuated \u003d [inst for inst in local_instances"},{"line_number":811,"context_line":"                     if inst.uuid in evacuations]"},{"line_number":812,"context_line":"        for instance in evacuated:"},{"line_number":813,"context_line":"            migration \u003d evacuations[instance.uuid]"},{"line_number":814,"context_line":"            LOG.info(_LI(\u0027Deleting instance as it has been evacuated from \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_634ff4bd","line":811,"updated":"2015-09-15 06:28:25.000000000","message":"If you change the line at 765, you can remove this line.","commit_id":"bbb4f19a9913f1d0e999057e2d61039160afe865"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9ca76fe3f8688880c0b95653061b39f3f4c40f9f","unresolved":false,"context_lines":[{"line_number":818,"context_line":"        evacuations \u003d objects.MigrationList.get_by_filters(context, filters)"},{"line_number":819,"context_line":"        if not evacuations:"},{"line_number":820,"context_line":"            return"},{"line_number":821,"context_line":"        evacuations \u003d {mig.instance_uuid: mig for mig in evacuations}"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"        filters \u003d {\u0027deleted\u0027: False}"},{"line_number":824,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_5fced12e","side":"PARENT","line":821,"updated":"2015-09-17 10:07:05.000000000","message":"Nit: I wish this had not moved, it would be easier to read, I feel.","commit_id":"5d34c572cb4b04e4df1fa1103b456787972c6332"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9ca76fe3f8688880c0b95653061b39f3f4c40f9f","unresolved":false,"context_lines":[{"line_number":775,"context_line":"        if not filters:"},{"line_number":776,"context_line":"            filters \u003d {}"},{"line_number":777,"context_line":"        try:"},{"line_number":778,"context_line":"            if not filters.get(\u0027uuid\u0027):"},{"line_number":779,"context_line":"                driver_uuids \u003d self.driver.list_instance_uuids()"},{"line_number":780,"context_line":"                if len(driver_uuids) \u003d\u003d 0:"},{"line_number":781,"context_line":"                    # Short circuit, don\u0027t waste a DB call"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_7f2dd5a6","line":778,"updated":"2015-09-17 10:07:05.000000000","message":"Sorry, I just realised this totally breaks the logic, because we really need the intersection of the two uuid lists, which most of the time should be the empty list.\n\nI feel that logic needs to go in here somehow.","commit_id":"75213ecae3eade7e59e6eb4d5127394647db82d5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9ca76fe3f8688880c0b95653061b39f3f4c40f9f","unresolved":false,"context_lines":[{"line_number":820,"context_line":"        if not evacuations:"},{"line_number":821,"context_line":"            return"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"        filters \u003d {\u0027deleted\u0027: False,"},{"line_number":824,"context_line":"                   \u0027uuid\u0027: [mig.instance_uuid for mig in evacuations]"},{"line_number":825,"context_line":"        }"},{"line_number":826,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_5f67b14c","line":823,"updated":"2015-09-17 10:07:05.000000000","message":"Nit: can the formatting match that on line 814","commit_id":"75213ecae3eade7e59e6eb4d5127394647db82d5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e1bd78419f97d9b6f0891c3820b2a47b4605afcd","unresolved":false,"context_lines":[{"line_number":825,"context_line":"        }"},{"line_number":826,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters)"},{"line_number":827,"context_line":"        evacuations \u003d {mig.instance_uuid: mig for mig in evacuations}"},{"line_number":828,"context_line":"        evacuated \u003d [inst for inst in local_instances"},{"line_number":829,"context_line":"                     if inst.uuid in evacuations]"},{"line_number":830,"context_line":"        for instance in evacuated:"},{"line_number":831,"context_line":"            migration \u003d evacuations[instance.uuid]"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_2ad2bd5c","line":828,"updated":"2015-09-17 10:08:22.000000000","message":"not that once you do the union inside _get_instances_on_driver, you will find that you no longer need these two lines of code. evacuated_and_still_on_host will we what the _get_instances_on_driver call will return.","commit_id":"75213ecae3eade7e59e6eb4d5127394647db82d5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9ca76fe3f8688880c0b95653061b39f3f4c40f9f","unresolved":false,"context_lines":[{"line_number":826,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters)"},{"line_number":827,"context_line":"        evacuations \u003d {mig.instance_uuid: mig for mig in evacuations}"},{"line_number":828,"context_line":"        evacuated \u003d [inst for inst in local_instances"},{"line_number":829,"context_line":"                     if inst.uuid in evacuations]"},{"line_number":830,"context_line":"        for instance in evacuated:"},{"line_number":831,"context_line":"            migration \u003d evacuations[instance.uuid]"},{"line_number":832,"context_line":"            LOG.info(_LI(\u0027Deleting instance as it has been evacuated from \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_9fe0e997","line":829,"updated":"2015-09-17 10:07:05.000000000","message":"Nit: This still seems quite messy and unclear right now. It might just be the ordering and the removing of the space that does it.\n\nI guess the key bit is we only want the instances that are still on the host, and also in the evacuation list, so we do need to call _get_instances_on_driver. Oh wait, the above change just broke that.","commit_id":"75213ecae3eade7e59e6eb4d5127394647db82d5"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"8cd992aaada2de07d955c4347862f4cd351a4b93","unresolved":false,"context_lines":[{"line_number":782,"context_line":"            if not filters.get(\u0027uuid\u0027):"},{"line_number":783,"context_line":"                filters[\u0027uuid\u0027] \u003d driver_uuids"},{"line_number":784,"context_line":"            else:"},{"line_number":785,"context_line":"                filters[\u0027uuid\u0027] \u003d list(set(filters[\u0027uuid\u0027]) \u0026 set(driver_uuids))"},{"line_number":786,"context_line":"            local_instances \u003d objects.InstanceList.get_by_filters("},{"line_number":787,"context_line":"                context, filters, use_slave\u003dTrue)"},{"line_number":788,"context_line":"            return local_instances"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_b225465d","line":785,"updated":"2015-09-24 07:24:30.000000000","message":"pep8 is complaining about this line being to long","commit_id":"60767ca3a6d5ed168adce001a7059307d26652b2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0ba595360bdaebcbdf3d280d85cccb4848078813","unresolved":false,"context_lines":[{"line_number":782,"context_line":"            if not filters.get(\u0027uuid\u0027):"},{"line_number":783,"context_line":"                filters[\u0027uuid\u0027] \u003d driver_uuids"},{"line_number":784,"context_line":"            else:"},{"line_number":785,"context_line":"                filters[\u0027uuid\u0027] \u003d list(set(filters[\u0027uuid\u0027]) \u0026 "},{"line_number":786,"context_line":"                                       set(driver_uuids))"},{"line_number":787,"context_line":"            local_instances \u003d objects.InstanceList.get_by_filters("},{"line_number":788,"context_line":"                context, filters, use_slave\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_9f069784","line":785,"updated":"2015-09-24 11:38:55.000000000","message":"please remove the whitespace","commit_id":"176f239b190e5d58e8f9db9b6470d4ded088c483"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"14988ac1ce0007c1b067fb2db03a563bbd5072e9","unresolved":false,"context_lines":[{"line_number":778,"context_line":"            driver_uuids \u003d self.driver.list_instance_uuids()"},{"line_number":779,"context_line":"            if len(driver_uuids) \u003d\u003d 0:"},{"line_number":780,"context_line":"                # Short circuit, don\u0027t waste a DB call"},{"line_number":781,"context_line":"                return objects.InstanceList()"},{"line_number":782,"context_line":"            if not filters.get(\u0027uuid\u0027):"},{"line_number":783,"context_line":"                filters[\u0027uuid\u0027] \u003d driver_uuids"},{"line_number":784,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a2fa921_b4f2236e","line":781,"range":{"start_line":781,"start_character":16,"end_line":781,"end_character":45},"updated":"2015-10-13 09:47:37.000000000","message":"well, that line won\u0027t change anything, right ?\n\nnot sure I understand the problem in the bug report, because if the drivers doesn\u0027t return a list of uuids, then it won\u0027t evacuate below (and not get all the cloud instances contrary to what you said in the bug report) because objects.InstanceList() takes a collection like []","commit_id":"f3c02966c365f368cf5eadc1deaafab4136bd09d"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"8cd992aaada2de07d955c4347862f4cd351a4b93","unresolved":false,"context_lines":[{"line_number":2360,"context_line":"            exc, vm_states.ACTIVE, None, expected_exception)"},{"line_number":2361,"context_line":""},{"line_number":2362,"context_line":"    def test_destroy_evacuated_instances(self):"},{"line_number":2363,"context_line":"        our_host \u003d self.compute.host"},{"line_number":2364,"context_line":"        instance_1 \u003d objects.Instance(self.context)"},{"line_number":2365,"context_line":"        instance_1.uuid \u003d \u0027foo\u0027"},{"line_number":2366,"context_line":"        instance_1.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_921b621c","line":2363,"updated":"2015-09-24 07:24:30.000000000","message":"instance_1 isn\u0027t used anymore, so everything about it can be removed.","commit_id":"60767ca3a6d5ed168adce001a7059307d26652b2"}]}
