| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2018-01-11 | |||
| 13:51:57 | bauzas | and then the caller attaching those vgpus *after* it got the XML ? | |
| 13:51:57 | mdbooth | bauzas: Something like that would be my preference. | |
| 13:52:08 | mdbooth | No, you have to do it before | |
| 13:52:39 | bauzas | mdbooth: you understand that it's mostly a convenience problem ? | |
| 13:52:41 | mdbooth | So you have to do the host config first, then you can generate the guest xml based on how you did it | |
| 13:53:04 | mdbooth | It's the same as the volume attachment problem. You can't generate the guest xml until you can tell libvirt where you mounted the volume. | |
| 13:53:09 | bauzas | mdbooth: so you would pass the extra bits down _get_guest_xml, right? | |
| 13:53:22 | mdbooth | Yes. | |
| 13:54:52 | bauzas | mdbooth: and then the whole _give_me_mdevs() would be a synchronized section? | |
| 13:55:15 | bauzas | gibi: chairing the nova meeting, right? | |
| 13:55:33 | mdbooth | bauzas: Yes, it would have to be. | |
| 13:55:55 | bauzas | mdbooth: I still consider the synchronized section to be in a follow-up | |
| 13:56:02 | bauzas | mdbooth: timeline wise | |
| 13:56:25 | bauzas | because we're 2 weeks away from the FF, and I don't want that feature to be punted | |
| 13:56:58 | mdbooth | bauzas: Adding that would be way simpler than moving code around out of _get_guest_xml | |
| 13:57:18 | mdbooth | Just a simple host-wide local lock | |
| 13:57:26 | bauzas | I agree | |
| 13:57:49 | bauzas | here are my thoughts | |
| 13:58:07 | bauzas | based on what I see important to be merged before end of Queens | |
| 13:58:16 | bauzas | #1 the patch itself | |
| 13:58:32 | bauzas | (with the synchronized lock) | |
| 13:58:50 | bauzas | #2 the possibility to disallow nova to create mdevs | |
| 13:59:10 | bauzas | #3 the fix for power-on and others | |
| 13:59:28 | bauzas | #4 the possibility to recreate mdevs after a reboot | |
| 13:59:33 | bauzas | and the rest looks optional to me | |
| 13:59:44 | bauzas | we can refine the interfaces in Rocky | |
| 14:00:23 | bauzas | besides the fact that the problem you mention isn't particular to the VGPU feature, but rather for a shit ton of extra devices and features we add to the guest | |
| 14:00:36 | bauzas | mdbooth: agree ? | |
| 14:00:38 | mdbooth | Only volumes, I think. | |
| 14:00:45 | mdbooth | I agree with your prioritisation. | |
| 14:00:55 | gibi | bauzas: I did not get the memo that I'm the chair | |
| 14:00:56 | bauzas | mdbooth: no, we litterally generate all the devices at the same place | |
| 14:01:10 | gibi | bauzas: but I can jump in | |
| 14:01:13 | efried | gibi bauzas Somebody oughtta do it. The time is now :) | |
| 14:03:01 | mdbooth | bauzas: I really think it's only volumes. | |
| 14:03:30 | mdbooth | The others we're just adding devices to the guest. The different with volumes and now vgpus is that we're reconfiguring the host. | |
| 14:03:46 | mdbooth | So we're doing _get_guest_xml() and it has surprising side-effects | |
| 14:03:48 | bauzas | mdbooth: https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L4882 ? | |
| 14:04:09 | mdbooth | bauzas: Yeah, that's just pulling them out of the instance. | |
| 14:04:16 | mdbooth | IIUC they've already been allocated elsewhere. | |
| 14:04:17 | bauzas | mdbooth: what's the difference between attaching a PCI device or a mediated device ? | |
| 14:04:40 | mdbooth | Because you're not creating the pci device, or doing any kind of 'scheduling' | |
| 14:05:13 | mdbooth | You're not calling _get_guest_xml() and suddenly you've created a new pci device | |
| 14:05:59 | mdbooth | Anyway, I agree with your prioritisation. That said, I really don't like it about volumes, and I'm uncomfortable adding more of it. | |
| 14:06:03 | bauzas | mdbooth: but the allocation was made way earlier :) | |
| 14:06:12 | bauzas | for the VGPU | |
| 14:06:35 | bauzas | if you go to that compute, that's because it has free space for a vGPU | |
| 14:06:45 | bauzas | because placement told you | |
| 14:06:58 | bauzas | exactly like NUMA things | |
| 14:07:12 | bauzas | the scheduler or placement won't know which specific device you're assigned | |
| 14:07:19 | bauzas | but it will know there is room for you | |
| 14:07:39 | bauzas | in theory, you should never raise the exception I added | |
| 14:08:47 | mdbooth | bauzas: There's also the case of recreating the domain xml with existing mdevs. | |
| 14:09:35 | mdbooth | Although perhaps that doesn't matter as long as we're absolutely certain the domain isn't running. | |
| 14:09:58 | mdbooth | But again that's an embedded assumption which makes everything harder to understand. | |
| 14:10:32 | bauzas | mdbooth: the problem is that the XML isn't persisted when you stop the instance | |
| 14:10:38 | bauzas | I mean in Nova | |
| 14:10:46 | bauzas | that's surprising to me | |
| 14:10:57 | bauzas | we regenerate the XML when we start again the instance | |
| 14:11:02 | bauzas | while it's already been defined ! | |
| 14:11:23 | bauzas | mdbooth: any idea you know why ? | |
| 14:11:25 | mdbooth | Yeah, that's... suboptimal. | |
| 14:11:34 | bauzas | that's rather errorprone | |
| 14:11:52 | mdbooth | A legacy design choice that Nova is the ultimate source of truth. It means we lose stuff like device ordering and address assignments. | |
| 14:13:04 | bauzas | I can understand the reasoning | |
| 14:13:12 | bauzas | but then, you somehow need to persist that | |
| 14:13:19 | bauzas | and rather not rebuilding it | |
| 14:13:23 | bauzas | but that's MHO | |
| 14:13:34 | bauzas | and I'm possibly missing some design choices | |
| 14:14:28 | artom | It may have come from the need to support other drivers? | |
| 14:14:35 | artom | Who don't necessarily keep state like libvirt does? | |
| 14:14:50 | mdbooth | artom: This is an internal libvirt driver detail. | |
| 14:15:10 | bauzas | anyway | |
| 14:15:36 | bauzas | I have some stupid formatting to do, because pci names are different from filesystem | |
| 14:15:47 | bauzas | I mean pci names in libvirt | |
| 14:15:53 | bauzas | grrrr | |
| 14:15:56 | mdbooth | bauzas: I agree that moving that stuff is less important, though. | |
| 14:16:21 | mdbooth | I think where we differ is much less important we think it is ;) | |
| 14:16:37 | cdent | "source of truth" is definitely a common issue | |
| 14:17:09 | bauzas | distributed systems is a NP-problem by definition | |
| 14:17:18 | bauzas | so I'm not afraid | |
| 14:20:13 | mdbooth | bauzas: The other things are bugs, anyway. This is an issue of ongoing maintainability. | |
| 14:21:15 | kashyap | stephenfin: Hey, have you setup DevStack lately on an older branch (Mitaka) on CentOS? | |
| 14:21:41 | stephenfin | kashyap: Newton is as far back I've gone in a while, I think | |
| 14:21:42 | kashyap | I don't see Mitaka branch in DevStack, do they "delete" the older branches? | |
| 14:21:46 | stephenfin | and that was before it was EOL | |
| 14:21:56 | stephenfin | I guess they do. Look for the mitaka-eol tag | |
| 14:22:22 | kashyap | stack@devstack-centos ~/src/cloud/devstack (master) $ git branch -a | grep -i mitaka | |
| 14:22:25 | kashyap | stack@devstack-centos ~/src/cloud/devstack (master) $ echo $? | |
| 14:22:28 | kashyap | 1 | |
| 14:22:42 | stephenfin | git tag -a | grep -i mitaka | |
| 14:23:01 | kashyap | s/-a/-l/ | |
| 14:23:25 | stephenfin | Indeed | |
| 14:23:26 | kashyap | Yep, could fetch from the tag. Thx. | |
| 14:23:35 | stephenfin | Once you've that checked out, you'll also want to modify the branches that are checked out, e.g. https://gist.github.com/stephenfin/d1c000f7e52ff181c4673322b28eaf47#file-local-conf-L71-L81https://gist.github.com/stephenfin/d1c000f7e52ff181c4673322b28eaf47#file-local-conf-L71-L81 | |
| 14:23:46 | stephenfin | I guess they should all be 'mitaka-eol' | |
| 14:24:25 | kashyap | stephenfin: Yeah, my attempt on Fedora for Mitaka failed | |
| 14:25:07 | kashyap | Failed as in, the libvirt-python wonkiness: http://paste.openstack.org/show/642707/ | |
| 14:25:08 | stephenfin | Aye, an LTS distro is probably the way to go. Guess either Ubuntu 14.04 or CentOS 7.4 is your best bet | |
| 14:25:29 | kashyap | It's missing two of the events, when building libvirt-python | |