On Wed, Aug 14, 2019 at 12:03 AM Jonathon Jongsma <jjong...@redhat.com> wrote:
> When a host is rebooted, mediated devices disappear from sysfs.  mdevctl
> (https://github.com/mdevctl/mdevctl) is a utility for managing and
> persisting these devices. It maintains a registry of mediated devices
> and can start and stop them by UUID.
> when libvirt attempts to create a new mediated device object, we currently
> fail if the path does not exist in sysfs. This patch tries a little bit
> harder by using mdevctl to attempt to activate the device.  The approach
> is fairly naive -- it just calls 'mdevctl start -u $UUID' without
> checking whether this UUID is registered with mdevctl or not.
> See https://bugzilla.redhat.com/show_bug.cgi?id=1699274
> Signed-off-by: Jonathon Jongsma <jjong...@redhat.com>
> ---
> - an argument could be made that we should simply do nothing here. mdevctl 
> does
>   have support for automatically activating the mediated device when the 
> parent
>   device becomes available (via udev). So if the administrator set up the mdev
>   to start automatically, this patch should not even be necessary. That said, 
> I
>   think this patch could still be useful.
> - As I said above, the approach is pretty naive. I could have checked whether
>   the device was defined in mdevctl's registry and given a different error
>   message ("try registering this device with mdevctl") in that scenario. But
>   I chose to keep it simple.

So, I've noticed that mdevctl is not on Fedora yet, at least according
to: https://bugzilla.redhat.com/show_bug.cgi?id=1728381

In any case, would you mind to also update the spec file and add
something like: `Recommends: mdevctl`?

Recommends is a weak dependency. It shouldn't force mdevctl to be
installed, but suggests it to be installed.

Best Regards,
Fabiano Fidêncio

libvir-list mailing list

Reply via email to