3

Here's my situation: I'm running CentOS 7 with Openvswitch and Libvirt/Qemu. My domains are configured to use the virtualport type openvswitch, so when I start a VM it creates a port in the ovs bridge. Nothing too complicated.

My problem is if I reboot the hypervisor, things don't seem to shut down in the correct order and I get stale OVS ports when the machine boots back up.

a7c1e36d-26b5-43d8-a422-452b013c4009
    Bridge "ovsbr0"
        Port "vnet1"
            tag: 46
            Interface "vnet1"
                error: "could not open network device vnet1 (No such device)"
        Port "vnet0"
            tag: 41
            Interface "vnet0"
                error: "could not open network device vnet0 (No such device)"
        Port "ovsbr0"
            Interface "ovsbr0"
                type: internal
        Port "bond0"
            Interface "bond0"
    ovs_version: "2.5.1"

I can kind of replicate this if I stop the openvswitch service, shut down the VMs and then start openvswitch again. Has anybody else seen this? If I start the VMs back up after this point the ovs ports are overwritten with non-stale ones, but I'd like to fix the actual issue here. Libvirt also segfaults when this problem happens during the reboot.

I'd like to say its as easy as modifying my systemd files to make sure the order is correct, but unfortunately openvswitch ships with init scripts for CentOS still, so the systemd files are autogenerated and I can't override the "After" parameter with a drop-in or anything (at least, it hasn't worked for me).

Anything, even an idea of something new to try would be great! Thanks in advance!

user165222
  • 125
  • 3
  • 9
  • This is an opensource project, if you can fix the problem with a properly written systemd unit, you can submit the fix to the project for inclusion, either to OVS directly, or to the folks who maintain it in Fedora (from which stuff gets backported onto RHEL/CentOS) – dyasny Feb 21 '17 at 01:52
  • Yeah, I suppose if that's the only option then I'll do that... systemd is not really a strength of mine yet. I was really hoping that there was some way to use a systemd drop-in to modify a dependency for an autogenerated systemd file instead of writing an entirely new and non-stock one. I guess maybe that should have been my question instead of talking about openvswitch... – user165222 Feb 21 '17 at 14:59

0 Answers0