Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-80522

Allow libvirt to restart passt/vhost-user when the process is killed

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • qemu-kvm-9.1.0-15.el10_0.1
    • No
    • Moderate
    • ZStream, 0day
    • 1
    • rhel-sst-virtualization-networking
    • ssg_virtualization
    • 1
    • False
    • Hide

      None

      Show
      None
    • None
    • Virtio-Net Sprint 11 - Mar
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      We need to add CONNECT and DISCONNECT events needed by libvirt to restart passt if it is killed

      From RHEL-69455

      One thing that doesn't currently work is restarting passt if its process somehow is killed - this was done with some stuff added automatically to the qemu commandline + watching for an event with normal passt, and vhost-user has a "reconnect" option, but I think that will only cause qemu to try to reconnect, I don't know if it will send the event that libvirt needs in order to start a new passt instance.

      This is fixed by the following upstream commit:

      commit 02fd9f8aeeb184276b283ae2f404bc3acf1e7b7a
      Author: Laurent Vivier <lvivier@redhat.com>
      Date:   Mon Feb 17 10:25:50 2025 +0100
      
          net: vhost-user: add QAPI events to report connection state
          
          The netdev reports NETDEV_VHOST_USER_CONNECTED event when
          the chardev is connected, and NETDEV_VHOST_USER_DISCONNECTED
          when it is disconnected.
          
          The NETDEV_VHOST_USER_CONNECTED event includes the chardev id.
          
          This allows a system manager like libvirt to detect when the server
          fails.
          
          For instance with passt:
          
          { 'execute': 'qmp_capabilities' }
          { "return": { } }
          
          [killing passt here]
          
          { "timestamp": { "seconds": 1739538634, "microseconds": 920450 },
            "event": "NETDEV_VHOST_USER_DISCONNECTED",
            "data": { "netdev-id": "netdev0" } }
          
          [automatic reconnection with reconnect-ms]
          
          { "timestamp": { "seconds": 1739538638, "microseconds": 354181 },
            "event": "NETDEV_VHOST_USER_CONNECTED",
            "data": { "netdev-id": "netdev0", "chardev-id": "chr0" } }
          
          Tested-by: Stefano Brivio <sbrivio@redhat.com>
          Signed-off-by: Laurent Vivier <lvivier@redhat.com>
          Message-Id: <20250217092550.1172055-1-lvivier@redhat.com>
          Acked-by: Markus Armbruster <armbru@redhat.com>
          Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
          Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
      

              lvivier@redhat.com Laurent Vivier
              lvivier@redhat.com Laurent Vivier
              virt-maint virt-maint
              Lei Yang Lei Yang
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: