cockpit-project / cockpit-machines

Cockpit UI for virtual machines
GNU Lesser General Public License v2.1
257 stars 67 forks source link

scripts: Fallback to IPv4 for spice if lo doesn't have an ipv6 addr #1677

Closed SludgeGirl closed 2 weeks ago

SludgeGirl commented 3 weeks ago

Hey! Just a small patch to allow spice to fallback to IPv4 in cases where the user has disabled IPv6. I needed a bit of a break from the general Cockpit tests so thought it'd pick up a bug or two, but the tests are getting close!

martinpitt commented 3 weeks ago

Interesting this breaks on rawhide:

    self.assertEqual(spice_listen, spice[0].attrib['listen'])
AssertionError: '::1' != '127.0.0.1'
- ::1
+ 127.0.0.1

So this overrides an explicit configuration in /etc/libvirt/qemu.conf, which we should never do. This should only change the implicit default. The code tries to do that, but I think I see the problem.

SludgeGirl commented 3 weeks ago

I've got this reworked to be inline with your suggestion, let me know if there's any other changes you'd like, thanks for your patience with this one!

martinpitt commented 2 weeks ago

Ugh, this breaks RHEL 8 hard. I have a look.

SludgeGirl commented 2 weeks ago

Thanks for your help with this!