Bug 2222766
Summary: | passt integration incomplete | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Laszlo Ersek <lersek> |
Component: | libvirt | Assignee: | Laine Stump <laine> |
libvirt sub component: | Networking | QA Contact: | yalzhang <yalzhang> |
Status: | CLOSED MIGRATED | Docs Contact: | |
Severity: | unspecified | ||
Priority: | unspecified | CC: | hhan, lmen, lvivier, rjones, sbrivio, virt-maint, yalzhang, ymankad |
Version: | 9.2 | Keywords: | MigratedToJIRA |
Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-09-22 16:07:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Laszlo Ersek
2023-07-13 16:30:30 UTC
Wow! We needed you around to keep me in line when doing the original passt support! I would consider these each separate issues possibly worthy of separate BZes, but here's a quick response to each: 1) Yes, this is due to SLIRP having an "odd" idea of how the configuration for a guest IP should be done vs. passt's more sane idea, combined with me ASSuming that SLIRP would be doing the sane thing. In my opinion, replicating SLIRP's mistakes for passt would not be a good idea, and we should instead document the change in behavior (is there a way to force SLIRP to assign a specific IP? If so, maybe a "common configuration" could be achieved by detecting that the specified IP was a host address (rather than network address) and making whatever (if any) change was necessary to the SLIRP/qemu commandline. At the very least, the documentation in formatdomain.html needs to be changed to reflect reality. 2) How does the guest know what the host's IP address is in the case of SLIRP? Is it (or maybe something in libguestfs?) just implying it based on the network address that's provided? Is the host's IP actually used for something in the guest or host? I'm not sure what's being requested here; just that the default gateway remain the same? 3) This is definitely just a bonehead mistake on my part, again caused by making an assumption rather than actually reading and comprehending the full documentation. I just posted a fix here: https://listman.redhat.com/archives/libvir-list/2023-July/240713.html Let me know if you'd rather not have yourself listed in the Reported-by: tag. 4) So, the only reason that the guest-side <route> entries isn't implemented for QEMU is because it was originally added (by me? I can't remember for sure) for LXC, and it's not possible for QEMU to directly manipulate guest routing tables (or IP addresses for that matter) for tap-based networking, which was the only kind of QEMU networking I was interested in at the time. With passt, it would certainly be reasonable to implement the one special case of <route> that can be configured - setting the --gateway based on <route family='ipv4' address='0.0.0.0' prefix='0' gateway='blah'/> in the XML. I don't know (yet) if that would solve the difference in interface netmask in the guest though (I need time and neural bandwidth to test it out). (1) From libguestfs's perspective, where we certainly need to preserve SLIRP support, I'd prefer if SLIRP-versus-passt would be "transparent", as seen from the appliance. So I'm fine with any changes to the defaults, as long as the libvirt XML lets me specify such details for passt that I get a guest-side (appliance-side) environment that is very similar to SLIRP's. NB I'm not implying that all of these details actually *matter* for libguestfs networking. There is one bit that certainly matters (the host's IP address, as seen from the guest), and from there, I went for all the other details too that I could collect. (2) The host's IP address, as seen by the guest, is exposed via DHCP; it is used at least for name resolving, for setting the default route, and (dependent on guest "payload") by guest applications too. For example, one of the tests in the libguestfs test suite sets up an rsync server on the host, and connects to it from the guest. That depends on the test suite knowing the host's IP address, as seen by the guest, in advance. It's admittedly quite hacky, so if we can make that test case smarter (so that the appliance determine the host IP address automatically...), that might as well obviate this whole BZ, perhaps. (3) I've replied in-thread. (4) This seems like a lot of work, and again its utility depends on (2). Thanks! Replying to (1) again: as I said above, this problem can be worked around (or mitigated) quite easily, in fact; and it's part of my libguestfs series that I just sent (see <https://bugzilla.redhat.com/show_bug.cgi?id=2184967#c12>, patch 1 out of 7). The trick is to just use the specific "host address" 169.254.2.15 ("host" in the networking sense, not in the virtualization sense...), as opposed to the network address 169.254.0.0, in the domain XML. SLIRP will behave identically, and passt will start doing the right thing. So this may only need a documentation change, or not even that. Freshly back from vacation, I've pushed the patch to remove --mac-addr setting. (I unfortunately forgot to link this BZ in the commit log) commit a8262cb331db0f1a706edbadffc2cd5b01e44be6 Author: Laine Stump <laine> Date: Thu Jul 13 11:51:28 2023 -0400 qemu: don't add --mac-addr option to passt commandline Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug. |