Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2227980

Summary: virtnetworkd.service is not triggered by socket after first deactivation
Product: Red Hat Enterprise Linux 9 Reporter: yalzhang <yalzhang>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
libvirt sub component: Networking QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED DUPLICATE Docs Contact:
Severity: medium    
Priority: unspecified CC: chwen, lvivier, pkrempa, smitterl, virt-maint, yafu
Version: 9.3Keywords: Regression, TestOnly
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-01 07:00:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description yalzhang@redhat.com 2023-08-01 03:12:17 UTC
This is the same issue with the one describled in upstream bug 2218987. Refer to bug 2218987 for more detail explainations.
This may be a systemd bug according to bug 2218987, will test again with new systemd package.

Description of problem:
"virsh net-list" command will hang forever

Version-Release number of selected component (if applicable):
libvirt-9.5.0-4.el9.x86_64
systemd-252-16.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Run "virsh net-list" command
# virsh net-list --all
2. If the above command succeeds and prints output within a couple of seconds, leave the system alone, and do not run any virsh commands. 
3. Wait for 2 minutes. 
4. Re-run command:
# virsh net-list --all
The command will hang and needs to be terminated with Ctrl+C.

check the virtnetworkd service is running:
# systemctl status virtnetworkd
● virtnetworkd.service - Virtualization network daemon
     Loaded: loaded (/usr/lib/systemd/system/virtnetworkd.service; disabled; preset: disabled)
     Active: active (running) since Mon 2023-07-31 22:54:34 EDT; 3min 33s ago
TriggeredBy: ● virtnetworkd.socket
             ● virtnetworkd-admin.socket
             ● virtnetworkd-ro.socket
.....

Actual Results: 
Command hangs indefinitely and needs to be terminated with Ctrl+C.

Expected results:
Virsh command should not hang

Additional info:

Comment 1 Peter Krempa 2023-08-01 07:00:14 UTC

*** This bug has been marked as a duplicate of bug 2225667 ***

Comment 2 chunfu wen 2023-08-04 09:36:18 UTC
observe similar situation in s390x platform, where virsh list is hanging 
Steps follow as:
1) Execute automation case:/usr/local/bin/avocado --show=test,app run --test-runner=runner --vt-type libvirt --vt-machine-type s390-virtio --vt-connect-uri qemu:///system virsh.console.normal_test.non_acl.valid_domname

2)Find that case is hanging in :Starting vm 'avocado-vt-vm1'

3) Open another terminal ssh to s390x host, and execute : virsh list --all
4) Finding that: virsh list --all is hanging 
5) After a few minutes, execute : virsh list --all  again ,finding failed to connect to the hypervisor and virtqemud service crashed

[root@s390x-kvm-virtqez2 ~]# virsh list --all
error: failed to connect to the hypervisor
error: Operation not supported: Cannot use direct socket mode if no URI is set

[root@s390x-kvm-virtqez2 ~]# systemctl status virtqemud
× virtqemud.service - Virtualization qemu daemon
     Loaded: loaded (/usr/lib/systemd/system/virtqemud.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-08-04 05:23:29 EDT; 6min ago
   Duration: 27min 1.868s
TriggeredBy: ○ virtqemud-ro.socket
             ○ virtqemud-admin.socket
             ○ virtqemud.socket
       Docs: man:virtqemud(8)
             https://libvirt.org
   Main PID: 7638 (code=exited, status=1/FAILURE)
        CPU: 577ms

Comment 3 chunfu wen 2023-08-04 09:36:40 UTC
observe similar situation in s390x platform, where virsh list is hanging 
Steps follow as:
1) Execute automation case:/usr/local/bin/avocado --show=test,app run --test-runner=runner --vt-type libvirt --vt-machine-type s390-virtio --vt-connect-uri qemu:///system virsh.console.normal_test.non_acl.valid_domname

2)Find that case is hanging in :Starting vm 'avocado-vt-vm1'

3) Open another terminal ssh to s390x host, and execute : virsh list --all
4) Finding that: virsh list --all is hanging 
5) After a few minutes, execute : virsh list --all  again ,finding failed to connect to the hypervisor and virtqemud service crashed

[root@s390x-kvm-virtqez2 ~]# virsh list --all
error: failed to connect to the hypervisor
error: Operation not supported: Cannot use direct socket mode if no URI is set

[root@s390x-kvm-virtqez2 ~]# systemctl status virtqemud
× virtqemud.service - Virtualization qemu daemon
     Loaded: loaded (/usr/lib/systemd/system/virtqemud.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-08-04 05:23:29 EDT; 6min ago
   Duration: 27min 1.868s
TriggeredBy: ○ virtqemud-ro.socket
             ○ virtqemud-admin.socket
             ○ virtqemud.socket
       Docs: man:virtqemud(8)
             https://libvirt.org
   Main PID: 7638 (code=exited, status=1/FAILURE)
        CPU: 577ms