)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":7,"context_line":"libvirt: create vGPU for instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If an allocation is asking for a VGPU, then libvirt will look at the"},{"line_number":10,"context_line":"available mediated devices and call the sysfs to create one of them if needed."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Please note I commented in the relnote all the caveats we currently have"},{"line_number":13,"context_line":"with mediated devices in libvirt, but I\u0027ll provide some workarounds for those"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f91af0f_3bdaa54b","line":10,"range":{"start_line":10,"start_character":71,"end_line":10,"end_character":77},"updated":"2018-01-08 13:59:26.000000000","message":"line width","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":10,"context_line":"available mediated devices and call the sysfs to create one of them if needed."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Please note I commented in the relnote all the caveats we currently have"},{"line_number":13,"context_line":"with mediated devices in libvirt, but I\u0027ll provide some workarounds for those"},{"line_number":14,"context_line":"in the next changes."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ibf210dd27972fed2651d6c9bd73a0bcf352c8bab"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f91af0f_dbda9949","line":13,"range":{"start_line":13,"start_character":72,"end_line":13,"end_character":77},"updated":"2018-01-08 13:59:26.000000000","message":"ditto","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"}],"nova/privsep/libvirt.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"@nova.privsep.sys_admin_pctxt.entrypoint"},{"line_number":308,"context_line":"def create_mdev(physical_device, mdev_type, uuid\u003dNone):"},{"line_number":309,"context_line":"    \"\"\"Instanciate a mediated device.\"\"\""},{"line_number":310,"context_line":"    if uuid is None:"},{"line_number":311,"context_line":"        uuid \u003d uuidutils.generate_uuid()"},{"line_number":312,"context_line":"    with open(\u0027/sys/class/mdev_bus/%(dev)s/\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_c0dce5e5","line":309,"range":{"start_line":309,"start_character":7,"end_line":309,"end_character":18},"updated":"2018-01-08 16:04:12.000000000","message":"Instantiate","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    with open(\u0027/sys/class/mdev_bus/%(dev)s/\u0027"},{"line_number":313,"context_line":"              \u0027mdev_supported_types/%(type)s/create\u0027 % {\u0027dev\u0027: physical_device,"},{"line_number":314,"context_line":"                                                        \u0027type\u0027: mdev_type"},{"line_number":315,"context_line":"                                                        }, \u0027w\u0027) as f:"},{"line_number":316,"context_line":"        f.write(uuid)"},{"line_number":317,"context_line":"    return uuid"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_80fb3d45","line":315,"updated":"2018-01-08 16:04:12.000000000","message":"This is a nit, but I\u0027d rather you construct the string ahead of time and avoid breaking this with line into so many pieces.","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ceae8bdde3b4292e27888ef94b293b67826118d1","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    with open(\u0027/sys/class/mdev_bus/%(dev)s/\u0027"},{"line_number":313,"context_line":"              \u0027mdev_supported_types/%(type)s/create\u0027 % {\u0027dev\u0027: physical_device,"},{"line_number":314,"context_line":"                                                        \u0027type\u0027: mdev_type"},{"line_number":315,"context_line":"                                                        }, \u0027w\u0027) as f:"},{"line_number":316,"context_line":"        f.write(uuid)"},{"line_number":317,"context_line":"    return uuid"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_74859259","line":315,"in_reply_to":"9f91af0f_195a4429","updated":"2018-01-09 09:28:03.000000000","message":"Done","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea007a6250f43ca4165a45583ac4de9f2339587","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    with open(\u0027/sys/class/mdev_bus/%(dev)s/\u0027"},{"line_number":313,"context_line":"              \u0027mdev_supported_types/%(type)s/create\u0027 % {\u0027dev\u0027: physical_device,"},{"line_number":314,"context_line":"                                                        \u0027type\u0027: mdev_type"},{"line_number":315,"context_line":"                                                        }, \u0027w\u0027) as f:"},{"line_number":316,"context_line":"        f.write(uuid)"},{"line_number":317,"context_line":"    return uuid"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_195a4429","line":315,"in_reply_to":"9f91af0f_80fb3d45","updated":"2018-01-08 17:14:21.000000000","message":"agreed. something like this would be more pleasant to read:\n\n fpath \u003d \u0027/sys/class/mdev_bus/{0}/mdev_supported_types/{1}/create\u0027\n fpath \u003d fpath.format(physical_device, mdev_type)\n with open(fpath, \u0027w\u0027) as f:\n     f.write(uuid)","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d9541fb66e2814b77b568c3bf084910d4263b099","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    fpath \u003d \u0027/sys/class/mdev_bus/{0}/mdev_supported_types/{1}/create\u0027"},{"line_number":313,"context_line":"    fpath \u003d fpath.format(physical_device, mdev_type)"},{"line_number":314,"context_line":"    with open(fpath, \u0027w\u0027) as f:"},{"line_number":315,"context_line":"        f.write(uuid)"},{"line_number":316,"context_line":"    return uuid"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_091b5c1b","line":315,"updated":"2018-01-11 12:57:19.000000000","message":"Presumably there are cases where this can fail, for eg if we race to create the last available instance of a type. There are probably a bunch of potential reasons, though.\n\nWhat would happen? If nothing on write, do we subsequently need to check to see if we created the thing we thought we did?","commit_id":"c5c8369af46ef0f201d415313ee73d80cad41227"}],"nova/tests/unit/virt/libvirt/test_config.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"            \u003chostdev mode\u003d\u0027subsystem\u0027 type\u003d\u0027mdev\u0027 model\u003d\u0027vfio-pci\u0027"},{"line_number":1416,"context_line":"             managed\u003d\u0027no\u0027\u003e"},{"line_number":1417,"context_line":"                \u003csource\u003e"},{"line_number":1418,"context_line":"                    \u003caddress uuid\u003d\"b38a3f43-4be2-4046-897f-b67c2f5e0140\" /\u003e"},{"line_number":1419,"context_line":"                \u003c/source\u003e"},{"line_number":1420,"context_line":"            \u003c/hostdev\u003e"},{"line_number":1421,"context_line":"            \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_3ba8658b","line":1418,"range":{"start_line":1418,"start_character":35,"end_line":1418,"end_character":71},"updated":"2018-01-08 13:59:26.000000000","message":"Curious why uuidsentinel is not being used here.","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":15918,"context_line":"                          instance_ref, _fake_network_info(self, 1),"},{"line_number":15919,"context_line":"                          image_meta, {\u0027mapping\u0027: {}},"},{"line_number":15920,"context_line":"                          allocations\u003dallocations)"},{"line_number":15921,"context_line":""},{"line_number":15922,"context_line":"    @mock.patch.object(nova.privsep.libvirt, \u0027create_mdev\u0027)"},{"line_number":15923,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver,"},{"line_number":15924,"context_line":"                       \u0027_get_mdev_capable_devices\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_367ddc7e","line":15921,"updated":"2018-01-08 13:59:26.000000000","message":"Do we want test cases where allocations requests a VGPU but a) we\u0027re not capable (due to version); and b) we\u0027re capable and have available devices, but none of the type specified in the conf?","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5b62c29a129f0c2e072b70aaec927337e72e983f","unresolved":false,"context_lines":[{"line_number":15944,"context_line":"        cfg \u003d drvr._get_guest_config(instance_ref,"},{"line_number":15945,"context_line":"                                     _fake_network_info(self, 1),"},{"line_number":15946,"context_line":"                                     image_meta, {\u0027mapping\u0027: {}},"},{"line_number":15947,"context_line":"                                     allocations\u003dallocations)"},{"line_number":15948,"context_line":"        # Loop over all devices to make sure we have at least one mediated one."},{"line_number":15949,"context_line":"        for device in cfg.devices:"},{"line_number":15950,"context_line":"            if isinstance(device, vconfig.LibvirtConfigGuestHostdevMDEV):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_93b79d87","line":15947,"updated":"2018-01-11 11:21:56.000000000","message":"I need to amend that method for checking the privsep call","commit_id":"c5c8369af46ef0f201d415313ee73d80cad41227"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":1676,"context_line":"            if c.tag \u003d\u003d \"source\":"},{"line_number":1677,"context_line":"                for sub in c.getchildren():"},{"line_number":1678,"context_line":"                    if sub.tag \u003d\u003d \u0027address\u0027:"},{"line_number":1679,"context_line":"                        self.uuid \u003d sub.get(\u0027uuid\u0027)"},{"line_number":1680,"context_line":""},{"line_number":1681,"context_line":""},{"line_number":1682,"context_line":"class LibvirtConfigGuestCharBase(LibvirtConfigGuestDevice):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_00b64d8b","line":1679,"updated":"2018-01-08 16:04:12.000000000","message":"Presumably you can return after this to avoid completing the nested loops?","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ceae8bdde3b4292e27888ef94b293b67826118d1","unresolved":false,"context_lines":[{"line_number":1676,"context_line":"            if c.tag \u003d\u003d \"source\":"},{"line_number":1677,"context_line":"                for sub in c.getchildren():"},{"line_number":1678,"context_line":"                    if sub.tag \u003d\u003d \u0027address\u0027:"},{"line_number":1679,"context_line":"                        self.uuid \u003d sub.get(\u0027uuid\u0027)"},{"line_number":1680,"context_line":""},{"line_number":1681,"context_line":""},{"line_number":1682,"context_line":"class LibvirtConfigGuestCharBase(LibvirtConfigGuestDevice):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_94eff61c","line":1679,"in_reply_to":"9f91af0f_00b64d8b","updated":"2018-01-09 09:28:03.000000000","message":"Done","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"071ef735d4659b8e63470bdbca7d39f1153b6ef8","unresolved":false,"context_lines":[{"line_number":2314,"context_line":"        # Note: This cover only for: LibvirtConfigGuestDisks"},{"line_number":2315,"context_line":"        #                            LibvirtConfigGuestFilesys"},{"line_number":2316,"context_line":"        #                            LibvirtConfigGuestHostdevPCI"},{"line_number":2317,"context_line":"        #                            LibvirtConfigGuestHostdevPCI"},{"line_number":2318,"context_line":"        #                            LibvirtConfigGuestInterface"},{"line_number":2319,"context_line":"        #                            LibvirtConfigGuestUidMap"},{"line_number":2320,"context_line":"        #                            LibvirtConfigGuestGidMap"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_94b791d9","line":2317,"range":{"start_line":2317,"start_character":62,"end_line":2317,"end_character":65},"updated":"2018-01-11 01:40:53.000000000","message":"MDEV","commit_id":"c5c8369af46ef0f201d415313ee73d80cad41227"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"26acff9158f9716b3e981fdc24810da48d051d5d","unresolved":false,"context_lines":[{"line_number":2314,"context_line":"        # Note: This cover only for: LibvirtConfigGuestDisks"},{"line_number":2315,"context_line":"        #                            LibvirtConfigGuestFilesys"},{"line_number":2316,"context_line":"        #                            LibvirtConfigGuestHostdevPCI"},{"line_number":2317,"context_line":"        #                            LibvirtConfigGuestHostdevPCI"},{"line_number":2318,"context_line":"        #                            LibvirtConfigGuestInterface"},{"line_number":2319,"context_line":"        #                            LibvirtConfigGuestUidMap"},{"line_number":2320,"context_line":"        #                            LibvirtConfigGuestGidMap"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_fb4b5dad","line":2317,"range":{"start_line":2317,"start_character":62,"end_line":2317,"end_character":65},"in_reply_to":"7f96bb07_94b791d9","updated":"2018-01-11 09:02:16.000000000","message":"Fsck !","commit_id":"c5c8369af46ef0f201d415313ee73d80cad41227"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d48abbe806f6c0c6683880830d2271ad0faeee97","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"        return dev"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"    def parse_dom(self, xmldoc):"},{"line_number":1641,"context_line":"        childs \u003d super(LibvirtConfigGuestHostdevPCI, self).parse_dom(xmldoc)"},{"line_number":1642,"context_line":"        for c in childs:"},{"line_number":1643,"context_line":"            if c.tag \u003d\u003d \"source\":"},{"line_number":1644,"context_line":"                for sub in c.getchildren():"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_6fe72414","line":1641,"range":{"start_line":1641,"start_character":8,"end_line":1641,"end_character":14},"updated":"2018-01-15 21:22:27.000000000","message":"*cough* *cough*","commit_id":"8c907de49427cf472a52013bca56b0803d77b623"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"107c343e15bb3e9a13289f704fbbef0beb96e94a","unresolved":false,"context_lines":[{"line_number":1669,"context_line":"        return dev"},{"line_number":1670,"context_line":""},{"line_number":1671,"context_line":"    def parse_dom(self, xmldoc):"},{"line_number":1672,"context_line":"        childs \u003d super(LibvirtConfigGuestHostdevMDEV, self).parse_dom(xmldoc)"},{"line_number":1673,"context_line":"        if xmldoc.get(\u0027model\u0027):"},{"line_number":1674,"context_line":"            self.model \u003d xmldoc.get(\u0027model\u0027)"},{"line_number":1675,"context_line":"        for c in childs:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_0f88e06e","line":1672,"range":{"start_line":1672,"start_character":8,"end_line":1672,"end_character":14},"updated":"2018-01-15 21:14:13.000000000","message":"btw, the term is \"children\" here :)","commit_id":"8c907de49427cf472a52013bca56b0803d77b623"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d5786c15190920f5e898b7f1eeba0e4bf38c8b77","unresolved":false,"context_lines":[{"line_number":2314,"context_line":"        # Note: This cover only for: LibvirtConfigGuestDisks"},{"line_number":2315,"context_line":"        #                            LibvirtConfigGuestFilesys"},{"line_number":2316,"context_line":"        #                            LibvirtConfigGuestHostdevPCI"},{"line_number":2317,"context_line":"        #                            LibvirtConfigGuestHostdevPCI"},{"line_number":2318,"context_line":"        #                            LibvirtConfigGuestInterface"},{"line_number":2319,"context_line":"        #                            LibvirtConfigGuestUidMap"},{"line_number":2320,"context_line":"        #                            LibvirtConfigGuestGidMap"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_bdb80976","line":2317,"range":{"start_line":2317,"start_character":62,"end_line":2317,"end_character":65},"updated":"2018-01-15 21:12:55.000000000","message":"MDEV :)","commit_id":"8c907de49427cf472a52013bca56b0803d77b623"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"38dc0238ee5ae328a29dba5e0156a9e743d6e985","unresolved":false,"context_lines":[{"line_number":2314,"context_line":"        # Note: This cover only for: LibvirtConfigGuestDisks"},{"line_number":2315,"context_line":"        #                            LibvirtConfigGuestFilesys"},{"line_number":2316,"context_line":"        #                            LibvirtConfigGuestHostdevPCI"},{"line_number":2317,"context_line":"        #                            LibvirtConfigGuestHostdevMDEV"},{"line_number":2318,"context_line":"        #                            LibvirtConfigGuestInterface"},{"line_number":2319,"context_line":"        #                            LibvirtConfigGuestUidMap"},{"line_number":2320,"context_line":"        #                            LibvirtConfigGuestGidMap"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_0f678027","line":2317,"updated":"2018-01-15 21:36:17.000000000","message":"\\o/","commit_id":"177bca02fa88b155bebb180f802b4d2cf3cfcfd8"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"4d3434e8edd35cc41150e604a3c81faef93644ba","unresolved":false,"context_lines":[{"line_number":4920,"context_line":"        # TODO(sbauza) : Do the magic to find a good one"},{"line_number":4921,"context_line":"        # Either we find an already created but not assigned mdev"},{"line_number":4922,"context_line":"        # or we just create a new one."},{"line_number":4923,"context_line":"        # For the moment, just assume to create a new mdev."},{"line_number":4924,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"},{"line_number":4925,"context_line":"        devices \u003d self._get_mdev_capable_devices(requested_types)"},{"line_number":4926,"context_line":"        for device in devices:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf8cb3f7_23bdfe64","line":4923,"updated":"2017-12-22 17:45:20.000000000","message":"that is the crux of the problem.\nGiven libvirt is very limited, see the release note about the existing caveats. I\u0027ll provide separate changes for trying to workaround each caveat, but I preferred to keep that specific implementation change idealistic, in order to draw the clear line in between what is the expected behaviour, and what is just technical debt because $libvirt","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":4925,"context_line":"        devices \u003d self._get_mdev_capable_devices(requested_types)"},{"line_number":4926,"context_line":"        for device in devices:"},{"line_number":4927,"context_line":"            # NOTE(sbauza): For the moment, only one type is supported but"},{"line_number":4928,"context_line":"            # let lookup like if we would have more than one."},{"line_number":4929,"context_line":"            for mdev_type in device[\u0027types\u0027]:"},{"line_number":4930,"context_line":"                if device[\u0027types\u0027][mdev_type][\u0027availableInstances\u0027] \u003e 0:"},{"line_number":4931,"context_line":"                    mdev_uuid \u003d nova.privsep.libvirt.create_mdev("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_db96193f","line":4928,"range":{"start_line":4928,"start_character":14,"end_line":4928,"end_character":32},"updated":"2018-01-08 13:59:26.000000000","message":"let\u0027s look up as if","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":4940,"context_line":"        # is having the related allocation for the specific VGPU type."},{"line_number":4941,"context_line":"        # For the moment, just accept only one resource provider with one type"},{"line_number":4942,"context_line":"        # by arbitrarly taking only resource provider allocation."},{"line_number":4943,"context_line":"        (rp, alloc) \u003d allocations.popitem()"},{"line_number":4944,"context_line":"        nb_vgpus \u003d alloc[\u0027resources\u0027][fields.ResourceClass.VGPU]"},{"line_number":4945,"context_line":"        for c in six.moves.range(nb_vgpus):"},{"line_number":4946,"context_line":"            # NOTE(sbauza): If no available mdev, it raises a"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_fbb43dd3","line":4943,"range":{"start_line":4943,"start_character":8,"end_line":4943,"end_character":19},"updated":"2018-01-08 13:59:26.000000000","message":"parens redundant","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea007a6250f43ca4165a45583ac4de9f2339587","unresolved":false,"context_lines":[{"line_number":4903,"context_line":"        return guest"},{"line_number":4904,"context_line":""},{"line_number":4905,"context_line":"    def _vgpu_allocations(self, allocations):"},{"line_number":4906,"context_line":"        \"\"\"Filtering only the VGPU allocations from a list of allocations.\"\"\""},{"line_number":4907,"context_line":"        # check if allocated vGPUs"},{"line_number":4908,"context_line":"        if not allocations:"},{"line_number":4909,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_19e004fa","line":4906,"range":{"start_line":4906,"start_character":62,"end_line":4906,"end_character":73},"updated":"2018-01-08 17:14:21.000000000","message":"would be worth including in this docstring a description of the allocation parameter, including the expected format of the parameter. I asked the Xen folks to do the same.","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":4914,"context_line":"            _VGPU \u003d fields.ResourceClass.VGPU"},{"line_number":4915,"context_line":"            if res and _VGPU in res:"},{"line_number":4916,"context_line":"                vgpu_allocations[rp] \u003d {\u0027resources\u0027: {_VGPU: res[_VGPU]}}"},{"line_number":4917,"context_line":"        return vgpu_allocations"},{"line_number":4918,"context_line":""},{"line_number":4919,"context_line":"    def _get_available_mediated_device(self):"},{"line_number":4920,"context_line":"        # TODO(sbauza) : Do the magic to find a good one"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_e00c8942","line":4917,"updated":"2018-01-08 16:04:12.000000000","message":"Am I missing where you use the return value of this? I mean, I know you count it above (which seems weird), but is the point of this to return \"do we have any vgpu allocations\" ? Because if so, I think I\u0027d rename it and change the return value. Otherwise you\u0027re constructing this dict for no reason.","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea007a6250f43ca4165a45583ac4de9f2339587","unresolved":false,"context_lines":[{"line_number":4914,"context_line":"            _VGPU \u003d fields.ResourceClass.VGPU"},{"line_number":4915,"context_line":"            if res and _VGPU in res:"},{"line_number":4916,"context_line":"                vgpu_allocations[rp] \u003d {\u0027resources\u0027: {_VGPU: res[_VGPU]}}"},{"line_number":4917,"context_line":"        return vgpu_allocations"},{"line_number":4918,"context_line":""},{"line_number":4919,"context_line":"    def _get_available_mediated_device(self):"},{"line_number":4920,"context_line":"        # TODO(sbauza) : Do the magic to find a good one"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_f981a0fc","line":4917,"in_reply_to":"9f91af0f_e00c8942","updated":"2018-01-08 17:14:21.000000000","message":"I understand why Sylvain wants to do it this way, actually. Basically, he\u0027s thinking ahead for when granular resource requests is going to be supported and the user will be able to request 2 VGPUs but with different traits -- i.e. the two physical GPUs will be different. In that case, there would be two allocations containing resources: VGPU\u003d1.\n\nAt the very least, I agree with Dan that this is incongruent to construct a dict and just throw it away, so I\u0027d suggest adding a comment in here describing how granular resource requests will affect the result here.","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":4916,"context_line":"                vgpu_allocations[rp] \u003d {\u0027resources\u0027: {_VGPU: res[_VGPU]}}"},{"line_number":4917,"context_line":"        return vgpu_allocations"},{"line_number":4918,"context_line":""},{"line_number":4919,"context_line":"    def _get_available_mediated_device(self):"},{"line_number":4920,"context_line":"        # TODO(sbauza) : Do the magic to find a good one"},{"line_number":4921,"context_line":"        # Either we find an already created but not assigned mdev"},{"line_number":4922,"context_line":"        # or we just create a new one."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_c3d14f25","line":4919,"updated":"2018-01-08 16:04:12.000000000","message":"The point of this is to create a new mdev right? This gets called from _get_guest_config(), which is called from _get_guest_xml(), which is called from spawn(), but also from things like hard_reboot() and rescue(). For the latter cases, we don\u0027t want to create another mdev right?","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea007a6250f43ca4165a45583ac4de9f2339587","unresolved":false,"context_lines":[{"line_number":4928,"context_line":"            # let lookup like if we would have more than one."},{"line_number":4929,"context_line":"            for mdev_type in device[\u0027types\u0027]:"},{"line_number":4930,"context_line":"                if device[\u0027types\u0027][mdev_type][\u0027availableInstances\u0027] \u003e 0:"},{"line_number":4931,"context_line":"                    mdev_uuid \u003d nova.privsep.libvirt.create_mdev("},{"line_number":4932,"context_line":"                        device[\u0027dev_id\u0027], mdev_type)"},{"line_number":4933,"context_line":"                    return mdev_uuid"},{"line_number":4934,"context_line":"        # If we can\u0027t find devices having available VGPUs, just raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_59e44ce1","line":4931,"range":{"start_line":4931,"start_character":53,"end_line":4931,"end_character":64},"updated":"2018-01-08 17:14:21.000000000","message":"I don\u0027t like how the name of this method is _get_available_mediated_device() but we are creating something here. Would you mind separating out the read from the write operation? That way, other callers can find an available mediated device without creating one...","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":4940,"context_line":"        # is having the related allocation for the specific VGPU type."},{"line_number":4941,"context_line":"        # For the moment, just accept only one resource provider with one type"},{"line_number":4942,"context_line":"        # by arbitrarly taking only resource provider allocation."},{"line_number":4943,"context_line":"        (rp, alloc) \u003d allocations.popitem()"},{"line_number":4944,"context_line":"        nb_vgpus \u003d alloc[\u0027resources\u0027][fields.ResourceClass.VGPU]"},{"line_number":4945,"context_line":"        for c in six.moves.range(nb_vgpus):"},{"line_number":4946,"context_line":"            # NOTE(sbauza): If no available mdev, it raises a"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_e33fb3b1","line":4943,"updated":"2018-01-08 16:04:12.000000000","message":"This is assuming what? A single RP in a set of allocations? That won\u0027t be the case forever and this will be fragile when that changes such that we\u0027ll only notice it for systems tested in the presence of this hardware.","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea007a6250f43ca4165a45583ac4de9f2339587","unresolved":false,"context_lines":[{"line_number":4940,"context_line":"        # is having the related allocation for the specific VGPU type."},{"line_number":4941,"context_line":"        # For the moment, just accept only one resource provider with one type"},{"line_number":4942,"context_line":"        # by arbitrarly taking only resource provider allocation."},{"line_number":4943,"context_line":"        (rp, alloc) \u003d allocations.popitem()"},{"line_number":4944,"context_line":"        nb_vgpus \u003d alloc[\u0027resources\u0027][fields.ResourceClass.VGPU]"},{"line_number":4945,"context_line":"        for c in six.moves.range(nb_vgpus):"},{"line_number":4946,"context_line":"            # NOTE(sbauza): If no available mdev, it raises a"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_39086890","line":4943,"range":{"start_line":4943,"start_character":22,"end_line":4943,"end_character":43},"updated":"2018-01-08 17:14:21.000000000","message":"if you\u0027re going to pop anything, pop it from a deepcopy of the allocations parameter. Don\u0027t modify the allocations parameter like this does...","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea007a6250f43ca4165a45583ac4de9f2339587","unresolved":false,"context_lines":[{"line_number":4941,"context_line":"        # For the moment, just accept only one resource provider with one type"},{"line_number":4942,"context_line":"        # by arbitrarly taking only resource provider allocation."},{"line_number":4943,"context_line":"        (rp, alloc) \u003d allocations.popitem()"},{"line_number":4944,"context_line":"        nb_vgpus \u003d alloc[\u0027resources\u0027][fields.ResourceClass.VGPU]"},{"line_number":4945,"context_line":"        for c in six.moves.range(nb_vgpus):"},{"line_number":4946,"context_line":"            # NOTE(sbauza): If no available mdev, it raises a"},{"line_number":4947,"context_line":"            # ComputeResourcesUnavailable exception here."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_590d2c9f","line":4944,"range":{"start_line":4944,"start_character":8,"end_line":4944,"end_character":10},"updated":"2018-01-08 17:14:21.000000000","message":"nb? number?","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea007a6250f43ca4165a45583ac4de9f2339587","unresolved":false,"context_lines":[{"line_number":4945,"context_line":"        for c in six.moves.range(nb_vgpus):"},{"line_number":4946,"context_line":"            # NOTE(sbauza): If no available mdev, it raises a"},{"line_number":4947,"context_line":"            # ComputeResourcesUnavailable exception here."},{"line_number":4948,"context_line":"            mdev_uuid \u003d self._get_available_mediated_device()"},{"line_number":4949,"context_line":"            mdev \u003d vconfig.LibvirtConfigGuestHostdevMDEV()"},{"line_number":4950,"context_line":"            mdev.uuid \u003d mdev_uuid"},{"line_number":4951,"context_line":"            guest.add_device(mdev)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_5969ac1e","line":4948,"range":{"start_line":4948,"start_character":12,"end_line":4948,"end_character":61},"updated":"2018-01-08 17:14:21.000000000","message":"to follow up on the above, I\u0027d prefer to see the following here:\n\n available_devs \u003d self._get_available_mediated_devices()\n if len(available_devs) \u003c nb_vgpus:\n     raise exception.ComputeResourcesUnavailable(...)\n\n for c in six.moves.range(nb_vcpus):\n     dev \u003d available_devs.pop()\n     mdev_uuid \u003d nova.privsep.libvirt.create_mdev(\n         dev[\u0027devi_id\u0027, dev[\u0027mdev_type\u0027])\n     mdev \u003d vconfig.LibvirtConfigGuestHostdevMDEV()\n     mdev.uuid \u003d mdev_uuid\n     guest.add_device(mdev)","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d9541fb66e2814b77b568c3bf084910d4263b099","unresolved":false,"context_lines":[{"line_number":4956,"context_line":"            chosen_mdev \u003d None"},{"line_number":4957,"context_line":"            if mdevs_available:"},{"line_number":4958,"context_line":"                # Take the first available mdev"},{"line_number":4959,"context_line":"                chosen_mdev \u003d mdevs_available.pop()"},{"line_number":4960,"context_line":"            else:"},{"line_number":4961,"context_line":"                # Try to see if we can still create a new mediated device"},{"line_number":4962,"context_line":"                # TODO(sbauza): Not use that conditional branch if a"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_6970e073","line":4959,"updated":"2018-01-11 12:57:19.000000000","message":"This is a race. The critical section is from _get_existing_mdevs_not_assigned() to here.","commit_id":"c5c8369af46ef0f201d415313ee73d80cad41227"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5cd3d3158056cf56477fa78f2731e8f1e43aec72","unresolved":false,"context_lines":[{"line_number":4972,"context_line":"                    if device[\u0027types\u0027][asked_type][\u0027availableInstances\u0027] \u003e 0:"},{"line_number":4973,"context_line":"                        # That physical GPU has enough room for a new mdev"},{"line_number":4974,"context_line":"                        chosen_mdev \u003d nova.privsep.libvirt.create_mdev("},{"line_number":4975,"context_line":"                            device[\u0027dev_id\u0027], asked_type)"},{"line_number":4976,"context_line":"                        break"},{"line_number":4977,"context_line":"            if not chosen_mdev:"},{"line_number":4978,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_5355954f","line":4975,"range":{"start_line":4975,"start_character":28,"end_line":4975,"end_character":44},"updated":"2018-01-11 11:16:27.000000000","message":"this is wrong, I need to rebase it :\n\n[stack@virtlab606 devstack]$ ll /sys/class/mdev_bus/pci_0000_84_00_0/mdev_supported_types/nvidia-35/create\nls: cannot access /sys/class/mdev_bus/pci_0000_84_00_0/mdev_supported_types/nvidia-35/create: No such file or directory\n\nit should be :\n[stack@virtlab606 devstack]$ ll \"/sys/class/mdev_bus/0000:84:00.0/mdev_supported_types/nvidia-35/create\" \n--w-------. 1 root root 4096 Oct 26 07:53 /sys/class/mdev_bus/0000:84:00.0/mdev_supported_types/nvidia-35/create","commit_id":"c5c8369af46ef0f201d415313ee73d80cad41227"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d9541fb66e2814b77b568c3bf084910d4263b099","unresolved":false,"context_lines":[{"line_number":4972,"context_line":"                    if device[\u0027types\u0027][asked_type][\u0027availableInstances\u0027] \u003e 0:"},{"line_number":4973,"context_line":"                        # That physical GPU has enough room for a new mdev"},{"line_number":4974,"context_line":"                        chosen_mdev \u003d nova.privsep.libvirt.create_mdev("},{"line_number":4975,"context_line":"                            device[\u0027dev_id\u0027], asked_type)"},{"line_number":4976,"context_line":"                        break"},{"line_number":4977,"context_line":"            if not chosen_mdev:"},{"line_number":4978,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_a913480d","line":4975,"range":{"start_line":4975,"start_character":28,"end_line":4975,"end_character":44},"in_reply_to":"7f96bb07_5355954f","updated":"2018-01-11 12:57:19.000000000","message":"This is a race. The critical section is from _get_mdev_capable_devices() to here.","commit_id":"c5c8369af46ef0f201d415313ee73d80cad41227"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d4473296281aed85b043615edf8d046e27b7f6a2","unresolved":false,"context_lines":[{"line_number":4980,"context_line":"                    reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":4981,"context_line":"            mdev \u003d vconfig.LibvirtConfigGuestHostdevMDEV()"},{"line_number":4982,"context_line":"            mdev.uuid \u003d chosen_mdev"},{"line_number":4983,"context_line":"            guest.add_device(mdev)"},{"line_number":4984,"context_line":""},{"line_number":4985,"context_line":"    @staticmethod"},{"line_number":4986,"context_line":"    def _guest_add_spice_channel(guest):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_d9b7943a","line":4983,"updated":"2018-01-10 23:46:35.000000000","message":"Yay, it works ! \nhttp://paste.openstack.org/show/642519/","commit_id":"c5c8369af46ef0f201d415313ee73d80cad41227"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"86ae94af111c423d5af4e49a9402b0e819182187","unresolved":false,"context_lines":[{"line_number":4899,"context_line":""},{"line_number":4900,"context_line":"        :param allocations: Information about resources allocated to the"},{"line_number":4901,"context_line":"                            instance via placement, of the form returned by"},{"line_number":4902,"context_line":"                            SchedulerReportClient.get_allocations_for_consumer."},{"line_number":4903,"context_line":"        \"\"\""},{"line_number":4904,"context_line":"        if not allocations:"},{"line_number":4905,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_2cbf38fc","line":4902,"updated":"2018-01-11 22:44:18.000000000","message":"Unfortunately, this is not even a good description because \"allocations\" isn\u0027t really a descriptive structure, it differs by microversion, and this code will break if we rev it again. Ask me how I know.","commit_id":"858162719fac42a8e900a324112fb3759defc332"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"00d34b7359dce960d0c16316b7c0bf36da365182","unresolved":false,"context_lines":[{"line_number":4925,"context_line":"                               for mdev in mdevs]) - set(allocated_mdevs)"},{"line_number":4926,"context_line":"        return available_mdevs"},{"line_number":4927,"context_line":""},{"line_number":4928,"context_line":"    @utils.synchronized(VGPU_RESOURCE_SEMAPHORE)"},{"line_number":4929,"context_line":"    def _guest_add_vgpus(self, guest, allocations):"},{"line_number":4930,"context_line":"        \"\"\"Add virtual GPU(s) to a guest if the list of allocations contains"},{"line_number":4931,"context_line":"        at least one specific resource class allocation for VGPU."}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_b862b015","line":4928,"updated":"2018-01-11 16:37:34.000000000","message":"BFL works :)","commit_id":"858162719fac42a8e900a324112fb3759defc332"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"86ae94af111c423d5af4e49a9402b0e819182187","unresolved":false,"context_lines":[{"line_number":4943,"context_line":"            return"},{"line_number":4944,"context_line":"        # TODO(sbauza): Once we have nested resource providers, find which one"},{"line_number":4945,"context_line":"        # is having the related allocation for the specific VGPU type."},{"line_number":4946,"context_line":"        # For the moment, we should only have one allocation for only one"},{"line_number":4947,"context_line":"        # ResourceProvider."},{"line_number":4948,"context_line":"        for (rp, alloc) in six.iteritems(vgpu_allocations):"},{"line_number":4949,"context_line":"            vgpus_asked \u003d alloc[\u0027resources\u0027][fields.ResourceClass.VGPU]"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_0c659cb5","line":4946,"range":{"start_line":4946,"start_character":65,"end_line":4946,"end_character":73},"updated":"2018-01-11 22:44:18.000000000","message":"s/only one//\n\nYou should have only one \"only one\" in this sentence :)","commit_id":"858162719fac42a8e900a324112fb3759defc332"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"86ae94af111c423d5af4e49a9402b0e819182187","unresolved":false,"context_lines":[{"line_number":4948,"context_line":"        for (rp, alloc) in six.iteritems(vgpu_allocations):"},{"line_number":4949,"context_line":"            vgpus_asked \u003d alloc[\u0027resources\u0027][fields.ResourceClass.VGPU]"},{"line_number":4950,"context_line":"            # TODO(sbauza): Iterate over all the allocations once we have"},{"line_number":4951,"context_line":"            # nested Resource Providers. For the moment, just stop here."},{"line_number":4952,"context_line":"            break"},{"line_number":4953,"context_line":""},{"line_number":4954,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_8c70cc74","line":4951,"updated":"2018-01-11 22:44:18.000000000","message":"Maybe else out of here and log a warning so we know if we got multiple allocations that we can\u0027t handle?","commit_id":"858162719fac42a8e900a324112fb3759defc332"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"355e382dd0e07fa5dcd26db499efc5915473141f","unresolved":false,"context_lines":[{"line_number":5144,"context_line":"    def _get_guest_xml(self, context, instance, network_info, disk_info,"},{"line_number":5145,"context_line":"                       image_meta, rescue\u003dNone,"},{"line_number":5146,"context_line":"                       block_device_info\u003dNone,"},{"line_number":5147,"context_line":"                       allocations\u003dNone):"},{"line_number":5148,"context_line":"        # NOTE(danms): Stringifying a NetworkInfo will take a lock. Do"},{"line_number":5149,"context_line":"        # this ahead of time so that we don\u0027t acquire it while also"},{"line_number":5150,"context_line":"        # holding the logging lock."}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_5a1c7611","line":5147,"updated":"2018-01-15 13:50:44.000000000","message":"As we discussed in the previous PS, it doesn\u0027t work yet with stopping/restarting an instance given we directly call _get_guest_xml() without passing the allocations.","commit_id":"60db1ad74316dea9c76275eb2d5a2c82b23b3f08"}],"releasenotes/notes/add-support-for-vgpu-libvirt-91d2983e643f5ff1.yaml":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"      nova flavor-key \u003cflavor-id\u003e set resources:VGPU\u003d1"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    That said, Nova has for the moment some caveats for using vGPUS."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    * For the moment, only a single type can be supported across one compute"},{"line_number":28,"context_line":"      node, which means that libvirt will create the vGPU by using that specific"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9f91af0f_7bd58de4","line":25,"range":{"start_line":25,"start_character":20,"end_line":25,"end_character":38},"updated":"2018-01-08 13:59:26.000000000","message":"or \u0027currently has\u0027","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"      nova flavor-key \u003cflavor-id\u003e set resources:VGPU\u003d1"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    That said, Nova has for the moment some caveats for using vGPUS."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    * For the moment, only a single type can be supported across one compute"},{"line_number":28,"context_line":"      node, which means that libvirt will create the vGPU by using that specific"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9f91af0f_3b0dc5a0","line":25,"range":{"start_line":25,"start_character":62,"end_line":25,"end_character":67},"updated":"2018-01-08 13:59:26.000000000","message":"vGPUs","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":30,"context_line":"      types but there is no possibility yet to specify in the flavor which"},{"line_number":31,"context_line":"      specific type we want to use for that instance."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    * mediated devices that are created by the libvirt driver are not"},{"line_number":34,"context_line":"      persistent upon reboot. If you need to, you have to look at all the"},{"line_number":35,"context_line":"      guest XML configuration and create a new mediated device by doing"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9f91af0f_bbf8f57a","line":33,"range":{"start_line":33,"start_character":6,"end_line":33,"end_character":14},"updated":"2018-01-08 13:59:26.000000000","message":"Should this be capitalized?","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"      echo \u003cUUID\u003e \u003e /sys/class/mdev_bus/\u003cdevice\u003e/mdev_supported_types/\u003ctype\u003e/create"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    * there are some race conditions in the libvirt driver where it couldn\u0027t"},{"line_number":42,"context_line":"      know that a mediated device has been created, so you would need to restart"},{"line_number":43,"context_line":"      the libvirt deamon. See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1463285"},{"line_number":44,"context_line":"      for detailed information."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9f91af0f_5b4689c2","line":41,"range":{"start_line":41,"start_character":6,"end_line":41,"end_character":11},"updated":"2018-01-08 13:59:26.000000000","message":"capitalize","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":43,"context_line":"      the libvirt deamon. See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1463285"},{"line_number":44,"context_line":"      for detailed information."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    We are working actively to remove those caveats, but please understand that"},{"line_number":47,"context_line":"    for the moment that feature is experimental given all the above."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9f91af0f_3b8065c0","line":46,"updated":"2018-01-08 13:59:26.000000000","message":"Hum, this makes me think the experimental-ness should be called out in big letters at the top (and in the conf option, if it isn\u0027t already).","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b5f7eaf7f68e3db371f5ee6de52e1495aa671ca","unresolved":false,"context_lines":[{"line_number":44,"context_line":"      for detailed information."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    We are working actively to remove those caveats, but please understand that"},{"line_number":47,"context_line":"    for the moment that feature is experimental given all the above."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9f91af0f_3b1b85d0","line":47,"range":{"start_line":47,"start_character":19,"end_line":47,"end_character":23},"updated":"2018-01-08 13:59:26.000000000","message":"this","commit_id":"167d0ae5bdafa7f3cfcb147a4751695f68e28475"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"      nova flavor-key \u003cflavor-id\u003e set resources:VGPU\u003d1"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    That said, Nova has for the moment some caveats for using vGPUS."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    * For the moment, only a single type can be supported across one compute"},{"line_number":28,"context_line":"      node, which means that libvirt will create the vGPU by using that specific"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9f91af0f_c3962f4d","line":25,"range":{"start_line":25,"start_character":62,"end_line":25,"end_character":67},"updated":"2018-01-08 16:04:12.000000000","message":"vGPUs","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"      specific type we want to use for that instance."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    * mediated devices that are created by the libvirt driver are not"},{"line_number":34,"context_line":"      persistent upon reboot. If you need to, you have to look at all the"},{"line_number":35,"context_line":"      guest XML configuration and create a new mediated device by doing"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    .."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9f91af0f_a399ab79","line":34,"range":{"start_line":34,"start_character":6,"end_line":34,"end_character":16},"updated":"2018-01-08 16:04:12.000000000","message":"persisted\n\nAlso, I expect everyone using this will \"need to\" right? Explaining why this is important is probably useful. Presumably if they don\u0027t re-create these before nova tries to start a guest, startup will fail, right?","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ceae8bdde3b4292e27888ef94b293b67826118d1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"      specific type we want to use for that instance."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    * mediated devices that are created by the libvirt driver are not"},{"line_number":34,"context_line":"      persistent upon reboot. If you need to, you have to look at all the"},{"line_number":35,"context_line":"      guest XML configuration and create a new mediated device by doing"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    .."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9f91af0f_74d4b220","line":34,"range":{"start_line":34,"start_character":6,"end_line":34,"end_character":16},"in_reply_to":"9f91af0f_a399ab79","updated":"2018-01-09 09:28:03.000000000","message":"Done","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca83b6e9138a82e55185833126af4ef45b622ec1","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    * mediated devices that are created by the libvirt driver are not"},{"line_number":34,"context_line":"      persistent upon reboot. If you need to, you have to look at all the"},{"line_number":35,"context_line":"      guest XML configuration and create a new mediated device by doing"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    .."},{"line_number":38,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9f91af0f_e37c9320","line":35,"range":{"start_line":35,"start_character":34,"end_line":35,"end_character":71},"updated":"2018-01-08 16:04:12.000000000","message":"This should probably be something like:\n\n recreate mediated devices for existing guests","commit_id":"e087983576736a70636293b9eba8198e38eb8af7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"86ae94af111c423d5af4e49a9402b0e819182187","unresolved":false,"context_lines":[{"line_number":35,"context_line":"      virtual device wouldn\u0027t be existing. In order to prevent that issue,"},{"line_number":36,"context_line":"      operators rebooting a compute node have to, before restarting"},{"line_number":37,"context_line":"      nova-compute service, look at all the guest XML configuration and"},{"line_number":38,"context_line":"      recreate mediated devices for existing guests by doing"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    .."},{"line_number":41,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"7f96bb07_ccf7b4f5","line":38,"updated":"2018-01-11 22:44:18.000000000","message":"After our discussion yesterday, we\u0027re going to do that for them in init_host in a subsequent patch right? We probably shouldn\u0027t merge this in \"you can\u0027t restart a compute node\" state until we have the patch to handle startup queued behind it.","commit_id":"858162719fac42a8e900a324112fb3759defc332"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac8e00ddc89102e9a675731ea3d8f68b5b5bf9a2","unresolved":false,"context_lines":[{"line_number":35,"context_line":"      virtual device wouldn\u0027t be existing. In order to prevent that issue,"},{"line_number":36,"context_line":"      operators rebooting a compute node have to, before restarting"},{"line_number":37,"context_line":"      nova-compute service, look at all the guest XML configuration and"},{"line_number":38,"context_line":"      recreate mediated devices for existing guests by doing"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    .."},{"line_number":41,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"7f96bb07_1c2b78eb","line":38,"in_reply_to":"7f96bb07_ccf7b4f5","updated":"2018-01-12 14:21:00.000000000","message":"You can restart a compute service, but in case you need to reboot the node, then you need to recreate the mdevs by looking at all the virsh list and see the mdev uuid.\n\nI\u0027m currently working on adding a change for automaticly doing that with init_host() FWIW.","commit_id":"858162719fac42a8e900a324112fb3759defc332"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f19b5daf48ca7ab12d3f4c12931d4cecf1ad7a24","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    * For the moment, only a single type can be supported across one compute"},{"line_number":28,"context_line":"      node, which means that libvirt will create the vGPU by using that"},{"line_number":29,"context_line":"      specific type only. It\u0027s also possible to have two compute nodes having"},{"line_number":30,"context_line":"      different types but there is no possibility yet to specify in the flavor"},{"line_number":31,"context_line":"      which specific type we want to use for that instance."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    * For the moment, please don\u0027t restart instances (or suspend/resume them)"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7f96bb07_ea1ad0c3","line":31,"range":{"start_line":30,"start_character":65,"end_line":31,"end_character":59},"updated":"2018-01-18 16:42:55.000000000","message":"not directly, but indirectly the deployer could create different host aggregates for different vgpu types and refer to the aggregate in the flavor.","commit_id":"177bca02fa88b155bebb180f802b4d2cf3cfcfd8"}]}
