)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75d58e3eb823231a8fe102c0c4dba85cb7a3e935","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Hide hypervisor id on windows guests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Blueprints hide-hypervisor-id-flavor-extra-spec and"},{"line_number":10,"context_line":"add-kvm-hidden-feature allow hiding KVM\u0027s signature for guests, which is"},{"line_number":11,"context_line":"necessary for Nvidia drivers to work in VMs with passthrough GPUs."},{"line_number":12,"context_line":"While this works well for linux guests on KVM, it doesn\u0027t work for"},{"line_number":13,"context_line":"Windows guests."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9fb8cfa7_8782e74e","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":22},"updated":"2019-06-03 20:47:44.000000000","message":"nit: if you rewrote this as:\n\n\"Blueprint hide-hypervisor-id-flavor-extra-spec and\nblueprint add-kvm-hidden-feature\" it would link from gerrit. Granted that doesn\u0027t help someone reading the git log later, so alternatively you could reference the blueprints ([1][2]) and link to them below.","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1bfa79885311f3c68b219757de26e854ca99435","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Hide hypervisor id on windows guests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Blueprints hide-hypervisor-id-flavor-extra-spec and"},{"line_number":10,"context_line":"add-kvm-hidden-feature allow hiding KVM\u0027s signature for guests, which is"},{"line_number":11,"context_line":"necessary for Nvidia drivers to work in VMs with passthrough GPUs."},{"line_number":12,"context_line":"While this works well for linux guests on KVM, it doesn\u0027t work for"},{"line_number":13,"context_line":"Windows guests."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9fb8cfa7_e62724b6","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":22},"in_reply_to":"9fb8cfa7_8782e74e","updated":"2019-06-03 22:25:52.000000000","message":"Done","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75d58e3eb823231a8fe102c0c4dba85cb7a3e935","unresolved":false,"context_lines":[{"line_number":19,"context_line":"This change generates an extra element in the libvirt xml for Windows"},{"line_number":20,"context_line":"guests on KVM which obfuscates HyperV\u0027s signature too, controlled by the"},{"line_number":21,"context_line":"existing image and flavor parameters (img_hide_hypervisor_id and"},{"line_number":22,"context_line":"hide_hypervisor_id correspondingly). The extra xml element is"},{"line_number":23,"context_line":"  \u003cvendor_id state\u003d\u0027on\u0027 value\u003d\u00271234567890ab\u0027/\u003e"},{"line_number":24,"context_line":"in features/hyperv."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Iaaeae9281301f14f4ae9b43f4a06de58b699fd68"},{"line_number":27,"context_line":"Closes-Bug: 1779845"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9fb8cfa7_87f747f6","line":24,"range":{"start_line":22,"start_character":37,"end_line":24,"end_character":19},"updated":"2019-06-03 20:47:44.000000000","message":"Ack: https://libvirt.org/formatdomain.html#elementsFeatures\n\nvendor_id\tSet hypervisor vendor id\ton, off; value - string, up to 12 characters\t1.3.3 (QEMU 2.5)","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"65680947f9bc66a9ae40bdc9142ecce6bba97f23","unresolved":false,"context_lines":[{"line_number":3607,"context_line":"        self.assertTrue(cfg.features[2].vapic)"},{"line_number":3608,"context_line":""},{"line_number":3609,"context_line":"    @mock.patch.object(host.Host, \u0027has_min_version\u0027)"},{"line_number":3610,"context_line":"    def test_get_guest_config_windows_hyperv_all(self, mock_version):"},{"line_number":3611,"context_line":"        # Similar to test_get_guest_config_windows_hyperv_feature2"},{"line_number":3612,"context_line":"        #   but also test hiding the HyperV signature with the flavor"},{"line_number":3613,"context_line":"        #   extra_spec \"hide_hypervisor_id\""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_f232aff2","line":3610,"updated":"2018-08-02 12:28:36.000000000","message":"Please add test for img_hide_hypervisor_id respectively.","commit_id":"2a8a2d88aa417f17839fe1f677b868a0c1721c96"},{"author":{"_account_id":27961,"name":"Konstantinos Samaras-Tsakiris","email":"konstantinos.samaras-tsakiris@cern.ch","username":"kosamara"},"change_message_id":"367821271d50941a71a7400d6dd20850c69fb70f","unresolved":false,"context_lines":[{"line_number":3607,"context_line":"        self.assertTrue(cfg.features[2].vapic)"},{"line_number":3608,"context_line":""},{"line_number":3609,"context_line":"    @mock.patch.object(host.Host, \u0027has_min_version\u0027)"},{"line_number":3610,"context_line":"    def test_get_guest_config_windows_hyperv_all(self, mock_version):"},{"line_number":3611,"context_line":"        # Similar to test_get_guest_config_windows_hyperv_feature2"},{"line_number":3612,"context_line":"        #   but also test hiding the HyperV signature with the flavor"},{"line_number":3613,"context_line":"        #   extra_spec \"hide_hypervisor_id\""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_588dc1d8","line":3610,"in_reply_to":"5f7c97a3_f232aff2","updated":"2018-08-02 14:35:24.000000000","message":"done","commit_id":"2a8a2d88aa417f17839fe1f677b868a0c1721c96"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f735101b04829e739cc8e99029d77e3df9d8c266","unresolved":false,"context_lines":[{"line_number":3691,"context_line":"        self.assertEqual(8191, cfg.features[2].spinlock_retries)"},{"line_number":3692,"context_line":"        self.assertTrue(cfg.features[2].vapic)"},{"line_number":3693,"context_line":"        self.assertTrue(cfg.features[2].vendorid_spoof)"},{"line_number":3694,"context_line":""},{"line_number":3695,"context_line":"    def test_get_guest_config_with_two_nics(self):"},{"line_number":3696,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":3697,"context_line":"        instance_ref \u003d objects.Instance(**self.test_instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_7099c61d","line":3694,"updated":"2019-05-31 19:25:09.000000000","message":"Couple things here:\n\n- These tests are pretty repetitive and could easily be DRY\u0027d with the one they were cloned from via a helper method.\n- You should add an assertion (in one of the existing tests, like test_get_guest_config_windows_hyperv_feature2) that the vendorid_spoof property is False.\n- To be really complete, you could have a test where both the flavor and the image have the flag. (This would be really verbose if it was another copy-paste, but pretty unintrusive if you DRY\u0027d as suggested.)","commit_id":"1ad1318d1c0e1eeb4a1587df309d22577a7412d4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e8c6d6a2ac49ee0ea9527c4e7cd90f9731e1f02d","unresolved":false,"context_lines":[{"line_number":3691,"context_line":"        self.assertEqual(8191, cfg.features[2].spinlock_retries)"},{"line_number":3692,"context_line":"        self.assertTrue(cfg.features[2].vapic)"},{"line_number":3693,"context_line":"        self.assertTrue(cfg.features[2].vendorid_spoof)"},{"line_number":3694,"context_line":""},{"line_number":3695,"context_line":"    def test_get_guest_config_with_two_nics(self):"},{"line_number":3696,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":3697,"context_line":"        instance_ref \u003d objects.Instance(**self.test_instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_7b50c733","line":3694,"in_reply_to":"9fb8cfa7_7099c61d","updated":"2019-05-31 20:02:37.000000000","message":"Done","commit_id":"1ad1318d1c0e1eeb4a1587df309d22577a7412d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75d58e3eb823231a8fe102c0c4dba85cb7a3e935","unresolved":false,"context_lines":[{"line_number":3869,"context_line":"        self._test_get_guest_config_windows_hyperv("},{"line_number":3870,"context_line":"            flavor\u003dflavor_hide_id, hvid_hidden\u003dTrue)"},{"line_number":3871,"context_line":""},{"line_number":3872,"context_line":"    def test_get_guest_config_windows_hyperv_all_hide_img(self):"},{"line_number":3873,"context_line":"        # Similar to test_get_guest_config_windows_hyperv_feature2"},{"line_number":3874,"context_line":"        #   but also test hiding the HyperV signature with the image"},{"line_number":3875,"context_line":"        #   property \"img_hide_hypervisor_id\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_87ebc7ae","line":3872,"range":{"start_line":3872,"start_character":8,"end_line":3872,"end_character":57},"updated":"2019-06-03 20:47:44.000000000","message":"Why doesn\u0027t this test have to set the virt_type flag? I guess because by default virt_type\u003dkvm.","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1bfa79885311f3c68b219757de26e854ca99435","unresolved":false,"context_lines":[{"line_number":3869,"context_line":"        self._test_get_guest_config_windows_hyperv("},{"line_number":3870,"context_line":"            flavor\u003dflavor_hide_id, hvid_hidden\u003dTrue)"},{"line_number":3871,"context_line":""},{"line_number":3872,"context_line":"    def test_get_guest_config_windows_hyperv_all_hide_img(self):"},{"line_number":3873,"context_line":"        # Similar to test_get_guest_config_windows_hyperv_feature2"},{"line_number":3874,"context_line":"        #   but also test hiding the HyperV signature with the image"},{"line_number":3875,"context_line":"        #   property \"img_hide_hypervisor_id\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_a66fecc3","line":3872,"range":{"start_line":3872,"start_character":8,"end_line":3872,"end_character":57},"in_reply_to":"9fb8cfa7_87ebc7ae","updated":"2019-06-03 22:25:52.000000000","message":"Correct. I think I considered making more test cases with different values there, but I wound up feeling it wasn\u0027t worth it.\n\nI guess it\u0027s slightly better coverage if I make the above something other than the default, so I\u0027ll do that.","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fa1a97600962a7ee1a18a15019148e0f788b8e26","unresolved":false,"context_lines":[{"line_number":3869,"context_line":"        self._test_get_guest_config_windows_hyperv("},{"line_number":3870,"context_line":"            flavor\u003dflavor_hide_id, hvid_hidden\u003dTrue)"},{"line_number":3871,"context_line":""},{"line_number":3872,"context_line":"    def test_get_guest_config_windows_hyperv_all_hide_img(self):"},{"line_number":3873,"context_line":"        # Similar to test_get_guest_config_windows_hyperv_feature2"},{"line_number":3874,"context_line":"        #   but also test hiding the HyperV signature with the image"},{"line_number":3875,"context_line":"        #   property \"img_hide_hypervisor_id\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_292e6da5","line":3872,"range":{"start_line":3872,"start_character":8,"end_line":3872,"end_character":57},"in_reply_to":"9fb8cfa7_a66fecc3","updated":"2019-06-04 00:50:55.000000000","message":"test_get_guest_config_windows_hyperv_all_hide_flv_img already does that but OK.","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7892baec687741e3c9090c13d1e0b533a35320c8","unresolved":false,"context_lines":[{"line_number":2261,"context_line":"            root.append(etree.Element(\"spinlocks\", state\u003d\"on\","},{"line_number":2262,"context_line":"                                      retries\u003dstr(self.spinlock_retries)))"},{"line_number":2263,"context_line":"        if self.vendorid_spoof:"},{"line_number":2264,"context_line":"            root.append(etree.Element(\"vendor_id\", state\u003d\"on\","},{"line_number":2265,"context_line":"                                      value\u003dself.vendorid))"},{"line_number":2266,"context_line":""},{"line_number":2267,"context_line":"        return root"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_3724b40d","line":2264,"range":{"start_line":2264,"start_character":51,"end_line":2264,"end_character":62},"updated":"2018-08-01 12:26:45.000000000","message":"by the way would setting the vendor_id state\u003doff work out of interest instead of making up an invalid id?","commit_id":"b8297dce5ed01f4f1aaa9264945a6a3a8160200a"},{"author":{"_account_id":27961,"name":"Konstantinos Samaras-Tsakiris","email":"konstantinos.samaras-tsakiris@cern.ch","username":"kosamara"},"change_message_id":"320f22e42cfd8e20e1f6ba7e25f6425c43100c8e","unresolved":false,"context_lines":[{"line_number":2261,"context_line":"            root.append(etree.Element(\"spinlocks\", state\u003d\"on\","},{"line_number":2262,"context_line":"                                      retries\u003dstr(self.spinlock_retries)))"},{"line_number":2263,"context_line":"        if self.vendorid_spoof:"},{"line_number":2264,"context_line":"            root.append(etree.Element(\"vendor_id\", state\u003d\"on\","},{"line_number":2265,"context_line":"                                      value\u003dself.vendorid))"},{"line_number":2266,"context_line":""},{"line_number":2267,"context_line":"        return root"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_3a3819d2","line":2264,"range":{"start_line":2264,"start_character":51,"end_line":2264,"end_character":62},"in_reply_to":"5f7c97a3_3724b40d","updated":"2018-08-01 12:41:45.000000000","message":"good idea, let me experiment","commit_id":"b8297dce5ed01f4f1aaa9264945a6a3a8160200a"},{"author":{"_account_id":27961,"name":"Konstantinos Samaras-Tsakiris","email":"konstantinos.samaras-tsakiris@cern.ch","username":"kosamara"},"change_message_id":"30127fe168c6dfe3272e6983f55129f14284b196","unresolved":false,"context_lines":[{"line_number":2261,"context_line":"            root.append(etree.Element(\"spinlocks\", state\u003d\"on\","},{"line_number":2262,"context_line":"                                      retries\u003dstr(self.spinlock_retries)))"},{"line_number":2263,"context_line":"        if self.vendorid_spoof:"},{"line_number":2264,"context_line":"            root.append(etree.Element(\"vendor_id\", state\u003d\"on\","},{"line_number":2265,"context_line":"                                      value\u003dself.vendorid))"},{"line_number":2266,"context_line":""},{"line_number":2267,"context_line":"        return root"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_263c802b","line":2264,"range":{"start_line":2264,"start_character":51,"end_line":2264,"end_character":62},"in_reply_to":"5f7c97a3_3a3819d2","updated":"2018-08-01 15:25:18.000000000","message":"state\u003d\u0027off\u0027 didn\u0027t work.\nstate\u003d\u0027on\u0027 value\u003d\u002737254\u0027 (ie random, short alphanumeric) worked","commit_id":"b8297dce5ed01f4f1aaa9264945a6a3a8160200a"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7892baec687741e3c9090c13d1e0b533a35320c8","unresolved":false,"context_lines":[{"line_number":2250,"context_line":"        self.vendorid_spoof \u003d False"},{"line_number":2251,"context_line":"        self.vendorid \u003d self.VENDOR_ID"},{"line_number":2252,"context_line":""},{"line_number":2253,"context_line":"    def format_dom(self):"},{"line_number":2254,"context_line":"        root \u003d super(LibvirtConfigGuestFeatureHyperV, self).format_dom()"},{"line_number":2255,"context_line":""},{"line_number":2256,"context_line":"        if self.relaxed:"},{"line_number":2257,"context_line":"            root.append(etree.Element(\"relaxed\", state\u003d\"on\"))"},{"line_number":2258,"context_line":"        if self.vapic:"},{"line_number":2259,"context_line":"            root.append(etree.Element(\"vapic\", state\u003d\"on\"))"},{"line_number":2260,"context_line":"        if self.spinlocks:"},{"line_number":2261,"context_line":"            root.append(etree.Element(\"spinlocks\", state\u003d\"on\","},{"line_number":2262,"context_line":"                                      retries\u003dstr(self.spinlock_retries)))"},{"line_number":2263,"context_line":"        if self.vendorid_spoof:"},{"line_number":2264,"context_line":"            root.append(etree.Element(\"vendor_id\", state\u003d\"on\","},{"line_number":2265,"context_line":"                                      value\u003dself.vendorid))"},{"line_number":2266,"context_line":""},{"line_number":2267,"context_line":"        return root"},{"line_number":2268,"context_line":""},{"line_number":2269,"context_line":""},{"line_number":2270,"context_line":"class LibvirtConfigGuest(LibvirtConfigObject):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_77d54c19","line":2267,"range":{"start_line":2253,"start_character":4,"end_line":2267,"end_character":19},"updated":"2018-08-01 12:26:45.000000000","message":"This  may not be enough longterm as nvidia coudl use other hyperv feature flags set here to determin the driver is being loaded in a vm.\n\nBased on our conversation on irc removing the element would also disable some optimizations reducing the performance of the guest so for now as this is the minimum change that enable windows guest to execut the nvidia drivers it seam reasonable but we should add a code comment here to note this limitation as we discussed.","commit_id":"b8297dce5ed01f4f1aaa9264945a6a3a8160200a"},{"author":{"_account_id":27961,"name":"Konstantinos Samaras-Tsakiris","email":"konstantinos.samaras-tsakiris@cern.ch","username":"kosamara"},"change_message_id":"6c38c3382ba47b8dd5fd1f9a1d8c1c46a1f1b95c","unresolved":false,"context_lines":[{"line_number":2250,"context_line":"        self.vendorid_spoof \u003d False"},{"line_number":2251,"context_line":"        self.vendorid \u003d self.VENDOR_ID"},{"line_number":2252,"context_line":""},{"line_number":2253,"context_line":"    def format_dom(self):"},{"line_number":2254,"context_line":"        root \u003d super(LibvirtConfigGuestFeatureHyperV, self).format_dom()"},{"line_number":2255,"context_line":""},{"line_number":2256,"context_line":"        if self.relaxed:"},{"line_number":2257,"context_line":"            root.append(etree.Element(\"relaxed\", state\u003d\"on\"))"},{"line_number":2258,"context_line":"        if self.vapic:"},{"line_number":2259,"context_line":"            root.append(etree.Element(\"vapic\", state\u003d\"on\"))"},{"line_number":2260,"context_line":"        if self.spinlocks:"},{"line_number":2261,"context_line":"            root.append(etree.Element(\"spinlocks\", state\u003d\"on\","},{"line_number":2262,"context_line":"                                      retries\u003dstr(self.spinlock_retries)))"},{"line_number":2263,"context_line":"        if self.vendorid_spoof:"},{"line_number":2264,"context_line":"            root.append(etree.Element(\"vendor_id\", state\u003d\"on\","},{"line_number":2265,"context_line":"                                      value\u003dself.vendorid))"},{"line_number":2266,"context_line":""},{"line_number":2267,"context_line":"        return root"},{"line_number":2268,"context_line":""},{"line_number":2269,"context_line":""},{"line_number":2270,"context_line":"class LibvirtConfigGuest(LibvirtConfigObject):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_064864b1","line":2267,"range":{"start_line":2253,"start_character":4,"end_line":2267,"end_character":19},"in_reply_to":"5f7c97a3_77d54c19","updated":"2018-08-01 15:29:01.000000000","message":"done","commit_id":"b8297dce5ed01f4f1aaa9264945a6a3a8160200a"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"de5d0f99075a60c19693c2cb81bb5b6de8ea0d41","unresolved":false,"context_lines":[{"line_number":4629,"context_line":"            guest.features.append(hv)"},{"line_number":4630,"context_line":""},{"line_number":4631,"context_line":"        if (virt_type in (\"qemu\", \"kvm\") and"},{"line_number":4632,"context_line":"                (image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027) or"},{"line_number":4633,"context_line":"                 flavor_hide_kvm)):"},{"line_number":4634,"context_line":"            guest.features.append(vconfig.LibvirtConfigGuestFeatureKvmHidden())"},{"line_number":4635,"context_line":""},{"line_number":4636,"context_line":"    def _check_number_of_serial_console(self, num_ports):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_02998bce","line":4633,"range":{"start_line":4632,"start_character":9,"end_line":4633,"end_character":34},"updated":"2018-07-04 09:42:48.000000000","message":"I guess add \n\nif os_type \u003d\u003d \u0027windows\u0027 and (image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027) or\n                flavor_hide_kvm):\n                hv.vendorid_spoof \u003d True\n\nwill make the logic clearer?","commit_id":"37579858d3e511708d4a63ed913573a62606e2a5"},{"author":{"_account_id":27961,"name":"Konstantinos Samaras-Tsakiris","email":"konstantinos.samaras-tsakiris@cern.ch","username":"kosamara"},"change_message_id":"64306a6bd0e6ac575512815dedc95c6697a386c8","unresolved":false,"context_lines":[{"line_number":4629,"context_line":"            guest.features.append(hv)"},{"line_number":4630,"context_line":""},{"line_number":4631,"context_line":"        if (virt_type in (\"qemu\", \"kvm\") and"},{"line_number":4632,"context_line":"                (image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027) or"},{"line_number":4633,"context_line":"                 flavor_hide_kvm)):"},{"line_number":4634,"context_line":"            guest.features.append(vconfig.LibvirtConfigGuestFeatureKvmHidden())"},{"line_number":4635,"context_line":""},{"line_number":4636,"context_line":"    def _check_number_of_serial_console(self, num_ports):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_f8da001b","line":4633,"range":{"start_line":4632,"start_character":9,"end_line":4633,"end_character":34},"in_reply_to":"5f7c97a3_02998bce","updated":"2018-07-04 12:12:12.000000000","message":"This line is from a previous patch. I guess you\u0027re referring to l 4625?\nAre you proposing that adding `os_type \u003d\u003d \u0027windows\u0027` would make it clearer, even though that condition already exists at the outside \"if\"?\nIf I move that line to the beginning of the block right below the \"if\", does it become clearer?","commit_id":"37579858d3e511708d4a63ed913573a62606e2a5"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"65680947f9bc66a9ae40bdc9142ecce6bba97f23","unresolved":false,"context_lines":[{"line_number":4596,"context_line":""},{"line_number":4597,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4598,"context_line":"            flavor):"},{"line_number":4599,"context_line":"        flavor_hide_kvm \u003d strutils.bool_from_string("},{"line_number":4600,"context_line":"                flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027))"},{"line_number":4601,"context_line":""},{"line_number":4602,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_b74c2997","line":4599,"updated":"2018-08-02 12:28:36.000000000","message":"What do you think about unifying:\n\nimg_hide_hypervisor_id\nwith:\nhide_hypervisor_id?\n\nI think it could be more clean to make it like:\n\nhide_kvm \u003d strutils.bool_from_string(flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027)) or  strutils.bool_from_string((image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))\n\n\nIMO it will make the ifology a bit cleaner.","commit_id":"2a8a2d88aa417f17839fe1f677b868a0c1721c96"},{"author":{"_account_id":27961,"name":"Konstantinos Samaras-Tsakiris","email":"konstantinos.samaras-tsakiris@cern.ch","username":"kosamara"},"change_message_id":"367821271d50941a71a7400d6dd20850c69fb70f","unresolved":false,"context_lines":[{"line_number":4596,"context_line":""},{"line_number":4597,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4598,"context_line":"            flavor):"},{"line_number":4599,"context_line":"        flavor_hide_kvm \u003d strutils.bool_from_string("},{"line_number":4600,"context_line":"                flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027))"},{"line_number":4601,"context_line":""},{"line_number":4602,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_189749ed","line":4599,"in_reply_to":"5f7c97a3_b74c2997","updated":"2018-08-02 14:35:24.000000000","message":"and done","commit_id":"2a8a2d88aa417f17839fe1f677b868a0c1721c96"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8a3f136cf94c8c3f1e779f0eb64bdd7518dfe257","unresolved":false,"context_lines":[{"line_number":4624,"context_line":"            hv.spinlock_retries \u003d 8191"},{"line_number":4625,"context_line":"            hv.vapic \u003d True"},{"line_number":4626,"context_line":""},{"line_number":4627,"context_line":"            # NOTE(kosamara): Spoofing the vendor_id aims to allow the nvidia"},{"line_number":4628,"context_line":"            # driver to work on windows VMs. At the moment, the nvidia driver"},{"line_number":4629,"context_line":"            # checks for the hyperv vendorid, and if it doesn\u0027t find that, it"},{"line_number":4630,"context_line":"            # works. In the future, its behaviour could become more strict,"},{"line_number":4631,"context_line":"            # checking for the presence of other hyperv feature flags to"},{"line_number":4632,"context_line":"            # determine that it\u0027s loaded in a VM. If that happens, this"},{"line_number":4633,"context_line":"            # workaround will not be enough, and we\u0027ll need to drop the whole"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_30048317","line":4630,"range":{"start_line":4627,"start_character":30,"end_line":4630,"end_character":20},"updated":"2018-08-06 11:55:49.000000000","message":"This is so ridiculous, and yet another example of vendor-driven software hacks added to Nova. :(\n\nI know it\u0027s not your fault that NVIDIA makes crap driver software with stupid licensing restrictions, but man, is this annoying.\n\nAre we OpenStack or WorkaroundForClosedStack? :(","commit_id":"1ad1318d1c0e1eeb4a1587df309d22577a7412d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"030ad66e1fa53efaa383e01d2f9c677021ffab69","unresolved":false,"context_lines":[{"line_number":4624,"context_line":"            hv.spinlock_retries \u003d 8191"},{"line_number":4625,"context_line":"            hv.vapic \u003d True"},{"line_number":4626,"context_line":""},{"line_number":4627,"context_line":"            # NOTE(kosamara): Spoofing the vendor_id aims to allow the nvidia"},{"line_number":4628,"context_line":"            # driver to work on windows VMs. At the moment, the nvidia driver"},{"line_number":4629,"context_line":"            # checks for the hyperv vendorid, and if it doesn\u0027t find that, it"},{"line_number":4630,"context_line":"            # works. In the future, its behaviour could become more strict,"},{"line_number":4631,"context_line":"            # checking for the presence of other hyperv feature flags to"},{"line_number":4632,"context_line":"            # determine that it\u0027s loaded in a VM. If that happens, this"},{"line_number":4633,"context_line":"            # workaround will not be enough, and we\u0027ll need to drop the whole"}],"source_content_type":"text/x-python","patch_set":4,"id":"bfb3d3c7_aaedc8b7","line":4630,"range":{"start_line":4627,"start_character":30,"end_line":4630,"end_character":20},"in_reply_to":"3f79a3b5_30048317","updated":"2019-05-29 16:29:26.000000000","message":"\u003e This is so ridiculous, and yet another example of vendor-driven\n \u003e software hacks added to Nova. :(\n \u003e \n \u003e I know it\u0027s not your fault that NVIDIA makes crap driver software\n \u003e with stupid licensing restrictions, but man, is this annoying.\n \u003e \n \u003e Are we OpenStack or WorkaroundForClosedStack? :(\n\nI don\u0027t understand the opposition here given, as noted in the commit message, we already support doing this for libvirt guests on kvm:\n\nhttps://review.opendev.org/#/c/459753/18//COMMIT_MSG@14\n\nA change which Jay approved.\n\nIf the opposition is just to all the nvidia wording in the code, fine move that to the commit message, but let\u0027s not pretend that we don\u0027t already support this for linux guests for the exact same reasons.","commit_id":"1ad1318d1c0e1eeb4a1587df309d22577a7412d4"},{"author":{"_account_id":27961,"name":"Konstantinos Samaras-Tsakiris","email":"konstantinos.samaras-tsakiris@cern.ch","username":"kosamara"},"change_message_id":"fe76dd65de96ef9eb26744fb1aa9273d8eab3111","unresolved":false,"context_lines":[{"line_number":4624,"context_line":"            hv.spinlock_retries \u003d 8191"},{"line_number":4625,"context_line":"            hv.vapic \u003d True"},{"line_number":4626,"context_line":""},{"line_number":4627,"context_line":"            # NOTE(kosamara): Spoofing the vendor_id aims to allow the nvidia"},{"line_number":4628,"context_line":"            # driver to work on windows VMs. At the moment, the nvidia driver"},{"line_number":4629,"context_line":"            # checks for the hyperv vendorid, and if it doesn\u0027t find that, it"},{"line_number":4630,"context_line":"            # works. In the future, its behaviour could become more strict,"},{"line_number":4631,"context_line":"            # checking for the presence of other hyperv feature flags to"},{"line_number":4632,"context_line":"            # determine that it\u0027s loaded in a VM. If that happens, this"},{"line_number":4633,"context_line":"            # workaround will not be enough, and we\u0027ll need to drop the whole"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_73943345","line":4630,"range":{"start_line":4627,"start_character":30,"end_line":4630,"end_character":20},"in_reply_to":"3f79a3b5_30048317","updated":"2018-08-07 07:53:58.000000000","message":"I totally agree with you...\nNvidia however is, currently, the primary established vendor for many GPU applications.\nFor what it\u0027s worth, AMD is promising a more open ecosystem and might release a competitive product soon.","commit_id":"1ad1318d1c0e1eeb4a1587df309d22577a7412d4"},{"author":{"_account_id":136,"name":"Tim Bell","email":"tim.bell@cern.ch","username":"tim-bell"},"change_message_id":"6ab78bcce3df13d895990024d4e0858e632cc8a9","unresolved":false,"context_lines":[{"line_number":4624,"context_line":"            hv.spinlock_retries \u003d 8191"},{"line_number":4625,"context_line":"            hv.vapic \u003d True"},{"line_number":4626,"context_line":""},{"line_number":4627,"context_line":"            # NOTE(kosamara): Spoofing the vendor_id aims to allow the nvidia"},{"line_number":4628,"context_line":"            # driver to work on windows VMs. At the moment, the nvidia driver"},{"line_number":4629,"context_line":"            # checks for the hyperv vendorid, and if it doesn\u0027t find that, it"},{"line_number":4630,"context_line":"            # works. In the future, its behaviour could become more strict,"},{"line_number":4631,"context_line":"            # checking for the presence of other hyperv feature flags to"},{"line_number":4632,"context_line":"            # determine that it\u0027s loaded in a VM. If that happens, this"},{"line_number":4633,"context_line":"            # workaround will not be enough, and we\u0027ll need to drop the whole"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_a816b854","line":4630,"range":{"start_line":4627,"start_character":30,"end_line":4630,"end_character":20},"in_reply_to":"3f79a3b5_73943345","updated":"2018-08-21 08:12:20.000000000","message":"Jay, we\u0027re looking to deploy GPUs for our users, within the constraints of what we can obtain on the market. This functionality is already available in the standard OpenStack release via the images property. However, providing this with the flavor flag seems the right way to proceed (i.e. admin can enable it, standard images can be used rather than custom uploaded images with properties).\n\nThe current reality is that this is needed for NIVIDA GPU deployments. If this is not available, the impact would be on the cloud administrators having to set up special processes outside of OpenStack and the requesting end users.","commit_id":"1ad1318d1c0e1eeb4a1587df309d22577a7412d4"},{"author":{"_account_id":136,"name":"Tim Bell","email":"tim.bell@cern.ch","username":"tim-bell"},"change_message_id":"befa1db7165676389832433af5c8b32db2a0ce5a","unresolved":false,"context_lines":[{"line_number":4624,"context_line":"            hv.spinlock_retries \u003d 8191"},{"line_number":4625,"context_line":"            hv.vapic \u003d True"},{"line_number":4626,"context_line":""},{"line_number":4627,"context_line":"            # NOTE(kosamara): Spoofing the vendor_id aims to allow the nvidia"},{"line_number":4628,"context_line":"            # driver to work on windows VMs. At the moment, the nvidia driver"},{"line_number":4629,"context_line":"            # checks for the hyperv vendorid, and if it doesn\u0027t find that, it"},{"line_number":4630,"context_line":"            # works. In the future, its behaviour could become more strict,"},{"line_number":4631,"context_line":"            # checking for the presence of other hyperv feature flags to"},{"line_number":4632,"context_line":"            # determine that it\u0027s loaded in a VM. If that happens, this"},{"line_number":4633,"context_line":"            # workaround will not be enough, and we\u0027ll need to drop the whole"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_e9c34856","line":4630,"range":{"start_line":4627,"start_character":30,"end_line":4630,"end_character":20},"in_reply_to":"3f79a3b5_a816b854","updated":"2018-08-21 12:18:05.000000000","message":"Sorry, please ignore above comment, as I was commenting on a different patch content.","commit_id":"1ad1318d1c0e1eeb4a1587df309d22577a7412d4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"53f0dcc3df4a70e4388e27ac320558a0a94d6ea1","unresolved":false,"context_lines":[{"line_number":4624,"context_line":"            hv.spinlock_retries \u003d 8191"},{"line_number":4625,"context_line":"            hv.vapic \u003d True"},{"line_number":4626,"context_line":""},{"line_number":4627,"context_line":"            # NOTE(kosamara): Spoofing the vendor_id aims to allow the nvidia"},{"line_number":4628,"context_line":"            # driver to work on windows VMs. At the moment, the nvidia driver"},{"line_number":4629,"context_line":"            # checks for the hyperv vendorid, and if it doesn\u0027t find that, it"},{"line_number":4630,"context_line":"            # works. In the future, its behaviour could become more strict,"},{"line_number":4631,"context_line":"            # checking for the presence of other hyperv feature flags to"},{"line_number":4632,"context_line":"            # determine that it\u0027s loaded in a VM. If that happens, this"},{"line_number":4633,"context_line":"            # workaround will not be enough, and we\u0027ll need to drop the whole"}],"source_content_type":"text/x-python","patch_set":4,"id":"bfb3d3c7_1baa2484","line":4630,"range":{"start_line":4627,"start_character":30,"end_line":4630,"end_character":20},"in_reply_to":"bfb3d3c7_aaedc8b7","updated":"2019-05-29 18:48:01.000000000","message":"You don\u0027t need my approval for anything, Matt, as you know. I registered my annoyance in the other patch with a \"lame :(\" comment on the commit message.\n\nI hate having workarounds for a specific vendor that never wants to work with an open source community to get anything done and instead the open source community is perpetually required to work around said vendor everywhere. Nvidia is particularly egregious in this regard and I\u0027ve noted that elsewhere.","commit_id":"1ad1318d1c0e1eeb4a1587df309d22577a7412d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75d58e3eb823231a8fe102c0c4dba85cb7a3e935","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            strutils.bool_from_string("},{"line_number":4743,"context_line":"                image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027)))"},{"line_number":4744,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_c7645fbc","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":26},"updated":"2019-06-03 20:47:44.000000000","message":"nit: we should avoid relying on NovaObjectDictCompat here and just do:\n\nflavor.extra_specs\n\nBut I see that you\u0027re just copying what was already in this method.","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1bfa79885311f3c68b219757de26e854ca99435","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            strutils.bool_from_string("},{"line_number":4743,"context_line":"                image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027)))"},{"line_number":4744,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_e6e88417","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":26},"in_reply_to":"9fb8cfa7_c7645fbc","updated":"2019-06-03 22:25:52.000000000","message":"Done","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75d58e3eb823231a8fe102c0c4dba85cb7a3e935","unresolved":false,"context_lines":[{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            strutils.bool_from_string("},{"line_number":4743,"context_line":"                image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027)))"},{"line_number":4744,"context_line":""},{"line_number":4745,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_c7321fa8","line":4742,"range":{"start_line":4742,"start_character":12,"end_line":4742,"end_character":37},"updated":"2019-06-03 20:47:44.000000000","message":"I think this is redundant since img_hide_hypervisor_id is a FlexibleBooleanField which already coerces the value using this same utility method:\n\nhttps://github.com/openstack/oslo.versionedobjects/blob/37473e3afa19cf03fd1fb80c1bb9b9611fc37fb1/oslo_versionedobjects/fields.py#L468\n\nThat\u0027s probably why the code before wasn\u0027t using it.","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1bfa79885311f3c68b219757de26e854ca99435","unresolved":false,"context_lines":[{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            strutils.bool_from_string("},{"line_number":4743,"context_line":"                image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027)))"},{"line_number":4744,"context_line":""},{"line_number":4745,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_468e3079","line":4742,"range":{"start_line":4742,"start_character":12,"end_line":4742,"end_character":37},"in_reply_to":"9fb8cfa7_c7321fa8","updated":"2019-06-03 22:25:52.000000000","message":"Done","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75d58e3eb823231a8fe102c0c4dba85cb7a3e935","unresolved":false,"context_lines":[{"line_number":4769,"context_line":"            # driver to work on windows VMs. At the moment, the nvidia driver"},{"line_number":4770,"context_line":"            # checks for the hyperv vendorid, and if it doesn\u0027t find that, it"},{"line_number":4771,"context_line":"            # works. In the future, its behaviour could become more strict,"},{"line_number":4772,"context_line":"            # checking for the presence of other hyperv feature flags to"},{"line_number":4773,"context_line":"            # determine that it\u0027s loaded in a VM. If that happens, this"},{"line_number":4774,"context_line":"            # workaround will not be enough, and we\u0027ll need to drop the whole"},{"line_number":4775,"context_line":"            # hyperv element."}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_87bae7db","line":4772,"updated":"2019-06-03 20:47:44.000000000","message":"Or checking for vendor_id 1234567890ab :)","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"10184f250ddc2cee7c12291a749f6b3fc9595996","unresolved":false,"context_lines":[{"line_number":4769,"context_line":"            # driver to work on windows VMs. At the moment, the nvidia driver"},{"line_number":4770,"context_line":"            # checks for the hyperv vendorid, and if it doesn\u0027t find that, it"},{"line_number":4771,"context_line":"            # works. In the future, its behaviour could become more strict,"},{"line_number":4772,"context_line":"            # checking for the presence of other hyperv feature flags to"},{"line_number":4773,"context_line":"            # determine that it\u0027s loaded in a VM. If that happens, this"},{"line_number":4774,"context_line":"            # workaround will not be enough, and we\u0027ll need to drop the whole"},{"line_number":4775,"context_line":"            # hyperv element."}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_07e1179b","line":4772,"in_reply_to":"9fb8cfa7_87bae7db","updated":"2019-06-03 20:53:43.000000000","message":"If you really wanted to future proof this you\u0027d randomize the 12-character string you use. But that\u0027s maybe excessive.","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75d58e3eb823231a8fe102c0c4dba85cb7a3e935","unresolved":false,"context_lines":[{"line_number":4775,"context_line":"            # hyperv element."},{"line_number":4776,"context_line":"            # That would disable some optimizations, reducing the guest\u0027s"},{"line_number":4777,"context_line":"            # performance."},{"line_number":4778,"context_line":"            if (os_type \u003d\u003d \u0027windows\u0027 and hide_hypervisor_id):"},{"line_number":4779,"context_line":"                hv.vendorid_spoof \u003d True"},{"line_number":4780,"context_line":""},{"line_number":4781,"context_line":"            guest.features.append(hv)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_872c2748","line":4778,"range":{"start_line":4778,"start_character":16,"end_line":4778,"end_character":36},"updated":"2019-06-03 20:47:44.000000000","message":"This is redundant, it\u0027s already checked on L4757.","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1bfa79885311f3c68b219757de26e854ca99435","unresolved":false,"context_lines":[{"line_number":4775,"context_line":"            # hyperv element."},{"line_number":4776,"context_line":"            # That would disable some optimizations, reducing the guest\u0027s"},{"line_number":4777,"context_line":"            # performance."},{"line_number":4778,"context_line":"            if (os_type \u003d\u003d \u0027windows\u0027 and hide_hypervisor_id):"},{"line_number":4779,"context_line":"                hv.vendorid_spoof \u003d True"},{"line_number":4780,"context_line":""},{"line_number":4781,"context_line":"            guest.features.append(hv)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_06eef821","line":4778,"range":{"start_line":4778,"start_character":16,"end_line":4778,"end_character":36},"in_reply_to":"9fb8cfa7_872c2748","updated":"2019-06-03 22:25:52.000000000","message":"Done","commit_id":"1dbfbae64e0bad0a0fd547f8f3fe90fdc50e1155"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5fcc8649421fe44f5ab36581209964585636f463","unresolved":false,"context_lines":[{"line_number":4737,"context_line":""},{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_4f7e2fe5","line":4740,"range":{"start_line":4740,"start_character":30,"end_line":4740,"end_character":55},"updated":"2019-06-04 19:57:32.000000000","message":"nit: im not sure why we would do this for the flavor and not the image but im guessing we are relying on ovo to normalise the image metadata property to a bool so i guess this is fine.","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c5ab5fbdb38445defdde05af1ae289c328fd8ef8","unresolved":false,"context_lines":[{"line_number":4737,"context_line":""},{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_2ae96919","line":4740,"range":{"start_line":4740,"start_character":30,"end_line":4740,"end_character":55},"in_reply_to":"9fb8cfa7_4f7e2fe5","updated":"2019-06-04 20:27:39.000000000","message":"Yes, see https://review.opendev.org/#/c/579897/6/nova/virt/libvirt/driver.py@4742","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"78c7ded0ba14b611eb603a2369ad50b8284f3a1d","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""},{"line_number":4744,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_8f18a71d","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":34},"updated":"2019-06-04 19:26:22.000000000","message":"Based on the rest of this file usage of \u0027extra_specs\u0027, looks like it\u0027s safe to go ahead and access the \u0027extra_specs\u0027 field without the former extra check:\n\n flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027)","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b37a3e52cf0fc7a1cb49953401fc5d017a469e92","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""},{"line_number":4744,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_4ec13e80","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":34},"in_reply_to":"9fb8cfa7_15259cc2","updated":"2019-06-05 16:05:29.000000000","message":"\u003e we never prefer the image over the flavor for generic extra_specs/image properties\n\nI\u0027m not aware of that being codified (documented) anywhere, even though it comes up every time (which takes priority, do we need to check for conflicts) a new extra spec and matching image property are added.","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c5ab5fbdb38445defdde05af1ae289c328fd8ef8","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""},{"line_number":4744,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_eadcb147","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":34},"in_reply_to":"9fb8cfa7_2f63bb1c","updated":"2019-06-04 20:27:39.000000000","message":"It sounds like you\u0027ve suggested two different behaviors if the field is specified in both the flavor and image.\n\n(1) Give precedence to the flavor\n(2) Raise an exception\n\nWhich are you looking for?","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"26c24b4dd0cda17d06840c811d90f0a08458243d","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""},{"line_number":4744,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_15259cc2","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":34},"in_reply_to":"9fb8cfa7_52b80a75","updated":"2019-06-05 10:52:15.000000000","message":"I the above bug is the feature here... I guess if the flavor says no, we might want to respect that over the image prop. But yeah, that is another change really.","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5fcc8649421fe44f5ab36581209964585636f463","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""},{"line_number":4744,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_2f63bb1c","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":34},"in_reply_to":"9fb8cfa7_8f18a71d","updated":"2019-06-04 19:57:32.000000000","message":"i would probably go one step further and write it like this\n\nflavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027, image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))\n\nif there is a conflict between the flavor and image this would incorrectly allow the image to override the flavor instead of raising an exception which is what we should do to be consistent with other extra specs\n\ne.g.\nif the flavor has hide_hypervisor_id\u003dfalse and the image has\nimg_hide_hypervisor_id\u003dtrue\n\nhide_hypervsior_id \u003d strutils.bool_from_string(flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027)\n\nhide_hypervisor_id wil be true because the or condition will cause the image value to be used when the flavor value is false.","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4499284075747cd2696758b3bac6c8f7dffb4709","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""},{"line_number":4744,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_52b80a75","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":34},"in_reply_to":"9fb8cfa7_beaefa2b","updated":"2019-06-05 10:27:02.000000000","message":"i reluctantly think this is a latent bug so if we want to fix it as part of a separate change i think that would be ok.\n\nspecifically the admin can set a policy via the flavor which a non privileged user circumvent via uploading an image.\nwe should not allow that but fixing that can be part of a different change as it is not part of achieving parity for Linux and windows guests.","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e83e7b35a23c8beae79168b2375bf6f03f9c5e7f","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""},{"line_number":4744,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_beaefa2b","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":34},"in_reply_to":"9fb8cfa7_ea8271c8","updated":"2019-06-04 21:56:47.000000000","message":"Oh.\n\nIf we do either thing, we\u0027re changing the existing behavior for linux, or making the two inconsistent with each other.\n\nSo while I agree that would be more robust, I don\u0027t think it\u0027s worth the hassle.\n\nThoughts?","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6be121ec11dc2df57826ed2ca20490ffb33fac1e","unresolved":false,"context_lines":[{"line_number":4738,"context_line":"    def _set_features(self, guest, os_type, caps, virt_type, image_meta,"},{"line_number":4739,"context_line":"            flavor):"},{"line_number":4740,"context_line":"        hide_hypervisor_id \u003d (strutils.bool_from_string("},{"line_number":4741,"context_line":"                flavor.extra_specs.get(\u0027hide_hypervisor_id\u0027)) or"},{"line_number":4742,"context_line":"            image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))"},{"line_number":4743,"context_line":""},{"line_number":4744,"context_line":"        if virt_type \u003d\u003d \"xen\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_ea8271c8","line":4741,"range":{"start_line":4741,"start_character":23,"end_line":4741,"end_character":34},"in_reply_to":"9fb8cfa7_eadcb147","updated":"2019-06-04 20:50:11.000000000","message":"your right i was not clear.\nwhat i was trying to express previously if we were to use the old style way of doing this we should do \n\nflavor.get(\u0027extra_specs\u0027, {}).get(\u0027hide_hypervisor_id\u0027, image_meta.properties.get(\u0027img_hide_hypervisor_id\u0027))\n\nso that the flavor would take precedence but i would prefer to raise an exception if there is a conflict between the value request by the flavor and image.\n\nif we chose to not raise an exception the pre mitka behaviour was to prefer the flavor and log a warning but i think the explicit failure with an exception is better although i dislike failing this late.\n\nwe never prefer the image over the flavor for generic extra_specs/image properties\n\nthere is one case(hw:mem_page_size) but that was support by design form the start. so i don\u0027t think we want to set a precedent here of preferring the image over the flavor when our standing pattern is to raise an exception.","commit_id":"ca543438e183b2bd97a08ef781ddeab8303354ed"}],"releasenotes/notes/bug-1779845-8819eea6e91fb09c.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fa1a97600962a7ee1a18a15019148e0f788b8e26","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Blueprints  `hide-hypervisor-id-flavor-extra-spec`_ and"},{"line_number":5,"context_line":"    `add-kvm-hidden-feature`_ enabled NVIDIA drivers in Linux guests using KVM"},{"line_number":6,"context_line":"    and QEMU, but support was not included for Windows guests. This is now"},{"line_number":7,"context_line":"    fixed. See `bug 1779845`_ for details."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"9fb8cfa7_492ba193","line":4,"range":{"start_line":4,"start_character":14,"end_line":4,"end_character":16},"updated":"2019-06-04 00:50:55.000000000","message":"One too many spaces although this doesn\u0027t seem to affect the rendering.","commit_id":"a8c272468e9d7741055910515a6f0aee101a9dd7"}]}
