)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"9b7e0c656ee93ef30b9d68ef6393ae67d6330119","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix total vcpu calculation in libvirt driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The get_vcpu_total method in libvirt driver currently return the total"},{"line_number":10,"context_line":"pcpu. This is not consistent with the get_vcpu_used method, which might"},{"line_number":11,"context_line":"returns a greater vcpu_used than vcpu_total. This fix uses"},{"line_number":12,"context_line":"cpu_allocation_ratio parameter to calculate correct vcpu_total. Also"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F%2BwPI%3D","line":9,"updated":"2013-11-20 16:40:48.000000000","message":"(nit) return -\u003e returns","commit_id":"294b63b8fca08d645bae663f6f9902009e3ec165"},{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"9b7e0c656ee93ef30b9d68ef6393ae67d6330119","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The get_vcpu_total method in libvirt driver currently return the total"},{"line_number":10,"context_line":"pcpu. This is not consistent with the get_vcpu_used method, which might"},{"line_number":11,"context_line":"returns a greater vcpu_used than vcpu_total. This fix uses"},{"line_number":12,"context_line":"cpu_allocation_ratio parameter to calculate correct vcpu_total. Also"},{"line_number":13,"context_line":"provide a test case to validate the data being returned."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F%2BwO8%3D","line":11,"updated":"2013-11-20 16:40:48.000000000","message":"(nit) returns -\u003e return","commit_id":"294b63b8fca08d645bae663f6f9902009e3ec165"}],"nova/tests/virt/libvirt/test_libvirt.py":[{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"9b7e0c656ee93ef30b9d68ef6393ae67d6330119","unresolved":false,"context_lines":[{"line_number":5107,"context_line":"        self.assertEqual(5, driver.get_vcpu_used())"},{"line_number":5108,"context_line":""},{"line_number":5109,"context_line":"    def test_total_vcpu(self):"},{"line_number":5110,"context_line":"        \"\"\"Checks if vcpu total count respect the cpu_allocation_ratio"},{"line_number":5111,"context_line":"        \"\"\""},{"line_number":5112,"context_line":""},{"line_number":5113,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BwPs%3D","line":5110,"updated":"2013-11-20 16:40:48.000000000","message":"(nit) respect -\u003e respects","commit_id":"294b63b8fca08d645bae663f6f9902009e3ec165"},{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"9b7e0c656ee93ef30b9d68ef6393ae67d6330119","unresolved":false,"context_lines":[{"line_number":5115,"context_line":""},{"line_number":5116,"context_line":"        def fakeGetInfo():"},{"line_number":5117,"context_line":"            # [Unused, RAM, PCPU]"},{"line_number":5118,"context_line":"            return [None, 256, 1]"},{"line_number":5119,"context_line":""},{"line_number":5120,"context_line":"        conn.getInfo \u003d fakeGetInfo"},{"line_number":5121,"context_line":"        CONF.cpu_allocation_ratio \u003d 8.0"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BwPU%3D","line":5118,"updated":"2013-11-20 16:40:48.000000000","message":"It looks like the value 256 isn\u0027t used for anything here, so suggest putting in a 0.  The usage of 256 makes it sound like 256 is significant to the test.","commit_id":"294b63b8fca08d645bae663f6f9902009e3ec165"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"9b7e0c656ee93ef30b9d68ef6393ae67d6330119","unresolved":false,"context_lines":[{"line_number":3440,"context_line":"            return 0"},{"line_number":3441,"context_line":""},{"line_number":3442,"context_line":"        if CONF.vcpu_pin_set is None:"},{"line_number":3443,"context_line":"            self._vcpu_total \u003d int(total_pcpus * CONF.cpu_allocation_ratio)"},{"line_number":3444,"context_line":"            return self._vcpu_total"},{"line_number":3445,"context_line":""},{"line_number":3446,"context_line":"        available_ids \u003d self._get_cpuset_ids()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BwQU%3D","line":3443,"updated":"2013-11-20 16:40:48.000000000","message":"I think your test case covers this path.","commit_id":"294b63b8fca08d645bae663f6f9902009e3ec165"},{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"9b7e0c656ee93ef30b9d68ef6393ae67d6330119","unresolved":false,"context_lines":[{"line_number":3447,"context_line":"        if available_ids[-1] \u003e\u003d total_pcpus:"},{"line_number":3448,"context_line":"            raise exception.Invalid(_(\"Invalid vcpu_pin_set config, \""},{"line_number":3449,"context_line":"                                      \"out of hypervisor cpu range.\"))"},{"line_number":3450,"context_line":"        self._vcpu_total \u003d int(len(available_ids) * CONF.cpu_allocation_ratio)"},{"line_number":3451,"context_line":"        return self._vcpu_total"},{"line_number":3452,"context_line":""},{"line_number":3453,"context_line":"    def get_memory_mb_total(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BwP8%3D","line":3450,"updated":"2013-11-20 16:40:48.000000000","message":"Is there another test that needs to be created/modified to verify this path is correct?","commit_id":"294b63b8fca08d645bae663f6f9902009e3ec165"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"f4c12aa20d9a90a0592092abb56ea639e87afd8c","unresolved":false,"context_lines":[{"line_number":3447,"context_line":"        if available_ids[-1] \u003e\u003d total_pcpus:"},{"line_number":3448,"context_line":"            raise exception.Invalid(_(\"Invalid vcpu_pin_set config, \""},{"line_number":3449,"context_line":"                                      \"out of hypervisor cpu range.\"))"},{"line_number":3450,"context_line":"        self._vcpu_total \u003d int(len(available_ids) * CONF.cpu_allocation_ratio)"},{"line_number":3451,"context_line":"        return self._vcpu_total"},{"line_number":3452,"context_line":""},{"line_number":3453,"context_line":"    def get_memory_mb_total(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BwNY%3D","line":3450,"in_reply_to":"AAAATn%2F%2BwP8%3D","updated":"2013-11-20 16:46:22.000000000","message":"Yes there is, you are right, my bad.\nThanks for your review, will update the patch asap","commit_id":"294b63b8fca08d645bae663f6f9902009e3ec165"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"b65797a2211a9aef21f67577ae6d3c071eab91eb","unresolved":false,"context_lines":[{"line_number":3520,"context_line":"            raise exception.Invalid(_(\"Invalid vcpu_pin_set config, \""},{"line_number":3521,"context_line":"                                      \"out of hypervisor cpu range.\"))"},{"line_number":3522,"context_line":"        self._vcpu_total \u003d int(len(available_ids) * CONF.cpu_allocation_ratio)"},{"line_number":3523,"context_line":"        return self._vcpu_total"},{"line_number":3524,"context_line":""},{"line_number":3525,"context_line":"    def get_memory_mb_total(self):"},{"line_number":3526,"context_line":"        \"\"\"Get the total memory size(MB) of physical computer."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BU%2Bg%3D","line":3523,"updated":"2013-11-27 10:48:03.000000000","message":"This change makes me question the entire semantics of the \u0027get_vcpu_total\u0027 method really.\n\nThis is used from the \u0027update_status\u0027 method to fill the \u0027vcpus\u0027 field. This is a standardized driver method so we should not diverge in behaviour between drivers. The VMWare driver at least returns the total physical CPU threads. I can\u0027t tell what the XenAPI driver is returning here, but it certainly doesn\u0027t involve the cpu_allocation_ratio.\n\nIMHO it would be better to rename the \u0027vcpu\u0027 field to \u0027pcpus\u0027 to reflect what value the hypervisor drivers are actually returning here, but that might impact API.\n\nIn any case I don\u0027t think adding a multiplication by cpu_allocation_ratio in the libvirt driver is the right answer.","commit_id":"93d29d91d1627f78434be9b8e13fe7b19bacceb9"}]}
