virt/libvirt/host.py: _test_connection is not reliable with modularized libvirtd services
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Description
===========
the virt/libvirt/
The modularized libvirt uses multiple daemons Like
...
virtnodedevd
virtnetworkd
virtsecretd
...
in case one of them is restarted the nova-compute still thinks the connection is working. However using particular module will fail when used later.
In the nova-compute service log we can see:
internal error: client socket is closed: libvirt.
Steps to reproduce
==================
1/ use openstack with modularized libvirtd as on CentOS Stream 9
2/ gracefully restart virtnodedevd.
$ systemctl restart virtnodedevd.
3/ check logs of openstack about connection issue (repeating one each 30s)
"internal error: client socket is closed: libvirt.
Expected result
===============
"_test_connection" function figures out the needed libvirt's module socket was closed and it will try to "open new connection".
Actual result
=============
Openstack Nova service is not able to use libvirt's service module if the module is restarted.
Environment
===========
CentOS Stream 9, Openstack Yoga
summary: |
virt/libvirt/host.py: _test_connection is not reliable with modularized - libvird services + libvirtd services |
Hello Jaroslav,
Maybe I miss something but I did not manage to reproduce the bug with the current master branch.
Looking at the _test_connection method there was no change in between master and Yoga.
Can you check if you can see the issue with the master branch ?
[stack@openstack devstack]$ sudo systemctl restart virtnodedevd. service service service - Virtualization nodedev daemon systemd/ system/ virtnodedevd. service; disabled; preset: disabled) admin.socket ro.socket /libvirt. org slice/virtnoded evd.service
└ ─180075 /usr/sbin/ virtnodedevd --timeout 120
[stack@openstack devstack]$ sudo systemctl status virtnodedevd.
● virtnodedevd.
Loaded: loaded (/usr/lib/
Active: active (running) since Tue 2023-05-09 12:02:37 CEST; 7s ago
TriggeredBy: ● virtnodedevd-
● virtnodedevd-
● virtnodedevd.socket
Docs: man:virtnodedevd(8)
https:/
Main PID: 180075 (virtnodedevd)
Tasks: 19 (limit: 48937)
Memory: 10.9M
CPU: 81ms
CGroup: /system.
May 09 12:02:37 openstack systemd[1]: Starting Virtualization nodedev daemon...
May 09 12:02:37 openstack systemd[1]: Started Virtualization nodedev daemon.
---> here I can't see anything in the compute logd.
[stack@openstack devstack]$ openstack server list ------- ------- ------- ------- ----+-- ----+-- ------+ ------- ------- ------- ------- ------- ------- ------- ------- -+----- ------- ------- ------- +------ --+ ------- ------- ------- ------- ----+-- ----+-- ------+ ------- ------- ------- ------- ------- ------- ------- ------- -+----- ------- ------- ------- +------ --+ 0dd3-428a- 8240-df54c5625c 37 | demo | ACTIVE | private=10.0.0.34, fd64:a592: 51c8:0: f816:3eff: fecb:25cc | N/A (booted from volume) | ds512M | ------- ------- ------- ------- ----+-- ----+-- ------+ ------- ------- ------- ------- ------- ------- ------- ------- -+----- ------- ------- ------- +------ --+ 0.5.2-x86_ 64-disk --flavor ds512M --network private --boot-from-volume 5 demo2 ------- ------- ------- ------- ---+--- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ---+--- ------- ------- ------- ------- ------- + AZ:availability _zone | | SRV-ATTR: host | None | SRV-ATTR: hypervisor_ hostname | None | SRV-ATTR: instance_ name | | STS:power_ state | NOSTATE | STS:task_ state | scheduling | USG:launched_ at | None | USG:terminated_ at | None ...
+------
| ID | Name | Status | Networks | Image | Flavor |
+------
| bb5e451c-
+------
[stack@openstack devstack]$ openstack server create --image cirros-
+------
| Field | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| OS-SRV-
| OS-SRV-