RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2024541 - libguestfs should add libvirt-daemon-driver-storage as dependency package on rhel9
Summary: libguestfs should add libvirt-daemon-driver-storage as dependency package on...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libguestfs
Version: 9.0
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-18 10:04 UTC by mxie@redhat.com
Modified: 2021-11-22 16:40 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-22 16:40:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-103131 0 None None None 2021-11-18 10:08:59 UTC

Description mxie@redhat.com 2021-11-18 10:04:00 UTC
Description of problem:
libguestfs should add  libvirt-daemon-driver-storage as dependency package on rhel9

Version-Release number of selected component (if applicable):
virt-v2v-1.45.3-3.el9.x86_64
libguestfs-1.46.0-4.el9.x86_64
redhat-release-9.0-2.9.el9.x86_64
systemd-249-4.el9.x86_64
libvirt-libs-7.9.0-1.el9.x86_64
qemu-img-6.1.0-6.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
Background:. since rhel9.0(redhat-release-9.0-2.8.el9) and libvirt-7.7.0, the default libvirt mode is modular daemon.Below are some points for libvirt modular daemon:

1.First hypervisor driver: qemu
2.Secondary drivers: network, nwfilter, nodedev,storage,secret,interface
3.All the secondary driver can connect via qemu driver
4.Each driver will be serviced by its own sub-daemon
5.Each sub-daemon has its own config file and socket file
6.Only virtqemud daemon is running after installing related libvirt packages and OS rebooting



1.Install virt-v2v on rhel9 server whose OS is fresh installed
#yum install virt-v2v -y

2.Below libvirt and qemu package will be installed during virt-v2v installation.
# rpm -qa |grep libvirt
libvirt-libs-7.9.0-1.el9.x86_64
libvirt-client-7.9.0-1.el9.x86_64
libvirt-daemon-7.9.0-1.el9.x86_64
libvirt-daemon-driver-network-7.9.0-1.el9.x86_64
libvirt-daemon-config-network-7.9.0-1.el9.x86_64
libvirt-daemon-driver-qemu-7.9.0-1.el9.x86_64
libvirt-daemon-driver-secret-7.9.0-1.el9.x86_64
libvirt-daemon-driver-storage-core-7.9.0-1.el9.x86_64

# rpm -qa |grep qemu
qemu-guest-agent-6.1.0-6.el9.x86_64
qemu-img-6.1.0-6.el9.x86_64
libvirt-daemon-driver-qemu-7.9.0-1.el9.x86_64
ipxe-roms-qemu-20200823-7.git4bd064de.el9.noarch
qemu-kvm-common-6.1.0-6.el9.x86_64
qemu-kvm-core-6.1.0-6.el9.x86_64

3.Reboot OS, then virtqemud service will start
# systemctl status virtqemud
● virtqemud.service - Virtualization qemu daemon
     Loaded: loaded (/usr/lib/systemd/system/virtqemud.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-11-17 22:10:39 EST; 39s ago
TriggeredBy: ● virtqemud.socket
             ● virtqemud-ro.socket
             ● virtqemud-admin.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
   Main PID: 1609 (virtqemud)
      Tasks: 18 (limit: 32768)
     Memory: 13.8M
        CPU: 70ms
     CGroup: /system.slice/virtqemud.service
             └─1609 /usr/sbin/virtqemud --timeout 120


4. Convert a guest from VMware to local libvirt by v2v, can see v2v conversion is failed because failed to connect socket to '/var/run/libvirt/virtstoraged-sock
#  virt-v2v -ic vpx://vsphere.local%5cAdministrator.198.169/data/10.73.199.217/?no_verify=1  -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -ip /home/passwd esx7.0-win11-x86_64
[   0.1] Opening the source -i libvirt -ic vpx://vsphere.local%5cAdministrator.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win11-x86_64 -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
[   2.2] Creating an overlay to protect the source from being modified
[   3.3] Opening the overlay
[  10.5] Inspecting the overlay
[  15.5] Checking for sufficient free disk space in the guest
[  15.5] Converting Windows 10 Enterprise to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  21.8] Mapping filesystem data to avoid copying unused and blank areas
[  24.1] Closing the overlay
[  24.4] Assigning disks to buses
[  24.4] Checking if the guest needs BIOS or UEFI to boot
[  24.4] Initializing the target -o libvirt -os default
virt-v2v: error: exception: libvirt: VIR_ERR_SYSTEM_ERROR: VIR_FROM_RPC:
Failed to connect socket to '/var/run/libvirt/virtstoraged-sock': No such
file or directory

If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:

  virt-v2v -v -x [...]


5.Install libvirt-daemon-driver-storage for starting virtstoraged socket
#yum install libvirt-daemon-driver-storage -y
....
====================================================================================================================================
 Package                                           Architecture       Version                     Repository                   Size
====================================================================================================================================
Installing:
 libvirt-daemon-driver-storage                     x86_64             7.9.0-1.el9                 libvirt_ci                   13 k
Installing dependencies:
 boost-iostreams                                   x86_64             1.75.0-6.el9                rhel9-appstream              40 k
 boost-system                                      x86_64             1.75.0-6.el9                rhel9-appstream              16 k
 boost-thread                                      x86_64             1.75.0-6.el9                rhel9-appstream              58 k
 librados2                                         x86_64             2:16.2.4-5.el9              libvirt_ci                  3.4 M
 librbd1                                           x86_64             2:16.2.4-5.el9              libvirt_ci                  3.0 M
 libvirt-daemon-driver-storage-disk                x86_64             7.9.0-1.el9                 libvirt_ci                   24 k
 libvirt-daemon-driver-storage-iscsi               x86_64             7.9.0-1.el9                 libvirt_ci                   21 k
 libvirt-daemon-driver-storage-logical             x86_64             7.9.0-1.el9                 libvirt_ci                   25 k
 libvirt-daemon-driver-storage-mpath               x86_64             7.9.0-1.el9                 libvirt_ci                   18 k
 libvirt-daemon-driver-storage-rbd                 x86_64             7.9.0-1.el9                 libvirt_ci                   29 k
 libvirt-daemon-driver-storage-scsi                x86_64             7.9.0-1.el9                 libvirt_ci                   20 k

Transaction Summary
====================================================================================================================================
Install  12 Packages
.....

6.Need to reboot OS to start virtstoraged socket or start virtstoraged socket manually,  then convert the guest from VMware to local libvirt by v2v again,  found error "Failed to connect socket to '/var/run/libvirt/virtstoraged-sock" has gone

# systemctl status virtstoraged.socket
● virtstoraged.socket - Libvirt storage local socket
     Loaded: loaded (/usr/lib/systemd/system/virtstoraged.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Wed 2021-11-17 22:37:50 EST; 4min 21s ago
   Triggers: ● virtstoraged.service
     Listen: /run/libvirt/virtstoraged-sock (Stream)
     CGroup: /system.slice/virtstoraged.socket


#  virt-v2v -ic vpx://vsphere.local%5cAdministrator.198.169/data/10.73.199.217/?no_verify=1  -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -ip /home/passwd esx7.0-win11-x86_64
[   0.1] Opening the source -i libvirt -ic vpx://vsphere.local%5cAdministrator.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win11-x86_64 -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
[   2.8] Creating an overlay to protect the source from being modified
[   4.0] Opening the overlay
[  11.3] Inspecting the overlay
[  16.1] Checking for sufficient free disk space in the guest
[  16.1] Converting Windows 10 Enterprise to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  21.6] Mapping filesystem data to avoid copying unused and blank areas
[  23.5] Closing the overlay
[  23.8] Assigning disks to buses
[  23.8] Checking if the guest needs BIOS or UEFI to boot
[  23.8] Initializing the target -o libvirt -os default
virt-v2v: error: cannot find libvirt pool ‘default’: Storage pool not
found: no storage pool with matching name 'default'

Use ‘virsh pool-list --all’ to list all available pools, and ‘virsh
pool-dumpxml <pool>’ to display details about a particular pool.

To set the pool which virt-v2v uses, add the ‘-os <pool>’ option.

If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:


Actual results:
Can't start virtstoraged socket without installing libvirt-daemon-driver-storage* packages, and v2v needs virtstoraged socket is running during conversion, so
v2v/libguestfs should add libvirt-daemon-driver-storage  as dependency package

Expected results:
As above description

Additional info:

Comment 1 YongkuiGuo 2021-11-19 02:52:23 UTC
Hi mxie,

Seems virtstoraged is provided by libvirt-daemon-driver-storage-core package not libvirt-daemon-driver-storage. I can start virtstoraged without libvirt-daemon-driver-storage.

On rhel9 host:
# systemctl status virtstoraged.socket
● virtstoraged.socket - Libvirt storage local socket
     Loaded: loaded (/usr/lib/systemd/system/virtstoraged.socket; disabled; vendor preset: enabled)
     Active: active (listening) since Thu 2021-11-18 07:46:54 EST; 14h ago
   Triggers: ● virtstoraged.service
     Listen: /run/libvirt/virtstoraged-sock (Stream)
     CGroup: /system.slice/virtstoraged.socket

Nov 18 07:46:54 dell-per740-37.lab.eng.pek2.redhat.com systemd[1]: Listening on Libvirt storage local socket.

# rpm -q libvirt-daemon-driver-storage
package libvirt-daemon-driver-storage is not installed

# yum provides virtstoraged
...
Last metadata expiration check: 2:59:40 ago on Thu 18 Nov 2021 06:48:37 PM EST.
libvirt-daemon-driver-storage-core-7.9.0-1.el9.x86_64 : Storage driver plugin including base backends for the libvirtd daemon
Repo        : @System
Matched from:
Filename    : /usr/sbin/virtstoraged

# virt-v2v -ic vpx://vsphere.local%5cAdministrator.198.169/data/10.73.199.217/?no_verify=1  -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -ip /home/passwd esx7.0-win11-x86_64
[   0.0] Opening the source -i libvirt -ic vpx://vsphere.local%5cAdministrator.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win11-x86_64 -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
[   1.8] Creating an overlay to protect the source from being modified
[   3.0] Opening the overlay
[   8.9] Inspecting the overlay
[  14.4] Checking for sufficient free disk space in the guest
[  14.4] Converting Windows 10 Enterprise to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 
x86_64).  virt-v2v looks for this driver in 
/usr/share/virtio-win/virtio-win.iso

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  22.8] Mapping filesystem data to avoid copying unused and blank areas
[  24.3] Closing the overlay
[  24.6] Assigning disks to buses
[  24.6] Checking if the guest needs BIOS or UEFI to boot
[  24.6] Initializing the target -o libvirt -os default
[  24.7] Copying disk 1/1 to /var/lib/libvirt/images/esx7.0-win11-x86_64-sda (raw)
    (100.00/100%)
[ 320.0] Creating output metadata
[ 320.1] Finishing off

Comment 2 mxie@redhat.com 2021-11-19 16:00:58 UTC
(In reply to YongkuiGuo from comment #1)
> Hi mxie,
> 
> Seems virtstoraged is provided by libvirt-daemon-driver-storage-core package
> not libvirt-daemon-driver-storage. I can start virtstoraged without
> libvirt-daemon-driver-storage.

The default libvirt mode is modular daemon since redhat-release-9.0-2.8.el9 and libvirt-7.7.0, besides, the new feature "libvirt modular daemon" also has relationship with systemd version, could you please check you redhat-release and systemd version of your rhel9 server, it's better to reinstall the OS with latest rhel9 to check. Thanks!

Comment 3 mxie@redhat.com 2021-11-19 16:44:38 UTC
(In reply to mxie from comment #2)
> (In reply to YongkuiGuo from comment #1)
> > Hi mxie,
> > 
> > Seems virtstoraged is provided by libvirt-daemon-driver-storage-core package
> > not libvirt-daemon-driver-storage. I can start virtstoraged without
> > libvirt-daemon-driver-storage.

I found the difference between installing libvirt-daemon-driver-storage and not installing libvirt-daemon-driver-storage:

1.If libvirt-daemon-driver-storage related packages are installed, virtstoraged.socket can be started automatically after rebooting OS, If libvirt-daemon-driver-storage related packages are NOT installed, virtstoraged.socket can't be started automatically after rebooting OS, need to start virtstoraged.socket manually.

2. Uninstalling libvirt-daemon-driver-storage will influence virtstoraged.socket status, virtstoraged.socket status will be inactive after uninstalling libvirt-daemon-driver-storage

# systemctl status virtstoraged.socket
● virtstoraged.socket - Libvirt storage local socket
     Loaded: loaded (/usr/lib/systemd/system/virtstoraged.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Sat 2021-11-20 00:28:22 CST; 7min ago
   Triggers: ● virtstoraged.service
     Listen: /run/libvirt/virtstoraged-sock (Stream)
     CGroup: /system.slice/virtstoraged.socket

# yum remove libvirt-daemon-driver-storage -y
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Dependencies resolved.
====================================================================================================================================
 Package                                           Architecture       Version                    Repository                    Size
====================================================================================================================================
Removing:
 libvirt-daemon-driver-storage                     x86_64             7.9.0-1.el9                @libvirt_ci                    0  
Removing unused dependencies:
 boost-iostreams                                   x86_64             1.75.0-6.el9               @rhel9-appstream              83 k
 boost-system                                      x86_64             1.75.0-6.el9               @rhel9-appstream              16 k
 boost-thread                                      x86_64             1.75.0-6.el9               @rhel9-appstream             121 k
 librados2                                         x86_64             2:16.2.4-5.el9             @libvirt_ci                   12 M
 librbd1                                           x86_64             2:16.2.4-5.el9             @libvirt_ci                   10 M
 libvirt-daemon-driver-storage-disk                x86_64             7.9.0-1.el9                @libvirt_ci                   32 k
 libvirt-daemon-driver-storage-iscsi               x86_64             7.9.0-1.el9                @libvirt_ci                   24 k
 libvirt-daemon-driver-storage-logical             x86_64             7.9.0-1.el9                @libvirt_ci                   32 k
 libvirt-daemon-driver-storage-mpath               x86_64             7.9.0-1.el9                @libvirt_ci                   16 k
 libvirt-daemon-driver-storage-rbd                 x86_64             7.9.0-1.el9                @libvirt_ci                   44 k
 libvirt-daemon-driver-storage-scsi                x86_64             7.9.0-1.el9                @libvirt_ci                   24 k


# systemctl status virtstoraged.socket
○ virtstoraged.socket - Libvirt storage local socket
     Loaded: loaded (/usr/lib/systemd/system/virtstoraged.socket; enabled; vendor preset: enabled)
     Active: inactive (dead) since Sat 2021-11-20 00:40:31 CST; 49s ago
   Triggers: ● virtstoraged.service
     Listen: /run/libvirt/virtstoraged-sock (Stream)

3.But Yongkui are right, virtstoraged.socket can be started manually without installing libvirt-daemon-driver-storage, yafu, could you please help to confirm if  virtstoraged socket/service needs libvirt-daemon-driver-storage-* packages?

Comment 4 yafu 2021-11-22 01:47:13 UTC
(In reply to mxie from comment #3)
> (In reply to mxie from comment #2)
> > (In reply to YongkuiGuo from comment #1)
> > > Hi mxie,
> > > 
> > > Seems virtstoraged is provided by libvirt-daemon-driver-storage-core package
> > > not libvirt-daemon-driver-storage. I can start virtstoraged without
> > > libvirt-daemon-driver-storage.
> 
> I found the difference between installing libvirt-daemon-driver-storage and
> not installing libvirt-daemon-driver-storage:
> 
> 1.If libvirt-daemon-driver-storage related packages are installed,
> virtstoraged.socket can be started automatically after rebooting OS, If
> libvirt-daemon-driver-storage related packages are NOT installed,
> virtstoraged.socket can't be started automatically after rebooting OS, need
> to start virtstoraged.socket manually.
> 
> 2. Uninstalling libvirt-daemon-driver-storage will influence
> virtstoraged.socket status, virtstoraged.socket status will be inactive
> after uninstalling libvirt-daemon-driver-storage
> 
> # systemctl status virtstoraged.socket
> ● virtstoraged.socket - Libvirt storage local socket
>      Loaded: loaded (/usr/lib/systemd/system/virtstoraged.socket; enabled;
> vendor preset: enabled)
>      Active: active (listening) since Sat 2021-11-20 00:28:22 CST; 7min ago
>    Triggers: ● virtstoraged.service
>      Listen: /run/libvirt/virtstoraged-sock (Stream)
>      CGroup: /system.slice/virtstoraged.socket
> 
> # yum remove libvirt-daemon-driver-storage -y
> Updating Subscription Management repositories.
> Unable to read consumer identity
> 
> This system is not registered with an entitlement server. You can use
> subscription-manager to register.
> 
> Dependencies resolved.
> =============================================================================
> =======================================================
>  Package                                           Architecture      
> Version                    Repository                    Size
> =============================================================================
> =======================================================
> Removing:
>  libvirt-daemon-driver-storage                     x86_64            
> 7.9.0-1.el9                @libvirt_ci                    0  
> Removing unused dependencies:
>  boost-iostreams                                   x86_64            
> 1.75.0-6.el9               @rhel9-appstream              83 k
>  boost-system                                      x86_64            
> 1.75.0-6.el9               @rhel9-appstream              16 k
>  boost-thread                                      x86_64            
> 1.75.0-6.el9               @rhel9-appstream             121 k
>  librados2                                         x86_64            
> 2:16.2.4-5.el9             @libvirt_ci                   12 M
>  librbd1                                           x86_64            
> 2:16.2.4-5.el9             @libvirt_ci                   10 M
>  libvirt-daemon-driver-storage-disk                x86_64            
> 7.9.0-1.el9                @libvirt_ci                   32 k
>  libvirt-daemon-driver-storage-iscsi               x86_64            
> 7.9.0-1.el9                @libvirt_ci                   24 k
>  libvirt-daemon-driver-storage-logical             x86_64            
> 7.9.0-1.el9                @libvirt_ci                   32 k
>  libvirt-daemon-driver-storage-mpath               x86_64            
> 7.9.0-1.el9                @libvirt_ci                   16 k
>  libvirt-daemon-driver-storage-rbd                 x86_64            
> 7.9.0-1.el9                @libvirt_ci                   44 k
>  libvirt-daemon-driver-storage-scsi                x86_64            
> 7.9.0-1.el9                @libvirt_ci                   24 k
> 
> 
> # systemctl status virtstoraged.socket
> ○ virtstoraged.socket - Libvirt storage local socket
>      Loaded: loaded (/usr/lib/systemd/system/virtstoraged.socket; enabled;
> vendor preset: enabled)
>      Active: inactive (dead) since Sat 2021-11-20 00:40:31 CST; 49s ago
>    Triggers: ● virtstoraged.service
>      Listen: /run/libvirt/virtstoraged-sock (Stream)
> 
> 3.But Yongkui are right, virtstoraged.socket can be started manually without
> installing libvirt-daemon-driver-storage, yafu, could you please help to
> confirm if  virtstoraged socket/service needs
> libvirt-daemon-driver-storage-* packages?

Virtsotraged.scoket just needs libvirt-daemon-driver-storage-core and other libvirt-daemon-drivers-storage* pkgs are needed if using specified backend storage.

Comment 5 mxie@redhat.com 2021-11-22 02:08:57 UTC
> Virtsotraged.scoket just needs libvirt-daemon-driver-storage-core and other
> libvirt-daemon-drivers-storage* pkgs are needed if using specified backend
> storage.

Hi Fuyan,

   Thanks for your reply, could you please help to answer below two questions which are described in step1 and step2 of comment3?

1. Why can't virtstoraged.socket be started automatically after rebooting OS if libvirt-daemon-driver-storage related packages are NOT installed?

2. Why does virtstoraged.socket become inactive after uninstalling libvirt-daemon-driver-storage-* packages?

Comment 6 yafu 2021-11-22 03:32:38 UTC
(In reply to mxie from comment #5)
> > Virtsotraged.scoket just needs libvirt-daemon-driver-storage-core and other
> > libvirt-daemon-drivers-storage* pkgs are needed if using specified backend
> > storage.
> 
> Hi Fuyan,
> 
>    Thanks for your reply, could you please help to answer below two
> questions which are described in step1 and step2 of comment3?
> 
> 1. Why can't virtstoraged.socket be started automatically after rebooting OS
> if libvirt-daemon-driver-storage related packages are NOT installed?
> 
> 2. Why does virtstoraged.socket become inactive after uninstalling
> libvirt-daemon-driver-storage-* packages?

These 2 questions are the same root cause, virtstoraged.socket is 'disabled' by default if only installing libvirt-daemon-driver-storage-core pkg, so rebooting os will not start virtstorged.socket.
If installing all libvirt-daemon-driver-storage-* pkgs, virtstorged.socket is 'enabled' by default. 

@Daniel, Would you help to check whether it is the expected result please? Thanks.

Comment 7 Daniel Berrangé 2021-11-22 09:14:33 UTC
(In reply to mxie from comment #3)
> (In reply to mxie from comment #2)

> 1.If libvirt-daemon-driver-storage related packages are installed,
> virtstoraged.socket can be started automatically after rebooting OS, If
> libvirt-daemon-driver-storage related packages are NOT installed,
> virtstoraged.socket can't be started automatically after rebooting OS, need
> to start virtstoraged.socket manually.

The virstoraged daemon and systemd units are provided by 'libvirt-daemon-driver-storage-core' RPM.

If that package is installed, then the redhat-release package systemd presets will cause it to be automatically started on boot.

The 'libvirt-daemon-driver-storage' RPM is an empty package that merely has dependancies on 'libvirt-daemon-driver-storage-core' and the extra storage pool drivers. It shouldn't matter whether this is installed or not, only the -core package matters for daemon startup

 
> 2. Uninstalling libvirt-daemon-driver-storage will influence
> virtstoraged.socket status, virtstoraged.socket status will be inactive
> after uninstalling libvirt-daemon-driver-storage
> 
> # systemctl status virtstoraged.socket
> ● virtstoraged.socket - Libvirt storage local socket
>      Loaded: loaded (/usr/lib/systemd/system/virtstoraged.socket; enabled;
> vendor preset: enabled)
>      Active: active (listening) since Sat 2021-11-20 00:28:22 CST; 7min ago
>    Triggers: ● virtstoraged.service
>      Listen: /run/libvirt/virtstoraged-sock (Stream)
>      CGroup: /system.slice/virtstoraged.socket
> 
> # yum remove libvirt-daemon-driver-storage -y
> Updating Subscription Management repositories.
> Unable to read consumer identity
> 
> This system is not registered with an entitlement server. You can use
> subscription-manager to register.
> 
> Dependencies resolved.
> =============================================================================
> =======================================================
>  Package                                           Architecture      
> Version                    Repository                    Size
> =============================================================================
> =======================================================
> Removing:
>  libvirt-daemon-driver-storage                     x86_64            
> 7.9.0-1.el9                @libvirt_ci                    0  
> Removing unused dependencies:
>  boost-iostreams                                   x86_64            
> 1.75.0-6.el9               @rhel9-appstream              83 k
>  boost-system                                      x86_64            
> 1.75.0-6.el9               @rhel9-appstream              16 k
>  boost-thread                                      x86_64            
> 1.75.0-6.el9               @rhel9-appstream             121 k
>  librados2                                         x86_64            
> 2:16.2.4-5.el9             @libvirt_ci                   12 M
>  librbd1                                           x86_64            
> 2:16.2.4-5.el9             @libvirt_ci                   10 M
>  libvirt-daemon-driver-storage-disk                x86_64            
> 7.9.0-1.el9                @libvirt_ci                   32 k
>  libvirt-daemon-driver-storage-iscsi               x86_64            
> 7.9.0-1.el9                @libvirt_ci                   24 k
>  libvirt-daemon-driver-storage-logical             x86_64            
> 7.9.0-1.el9                @libvirt_ci                   32 k
>  libvirt-daemon-driver-storage-mpath               x86_64            
> 7.9.0-1.el9                @libvirt_ci                   16 k
>  libvirt-daemon-driver-storage-rbd                 x86_64            
> 7.9.0-1.el9                @libvirt_ci                   44 k
>  libvirt-daemon-driver-storage-scsi                x86_64            
> 7.9.0-1.el9                @libvirt_ci                   24 k

THis shouldn't make a difference to whether virtstoraged starts or not, as long as 'libvirt-daemon-driver-storage-core' remains installed.

> # systemctl status virtstoraged.socket
> ○ virtstoraged.socket - Libvirt storage local socket
>      Loaded: loaded (/usr/lib/systemd/system/virtstoraged.socket; enabled;
> vendor preset: enabled)
>      Active: inactive (dead) since Sat 2021-11-20 00:40:31 CST; 49s ago
>    Triggers: ● virtstoraged.service
>      Listen: /run/libvirt/virtstoraged-sock (Stream)
> 
> 3.But Yongkui are right, virtstoraged.socket can be started manually without
> installing libvirt-daemon-driver-storage, yafu, could you please help to
> confirm if  virtstoraged socket/service needs
> libvirt-daemon-driver-storage-* packages?

Again, what matters is whether 'libvirt-daemon-driver-storage-core' is installed.

Comment 8 mxie@redhat.com 2021-11-22 11:35:05 UTC
> The virstoraged daemon and systemd units are provided by
> 'libvirt-daemon-driver-storage-core' RPM.
> 
> If that package is installed, then the redhat-release package systemd
> presets will cause it to be automatically started on boot.
> 
> The 'libvirt-daemon-driver-storage' RPM is an empty package that merely has
> dependancies on 'libvirt-daemon-driver-storage-core' and the extra storage
> pool drivers. It shouldn't matter whether this is installed or not, only the
> -core package matters for daemon startup

So "virtstoraged.socket is 'disabled' by default if only libvirt-daemon-driver-storage-core is installed", it is a bug, right?

Comment 9 Daniel Berrangé 2021-11-22 11:42:37 UTC
(In reply to mxie from comment #8)
> So "virtstoraged.socket is 'disabled' by default if only
> libvirt-daemon-driver-storage-core is installed", it is a bug, right?

Yes, once libvirt-daemon-driver-storage-core is installed, virtstoraged.socket should start automatically on the *next* boot of the machine.

NB, this assumes you installed lbivirt-daemon-driver-storage-core /after/  redhat-release >= 9.0-2.9 is installed

Comment 10 Richard W.M. Jones 2021-11-22 14:21:28 UTC
mxie: Given what Dan said above, is this a duplicate of bug 2018358 (already fixed)?

Comment 11 mxie@redhat.com 2021-11-22 16:40:06 UTC
(In reply to Richard W.M. Jones from comment #10)
> mxie: Given what Dan said above, is this a duplicate of bug 2018358 (already
> fixed)?

Not a duplicate, but the bug can be closed as NOTABUG, use bug2025644 to track the problem of comment3


Note You need to log in before you can comment on or make changes to this bug.