)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"18f99e8bbd8db617088312799f353b39810f3c87","unresolved":false,"context_lines":[{"line_number":11,"context_line":"When you reboot your host, you loose all of them which can be a big pain for"},{"line_number":12,"context_line":"operators having allocated guests using vGPUs."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"That change will iterate over all the instances, see if they have a nested"},{"line_number":15,"context_line":"vGPU, check if the related mediated device is existing, and if not, rebalance"},{"line_number":16,"context_line":"between physical GPUs to find a proper one which can fit."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7f96bb07_4ab6648c","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":4},"updated":"2018-01-18 16:54:44.000000000","message":"This","commit_id":"70cd1df1c3aa689c943d65c51ced99c29b1ef133"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"18f99e8bbd8db617088312799f353b39810f3c87","unresolved":false,"context_lines":[{"line_number":12,"context_line":"operators having allocated guests using vGPUs."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"That change will iterate over all the instances, see if they have a nested"},{"line_number":15,"context_line":"vGPU, check if the related mediated device is existing, and if not, rebalance"},{"line_number":16,"context_line":"between physical GPUs to find a proper one which can fit."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Note that due to the fact we don\u0027t persist neither in Nova the mediated device"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7f96bb07_eaa4104d","line":15,"range":{"start_line":15,"start_character":43,"end_line":15,"end_character":54},"updated":"2018-01-18 16:54:44.000000000","message":"nit: exists","commit_id":"70cd1df1c3aa689c943d65c51ced99c29b1ef133"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"When you reboot your host, you loose all of them which can be a big pain for"},{"line_number":12,"context_line":"operators having allocated guests using vGPUs."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"That change will iterate over all the instances, see if they have a nested"},{"line_number":15,"context_line":"vGPU, check if the related mediated device is existing, and if not, rebalance"},{"line_number":16,"context_line":"between physical GPUs to find a proper one which can fit."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7f96bb07_9ac1d031","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":4},"updated":"2018-01-22 14:35:26.000000000","message":"This","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":12,"context_line":"operators having allocated guests using vGPUs."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"That change will iterate over all the instances, see if they have a nested"},{"line_number":15,"context_line":"vGPU, check if the related mediated device is existing, and if not, rebalance"},{"line_number":16,"context_line":"between physical GPUs to find a proper one which can fit."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Note that due to the fact we don\u0027t persist neither in Nova the mediated device"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7f96bb07_5ae108d0","line":15,"range":{"start_line":15,"start_character":43,"end_line":15,"end_character":54},"updated":"2018-01-22 14:35:26.000000000","message":"exists","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e871dada6d810e887579031a3b6ee6cb8ea5d88","unresolved":false,"context_lines":[{"line_number":551,"context_line":"                     MIN_LIBVIRT_OTHER_ARCH.get(kvm_arch))})"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"        # TODO(sbauza): Remove that code once mediated devices become persisted"},{"line_number":554,"context_line":"        # across reboots."},{"line_number":555,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":556,"context_line":"            self._recreate_assigned_mediated_devices()"},{"line_number":557,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_e6a5a705","line":554,"updated":"2018-01-15 15:48:21.000000000","message":"Looks like this will also handle the case where they already exist, right? So if someone installs a fix, we won\u0027t break on reboot or anything. I guess the same goes for restarting nova-compute without a host reboot. Cool.","commit_id":"90dcc57c247090a505c01239c177c9224cc26a32"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e871dada6d810e887579031a3b6ee6cb8ea5d88","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        # that possible race, check the sysfs directly instead of asking the"},{"line_number":564,"context_line":"        # libvirt API."},{"line_number":565,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":566,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def _recreate_assigned_mediated_devices(self):"},{"line_number":569,"context_line":"        \"\"\"Recreate assigned mdevs that could have disappeared if we reboot"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_463b3b9b","line":566,"updated":"2018-01-15 15:48:21.000000000","message":"Technically there isn\u0027t a test for this, so it might be nice to just throw something in there quick to demonstrate that this formats properly.","commit_id":"90dcc57c247090a505c01239c177c9224cc26a32"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"18f99e8bbd8db617088312799f353b39810f3c87","unresolved":false,"context_lines":[{"line_number":552,"context_line":""},{"line_number":553,"context_line":"        # TODO(sbauza): Remove that code once mediated devices become persisted"},{"line_number":554,"context_line":"        # across reboots."},{"line_number":555,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":556,"context_line":"            self._recreate_assigned_mediated_devices()"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    @staticmethod"},{"line_number":559,"context_line":"    def _is_existing_mdev(uuid):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_a5d4f948","line":556,"range":{"start_line":555,"start_character":0,"end_line":556,"end_character":54},"updated":"2018-01-18 16:54:44.000000000","message":"This runs before we destroy evacuated or partially deleted instances so it might create more mdevs than actually necessary. As far as I understand it doesn\u0027t mean these devices are actually consumed. So I guess this is OK.","commit_id":"70cd1df1c3aa689c943d65c51ced99c29b1ef133"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c51e6d423b7813e2177b001fa472db5d98088cf3","unresolved":false,"context_lines":[{"line_number":552,"context_line":""},{"line_number":553,"context_line":"        # TODO(sbauza): Remove that code once mediated devices become persisted"},{"line_number":554,"context_line":"        # across reboots."},{"line_number":555,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":556,"context_line":"            self._recreate_assigned_mediated_devices()"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    @staticmethod"},{"line_number":559,"context_line":"    def _is_existing_mdev(uuid):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_65827102","line":556,"range":{"start_line":555,"start_character":0,"end_line":556,"end_character":54},"in_reply_to":"7f96bb07_a5d4f948","updated":"2018-01-18 16:59:31.000000000","message":"Right, we lookup all existing instances to recreate the same mediated devices. Since for the moment we only support one GPU type per host, it\u0027s fine to just leave them created and after that destroy evacuated instances.\n\nThat said, once we support multiple types, we would need to also destroy the assigned mediated device when we destroy the instance or we would need to match all the mediated devices with the instances every time we create a new instance.","commit_id":"70cd1df1c3aa689c943d65c51ced99c29b1ef133"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"605464259cf72087b73b6010cf51ffc1f6f1059a","unresolved":false,"context_lines":[{"line_number":552,"context_line":""},{"line_number":553,"context_line":"        # TODO(sbauza): Remove that code once mediated devices become persisted"},{"line_number":554,"context_line":"        # across reboots."},{"line_number":555,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":556,"context_line":"            self._recreate_assigned_mediated_devices()"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    @staticmethod"},{"line_number":559,"context_line":"    def _is_existing_mdev(uuid):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_a51639a7","line":556,"range":{"start_line":555,"start_character":0,"end_line":556,"end_character":54},"in_reply_to":"7f96bb07_a5d4f948","updated":"2018-01-18 17:03:34.000000000","message":"We talked about it with Sylvain over IRC [1] and we agreed that it is not a real problem.\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2018-01-18.log.html#t2018-01-18T16:55:29","commit_id":"70cd1df1c3aa689c943d65c51ced99c29b1ef133"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                 \u0027libvirt_ver\u0027: self._version_to_string("},{"line_number":566,"context_line":"                     MIN_LIBVIRT_OTHER_ARCH.get(kvm_arch))})"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # TODO(sbauza): Remove that code once mediated devices become persisted"},{"line_number":569,"context_line":"        # across reboots."},{"line_number":570,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":571,"context_line":"            self._recreate_assigned_mediated_devices()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_7af2c49c","line":568,"range":{"start_line":568,"start_character":63,"end_line":568,"end_character":69},"updated":"2018-01-22 14:35:26.000000000","message":"are","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                 \u0027libvirt_ver\u0027: self._version_to_string("},{"line_number":566,"context_line":"                     MIN_LIBVIRT_OTHER_ARCH.get(kvm_arch))})"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # TODO(sbauza): Remove that code once mediated devices become persisted"},{"line_number":569,"context_line":"        # across reboots."},{"line_number":570,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":571,"context_line":"            self._recreate_assigned_mediated_devices()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_daf51885","line":568,"range":{"start_line":568,"start_character":31,"end_line":568,"end_character":35},"updated":"2018-01-22 14:35:26.000000000","message":"this","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":586,"context_line":"        \"\"\""},{"line_number":587,"context_line":"        mdevs \u003d self._get_all_assigned_mediated_devices()"},{"line_number":588,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"},{"line_number":589,"context_line":"        for (mdev_uuid, instance_uuid) in six.iteritems(mdevs):"},{"line_number":590,"context_line":"            if not self._is_existing_mdev(mdev_uuid):"},{"line_number":591,"context_line":"                self._create_new_mediated_device(requested_types, mdev_uuid)"},{"line_number":592,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_5ac268eb","line":589,"updated":"2018-01-22 14:35:26.000000000","message":"out of curiosity, why didn\u0027t you use the built in items() here?","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"613223686d043968b8742fd2f1b4c040c90b1958","unresolved":false,"context_lines":[{"line_number":586,"context_line":"        \"\"\""},{"line_number":587,"context_line":"        mdevs \u003d self._get_all_assigned_mediated_devices()"},{"line_number":588,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"},{"line_number":589,"context_line":"        for (mdev_uuid, instance_uuid) in six.iteritems(mdevs):"},{"line_number":590,"context_line":"            if not self._is_existing_mdev(mdev_uuid):"},{"line_number":591,"context_line":"                self._create_new_mediated_device(requested_types, mdev_uuid)"},{"line_number":592,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_611a1318","line":589,"in_reply_to":"7f96bb07_5ac268eb","updated":"2018-01-22 16:52:22.000000000","message":"That\u0027s not a big deal, but I like to just make sure we have the same behaviour between py2 and py3, but .items() returns a very different result with py2. That still works of course (a tuple is an iterable) but that\u0027s somehow a bad idea.","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"}],"releasenotes/notes/add-support-for-vgpu-libvirt-91d2983e643f5ff1.yaml":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e871dada6d810e887579031a3b6ee6cb8ea5d88","unresolved":false,"context_lines":[{"line_number":36,"context_line":"      when restarting the compute service, the libvirt driver now looks at all"},{"line_number":37,"context_line":"      the guest XMLs if they have mediated devices, and if the mediated device"},{"line_number":38,"context_line":"      is no longer existing, then Nova directly recreates it by using the"},{"line_number":39,"context_line":"      same UUID."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    * If you use Nvidia GRID cards, please know that there is a limitation with"},{"line_number":42,"context_line":"    the nvidia driver that prevents one guest to have more than one virtual"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"7f96bb07_06821350","line":39,"updated":"2018-01-15 15:48:21.000000000","message":"Woot.","commit_id":"90dcc57c247090a505c01239c177c9224cc26a32"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    * Mediated devices that are created by the libvirt driver are not"},{"line_number":38,"context_line":"      persisted upon reboot. Consequently, a guest startup would fail since the"},{"line_number":39,"context_line":"      virtual device wouldn\u0027t be existing. In order to prevent that issue,"},{"line_number":40,"context_line":"      when restarting the compute service, the libvirt driver now looks at all"},{"line_number":41,"context_line":"      the guest XMLs if they have mediated devices, and if the mediated device"},{"line_number":42,"context_line":"      is no longer existing, then Nova directly recreates it by using the"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"7f96bb07_1a4aa07f","line":39,"range":{"start_line":39,"start_character":30,"end_line":39,"end_character":41},"updated":"2018-01-22 14:35:26.000000000","message":"exist","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":38,"context_line":"      persisted upon reboot. Consequently, a guest startup would fail since the"},{"line_number":39,"context_line":"      virtual device wouldn\u0027t be existing. In order to prevent that issue,"},{"line_number":40,"context_line":"      when restarting the compute service, the libvirt driver now looks at all"},{"line_number":41,"context_line":"      the guest XMLs if they have mediated devices, and if the mediated device"},{"line_number":42,"context_line":"      is no longer existing, then Nova directly recreates it by using the"},{"line_number":43,"context_line":"      same UUID."},{"line_number":44,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":5,"id":"7f96bb07_7a2de4a6","line":41,"range":{"start_line":41,"start_character":21,"end_line":41,"end_character":23},"updated":"2018-01-22 14:35:26.000000000","message":"to check if","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"      virtual device wouldn\u0027t be existing. In order to prevent that issue,"},{"line_number":40,"context_line":"      when restarting the compute service, the libvirt driver now looks at all"},{"line_number":41,"context_line":"      the guest XMLs if they have mediated devices, and if the mediated device"},{"line_number":42,"context_line":"      is no longer existing, then Nova directly recreates it by using the"},{"line_number":43,"context_line":"      same UUID."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    * If you use Nvidia GRID cards, please know that there is a limitation with"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"7f96bb07_1a18607f","line":42,"range":{"start_line":42,"start_character":19,"end_line":42,"end_character":27},"updated":"2018-01-22 14:35:26.000000000","message":"exists","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"89dddc42ac8f5bbb42de3e39e0df8c79bc3378b1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"      virtual device wouldn\u0027t be existing. In order to prevent that issue,"},{"line_number":40,"context_line":"      when restarting the compute service, the libvirt driver now looks at all"},{"line_number":41,"context_line":"      the guest XMLs if they have mediated devices, and if the mediated device"},{"line_number":42,"context_line":"      is no longer existing, then Nova directly recreates it by using the"},{"line_number":43,"context_line":"      same UUID."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    * If you use Nvidia GRID cards, please know that there is a limitation with"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"7f96bb07_ed07fc17","line":42,"range":{"start_line":42,"start_character":39,"end_line":42,"end_character":47},"updated":"2018-01-22 14:35:26.000000000","message":"s/directly//","commit_id":"d4af5128a502524a75e38163cb56f4cf0d6e35cb"}]}
