)]}'
{"nova/conductor/tasks/live_migrate.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"4689f1b40069c6bee2e79e3206e11a100519ce7f","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    def _check_requested_destination(self):"},{"line_number":99,"context_line":"        self._check_destination_is_not_source()"},{"line_number":100,"context_line":"        self._check_host_is_up(self.destination)"},{"line_number":101,"context_line":"        self._check_destination_has_enough_memory()"},{"line_number":102,"context_line":"        self._check_compatible_with_source_hypervisor(self.destination)"},{"line_number":103,"context_line":"        self._call_livem_checks_on_host(self.destination)"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_58ff8201","side":"PARENT","line":101,"updated":"2015-05-06 15:12:34.000000000","message":"instead of remove total check here, \nis it possible to use self.compute_rpcapi.to check on the host directly, in case we know the allocate ratio there?","commit_id":"c3a85120c7dfe94efb69c5cb4db60531ac924289"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"34a33e982fda71c644a345e620b5072c336567c2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            raise exception.ComputeServiceUnavailable(host\u003dhost)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _check_requested_destination(self):"},{"line_number":99,"context_line":"        self._check_destination_is_not_source()"},{"line_number":100,"context_line":"        self._check_host_is_up(self.destination)"},{"line_number":101,"context_line":"        self._check_compatible_with_source_hypervisor(self.destination)"},{"line_number":102,"context_line":"        self._call_livem_checks_on_host(self.destination)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_61bfed60","line":99,"updated":"2015-06-22 12:55:44.000000000","message":"Could the check destination logic not include this sort of check?","commit_id":"30d05ee5e33a29967f9409503b0c6da60dca1335"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4b48f04cbe18959fc4dafcb1abbc9b95f6cdc8bd","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # NOTE(sbauza): Mimic the RAMFilter logic in order to have the same"},{"line_number":122,"context_line":"        # ram validation"},{"line_number":123,"context_line":"        avail \u003d total_ram_mb * ram_ratio - (total_ram_mb - free_ram_mb)"},{"line_number":124,"context_line":"        if not mem_inst or avail \u003c\u003d mem_inst:"},{"line_number":125,"context_line":"            instance_uuid \u003d self.instance.uuid"},{"line_number":126,"context_line":"            dest \u003d self.destination"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_d7507334","line":123,"updated":"2015-09-17 15:33:34.000000000","message":"would it not be better to have a shared method that returns the available ram. for all e know tomorrow someone will change that calculation and this will break again.","commit_id":"70f5c501b51b23ce11f936de0b6fd2f7278df224"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"bcc519ad765e31a41a18dafa3597e523d73458b8","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # NOTE(sbauza): Mimic the RAMFilter logic in order to have the same"},{"line_number":122,"context_line":"        # ram validation"},{"line_number":123,"context_line":"        avail \u003d total_ram_mb * ram_ratio - (total_ram_mb - free_ram_mb)"},{"line_number":124,"context_line":"        if not mem_inst or avail \u003c\u003d mem_inst:"},{"line_number":125,"context_line":"            instance_uuid \u003d self.instance.uuid"},{"line_number":126,"context_line":"            dest \u003d self.destination"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_b098651d","line":123,"in_reply_to":"ba15a1d1_8d28ae34","updated":"2015-09-17 16:18:06.000000000","message":"Also, if you look at the RAMFilter, you\u0027ll see that the fields are from the HostState, not the ComputeNode object, so that\u0027s not really the same stuff even if the logic is the same.","commit_id":"70f5c501b51b23ce11f936de0b6fd2f7278df224"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ae192fd2fd95a791491b7474d911d7c5eef53659","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # NOTE(sbauza): Mimic the RAMFilter logic in order to have the same"},{"line_number":122,"context_line":"        # ram validation"},{"line_number":123,"context_line":"        avail \u003d total_ram_mb * ram_ratio - (total_ram_mb - free_ram_mb)"},{"line_number":124,"context_line":"        if not mem_inst or avail \u003c\u003d mem_inst:"},{"line_number":125,"context_line":"            instance_uuid \u003d self.instance.uuid"},{"line_number":126,"context_line":"            dest \u003d self.destination"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_8d28ae34","line":123,"in_reply_to":"ba15a1d1_d7507334","updated":"2015-09-17 15:56:09.000000000","message":"Well, I could expose that in the scheduler.utils module, but I don\u0027t really get the benefits of that since this code is targeted somehow to disappear soon once http://specs.openstack.org/openstack/nova-specs/specs/liberty/approved/check-destination-on-migrations.html is implemented... Here, that\u0027s a workaround for fixing an historical bug, and I thought my comment is enough.","commit_id":"70f5c501b51b23ce11f936de0b6fd2f7278df224"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"ac457bbfbbaa54b0a71cb92a57495226d68f8b89","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                    instance_id\u003dself.instance.uuid, host\u003dself.destination)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _check_destination_has_enough_memory(self):"},{"line_number":113,"context_line":"        compute \u003d self._get_compute_info(self.destination)"},{"line_number":114,"context_line":"        free_ram_mb \u003d compute.free_ram_mb"},{"line_number":115,"context_line":"        total_ram_mb \u003d compute.memory_mb"},{"line_number":116,"context_line":"        mem_inst \u003d self.instance.memory_mb"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_16402206","line":113,"updated":"2015-09-17 20:29:05.000000000","message":"do we need to consider \nhttps://github.com/openstack/nova/blob/master/nova/scheduler/filters/ram_filter.py#L40\nlogic as well","commit_id":"81ecf2aab9cd1d2a5c7d3d883d3093231d0755db"}],"nova/tests/unit/conductor/tasks/test_live_migrate.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"e93049ed21a0c90f999089f8601f0a72f1514c22","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            hypervisor_version\u003d6.1,"},{"line_number":156,"context_line":"            free_ram_mb\u003d513,"},{"line_number":157,"context_line":"            memory_mb\u003d512,"},{"line_number":158,"context_line":"            ram_allocation_ratio\u003d1.0"},{"line_number":159,"context_line":"        )"},{"line_number":160,"context_line":"        self.task._get_compute_info(self.destination)\\"},{"line_number":161,"context_line":"                .AndReturn(hypervisor_details)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_cc9ac1c5","line":158,"updated":"2015-09-21 15:47:50.000000000","message":"Nit: add a trailing comma if you respin, so that any future additions make a cleaner diff.","commit_id":"370acf4a8581deb0555395f7d24d7306d64c84b1"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"e93049ed21a0c90f999089f8601f0a72f1514c22","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                objects.ComputeNode(free_ram_mb\u003d511,"},{"line_number":201,"context_line":"                                    memory_mb\u003d512,"},{"line_number":202,"context_line":"                                    ram_allocation_ratio\u003d1.0,"},{"line_number":203,"context_line":"                                    ))"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        self.mox.ReplayAll()"},{"line_number":206,"context_line":"        self.assertRaises(exception.MigrationPreCheckError,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_acce6db2","line":203,"updated":"2015-09-21 15:47:50.000000000","message":"This updates the existing test and is OK. I would like to see another test that passes in different values for the ram_allocation_ratio to verify that the changed code is behaving as expected for different values.","commit_id":"370acf4a8581deb0555395f7d24d7306d64c84b1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a177beaaa78e04182805f23f617ae6a57c4d6ff4","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                objects.ComputeNode(free_ram_mb\u003d511,"},{"line_number":201,"context_line":"                                    memory_mb\u003d512,"},{"line_number":202,"context_line":"                                    ram_allocation_ratio\u003d1.0,"},{"line_number":203,"context_line":"                                    ))"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        self.mox.ReplayAll()"},{"line_number":206,"context_line":"        self.assertRaises(exception.MigrationPreCheckError,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_cdfcbf40","line":203,"in_reply_to":"ba15a1d1_acce6db2","updated":"2015-10-05 13:17:20.000000000","message":"Sounds a bit nitpicking IMHO, but I can update this test and add a ratio\u003d2.0 plus a comment to make sure we call the ram_alloc_ratio","commit_id":"370acf4a8581deb0555395f7d24d7306d64c84b1"}]}
