)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cc2a8ab4a43a9d724d2f247338e5e4297a00204c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid suspending guest with attached vGPUs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Since libvirt doesn\u0027t allow to hot-unplug mediated devices, we need to"},{"line_number":10,"context_line":"short-circuit the suspend action if the instance has mediated devices and set"},{"line_number":11,"context_line":"it back to the ACTIVE state."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f93b717_5d785bf7","line":9,"range":{"start_line":9,"start_character":28,"end_line":9,"end_character":30},"updated":"2018-01-24 15:49:26.000000000","message":"us to","commit_id":"73087accd09d895d3a0dfb322298feee7793c657"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cc2a8ab4a43a9d724d2f247338e5e4297a00204c","unresolved":false,"context_lines":[{"line_number":18883,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":18884,"context_line":"        guest \u003d libvirt_guest.Guest(FakeVirtDomain(fake_xml\u003ddom_with_vgpu))"},{"line_number":18885,"context_line":"        self.assertRaises(exception.InstanceFaultRollback,"},{"line_number":18886,"context_line":"                          drvr._detach_mediated_devices, guest)"},{"line_number":18887,"context_line":""},{"line_number":18888,"context_line":""},{"line_number":18889,"context_line":"class LibvirtVolumeUsageTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f93b717_9d2023fa","line":18886,"updated":"2018-01-24 15:49:26.000000000","message":"This validates the expected exception, but we should probably test to make sure that it also re-raises an unexpected one.","commit_id":"73087accd09d895d3a0dfb322298feee7793c657"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"da73f7f62e5ec8dcaba96f682450a56d67f7a783","unresolved":false,"context_lines":[{"line_number":5900,"context_line":"        mdevs \u003d guest.get_all_devices("},{"line_number":5901,"context_line":"            devtype\u003dvconfig.LibvirtConfigGuestHostdevMDEV)"},{"line_number":5902,"context_line":"        for mdev_cfg in mdevs:"},{"line_number":5903,"context_line":"            guest.detach_device(mdev_cfg, live\u003dTrue)"},{"line_number":5904,"context_line":""},{"line_number":5905,"context_line":""},{"line_number":5906,"context_line":"    def _has_numa_support(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_faf1f402","line":5903,"updated":"2018-01-22 14:11:21.000000000","message":"the fun of that is that we\u0027re getting a nice libvirt exception, woohoo...\nhttp://paste.openstack.org/show/649937/","commit_id":"a0d593a1a7d5d6fcbbaf3fd1887b17f01a645d9e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"13714e2c8ecad4aeeb50e07ac97e4a91a6d82866","unresolved":false,"context_lines":[{"line_number":5925,"context_line":"                    reason \u003d _(\"Suspend is not supported for instances having \""},{"line_number":5926,"context_line":"                               \"attached vGPUs.\")"},{"line_number":5927,"context_line":"                    raise exception.InstanceFaultRollback("},{"line_number":5928,"context_line":"                        exception.InstanceSuspendFailure(reason\u003dreason))"},{"line_number":5929,"context_line":""},{"line_number":5930,"context_line":"    def _has_numa_support(self):"},{"line_number":5931,"context_line":"        # This means that the host can support LibvirtConfigGuestNUMATune"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_bdcfbf7d","line":5928,"updated":"2018-01-23 14:02:06.000000000","message":"oops, here if libvirt returns another exception, we swallow it.","commit_id":"3c932d60dddd78af5365a9fde538a26d249374b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4943841a39ab50b759378a08e39e76d6b1e2f678","unresolved":false,"context_lines":[{"line_number":5924,"context_line":"                if error_code \u003d\u003d libvirt.VIR_ERR_CONFIG_UNSUPPORTED:"},{"line_number":5925,"context_line":"                    reason \u003d _(\"Suspend is not supported for instances having \""},{"line_number":5926,"context_line":"                               \"attached vGPUs.\")"},{"line_number":5927,"context_line":"                    raise exception.InstanceFaultRollback("},{"line_number":5928,"context_line":"                        exception.InstanceSuspendFailure(reason\u003dreason))"},{"line_number":5929,"context_line":"                else:"},{"line_number":5930,"context_line":"                    raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_281d9d72","line":5927,"range":{"start_line":5927,"start_character":36,"end_line":5927,"end_character":57},"updated":"2018-01-23 22:48:11.000000000","message":"Oh pretty sneaky, and yes this is used in the compute manager suspend_instance method.","commit_id":"9e438d22a38b0426692b2e0928e2afdb1faf1544"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a4df74439fd03b43e4a1ad3792a8d9be2e8e313f","unresolved":false,"context_lines":[{"line_number":5924,"context_line":"                if error_code \u003d\u003d libvirt.VIR_ERR_CONFIG_UNSUPPORTED:"},{"line_number":5925,"context_line":"                    reason \u003d _(\"Suspend is not supported for instances having \""},{"line_number":5926,"context_line":"                               \"attached vGPUs.\")"},{"line_number":5927,"context_line":"                    raise exception.InstanceFaultRollback("},{"line_number":5928,"context_line":"                        exception.InstanceSuspendFailure(reason\u003dreason))"},{"line_number":5929,"context_line":"                else:"},{"line_number":5930,"context_line":"                    raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_b7e81ab3","line":5927,"range":{"start_line":5927,"start_character":36,"end_line":5927,"end_character":57},"in_reply_to":"7f96bb07_281d9d72","updated":"2018-01-24 10:19:59.000000000","message":"Yup, that\u0027s how virt drivers tell the compute node to rollback into ACTIVE :\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L7442\n\nwhich is called by :\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4607","commit_id":"9e438d22a38b0426692b2e0928e2afdb1faf1544"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4e4c0f68cbde0a7f2b598d269a1dc25aee311ccd","unresolved":false,"context_lines":[{"line_number":5915,"context_line":"                guest.detach_device(mdev_cfg, live\u003dTrue)"},{"line_number":5916,"context_line":"            except libvirt.libvirtError as ex:"},{"line_number":5917,"context_line":"                error_code \u003d ex.get_error_code()"},{"line_number":5918,"context_line":"                # NOTE(sbauza): There is a pending issue with libvirt that"},{"line_number":5919,"context_line":"                # doesn\u0027t allow to hot-unplug mediated devices. Let\u0027s"},{"line_number":5920,"context_line":"                # short-circuit the suspend action and set the instance back"},{"line_number":5921,"context_line":"                # to ACTIVE."}],"source_content_type":"text/x-python","patch_set":7,"id":"5f93b717_b158a856","line":5918,"range":{"start_line":5918,"start_character":43,"end_line":5918,"end_character":56},"updated":"2018-01-24 18:04:36.000000000","message":"Is there a BZ we can track so that at some point we can use a version conditional on this? I guess if you\u0027re using the version that supports it, you don\u0027t get here, so doesn\u0027t matter that much, but would be nice for eventually removing this check.","commit_id":"8e037894f12f42615454b61e4cdfbca6f5f923b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4e4c0f68cbde0a7f2b598d269a1dc25aee311ccd","unresolved":false,"context_lines":[{"line_number":5916,"context_line":"            except libvirt.libvirtError as ex:"},{"line_number":5917,"context_line":"                error_code \u003d ex.get_error_code()"},{"line_number":5918,"context_line":"                # NOTE(sbauza): There is a pending issue with libvirt that"},{"line_number":5919,"context_line":"                # doesn\u0027t allow to hot-unplug mediated devices. Let\u0027s"},{"line_number":5920,"context_line":"                # short-circuit the suspend action and set the instance back"},{"line_number":5921,"context_line":"                # to ACTIVE."},{"line_number":5922,"context_line":"                # TODO(sbauza): Once libvirt supports this, amend the resume()"},{"line_number":5923,"context_line":"                # operation to support reallocating mediated devices."},{"line_number":5924,"context_line":"                if error_code \u003d\u003d libvirt.VIR_ERR_CONFIG_UNSUPPORTED:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f93b717_8c2c6f9a","line":5921,"range":{"start_line":5919,"start_character":64,"end_line":5921,"end_character":28},"updated":"2018-01-24 18:04:36.000000000","message":"Yup and this is how:\n\nhttps://github.com/openstack/nova/blob/87ea686f9f2cc706205d188922bb14272625e7be/nova/compute/manager.py#L4613\n\nhttps://github.com/openstack/nova/blob/87ea686f9f2cc706205d188922bb14272625e7be/nova/compute/manager.py#L7448","commit_id":"8e037894f12f42615454b61e4cdfbca6f5f923b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4e4c0f68cbde0a7f2b598d269a1dc25aee311ccd","unresolved":false,"context_lines":[{"line_number":5923,"context_line":"                # operation to support reallocating mediated devices."},{"line_number":5924,"context_line":"                if error_code \u003d\u003d libvirt.VIR_ERR_CONFIG_UNSUPPORTED:"},{"line_number":5925,"context_line":"                    reason \u003d _(\"Suspend is not supported for instances having \""},{"line_number":5926,"context_line":"                               \"attached vGPUs.\")"},{"line_number":5927,"context_line":"                    raise exception.InstanceFaultRollback("},{"line_number":5928,"context_line":"                        exception.InstanceSuspendFailure(reason\u003dreason))"},{"line_number":5929,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f93b717_51bcc468","line":5926,"range":{"start_line":5926,"start_character":41,"end_line":5926,"end_character":46},"updated":"2018-01-24 18:04:36.000000000","message":"I guess this is just assuming this is the only type of mdev on a guest in the libvirt driver at this point? I haven\u0027t been following the rest of the series or what other things, if any, could be attached out of band.","commit_id":"8e037894f12f42615454b61e4cdfbca6f5f923b9"}],"releasenotes/notes/add-support-for-vgpu-libvirt-91d2983e643f5ff1.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b8a9ec98d45f9c8428684291e25a001ce5df55f2","unresolved":false,"context_lines":[{"line_number":36,"context_line":"      are recommended until libvirt supports that. If a user asks to suspend"},{"line_number":37,"context_line":"      the instance, Nova will get an exception that will set the instance state"},{"line_number":38,"context_line":"      back to ACTIVE, and you can see the suspend action in os-instance-action"},{"line_number":39,"context_line":"      API be in ERROR."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    * Resizing an instance with a new flavor that has vGPU resources doesn\u0027t"},{"line_number":42,"context_line":"      allocate those vGPUs to the instance (the instance is created without"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f93b717_60056c7a","line":39,"range":{"start_line":39,"start_character":16,"end_line":39,"end_character":21},"updated":"2018-01-24 16:17:29.000000000","message":"The action status won\u0027t be ERROR, it will be \"Error\":\n\nhttps://github.com/openstack/nova/blob/87ea686f9f2cc706205d188922bb14272625e7be/nova/objects/instance_action.py#L160\n\nSubtle difference but...","commit_id":"73087accd09d895d3a0dfb322298feee7793c657"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cc2a8ab4a43a9d724d2f247338e5e4297a00204c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"      are recommended until libvirt supports that. If a user asks to suspend"},{"line_number":37,"context_line":"      the instance, Nova will get an exception that will set the instance state"},{"line_number":38,"context_line":"      back to ACTIVE, and you can see the suspend action in os-instance-action"},{"line_number":39,"context_line":"      API be in ERROR."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    * Resizing an instance with a new flavor that has vGPU resources doesn\u0027t"},{"line_number":42,"context_line":"      allocate those vGPUs to the instance (the instance is created without"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f93b717_9df2639a","line":39,"range":{"start_line":39,"start_character":10,"end_line":39,"end_character":15},"updated":"2018-01-24 15:49:26.000000000","message":"will be","commit_id":"73087accd09d895d3a0dfb322298feee7793c657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4e4c0f68cbde0a7f2b598d269a1dc25aee311ccd","unresolved":false,"context_lines":[{"line_number":35,"context_line":"      other instance actions (like snapshotting the instance or shelving it)"},{"line_number":36,"context_line":"      are recommended until libvirt supports that. If a user asks to suspend"},{"line_number":37,"context_line":"      the instance, Nova will get an exception that will set the instance state"},{"line_number":38,"context_line":"      back to ACTIVE, and you can see the suspend action in os-instance-action"},{"line_number":39,"context_line":"      API will be Error."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    * Resizing an instance with a new flavor that has vGPU resources doesn\u0027t"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"5f93b717_8c030f0e","line":38,"range":{"start_line":38,"start_character":14,"end_line":38,"end_character":20},"updated":"2018-01-24 18:04:36.000000000","message":"And that\u0027s the only state currently in which you can suspend an instance so OK:\n\nhttps://github.com/openstack/nova/blob/87ea686f9f2cc706205d188922bb14272625e7be/nova/compute/api.py#L3393","commit_id":"8e037894f12f42615454b61e4cdfbca6f5f923b9"}]}
