Bug 2173584

Summary: [Machines] "No more available PCI slots" is shown when adding watchdog to a running vm
Product: Red Hat Enterprise Linux 9 Reporter: Xianghua Chen <xchen>
Component: cockpit-machinesAssignee: Nobody <nobody>
Status: CLOSED ERRATA QA Contact: Xianghua Chen <xchen>
Severity: high Docs Contact: Daniel Vozenilek <davozeni>
Priority: unspecified    
Version: 9.2CC: davozeni, kkoukiou, mmarusak, mpitt, pashah, phrdina, qzhang, wshi, ymao, yunyang
Target Milestone: rcKeywords: Triaged
Target Release: 9.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 290 Doc Type: Bug Fix
Doc Text:
.Hot plugging a Watchdog card to a virtual machine no longer fails Previously, if no PCI slots were available, adding a Watchdog card to a running virtual machine (VM) failed with the following error: ---- Failed to configure watchdog ERROR Error attempting device hotplug: internal error: No more available PCI slots ---- With this update, the problem has been fixed and adding a Watchdog card to a running VM now works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:24:46 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 Xianghua Chen 2023-02-27 10:15:53 UTC
Description of problem:
[Machines] "No more available PCI slots" is shown when adding watchdog to a running vm
 
Packages:
cockpit-machines-284-1.el9.noarch
cockpit-286-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-daemon-9.0.0-7.el9.x86_64
How reproducible:
100%

Steps:
1. Prepare a running VM (Cirros, Fedora, all ok)
2. Enter VM details page, Click "Add" after watchdog in Overview tab
3. On "Add watchdog device type" , choose "Reset", click Add
Failed to configure watchdog
ERROR Error attempting device hotplug: internal error: No more available PCI slots


There is a workaround for above issue, add "pcie-pci-bridge" controller to the xml:
# virsh edit $vm
<controller type='pci' index='17' model='pcie-to-pci-bridge'>
      <model name='pcie-pci-bridge'/>
 </controller>
Then shutdown the vm, run it again, then repeat step2-3, the watchdog can be attached now. 
Check the xml , you can see:
# virsh dumpxml cirros| grep -iA 1 watchdog
    <watchdog model='i6300esb' action='reset'>
      <alias name='watchdog0'/>
      <address type='pci' domain='0x0000' bus='0x0f' slot='0x01' function='0x0'/>
    </watchdog>

Actual results:
See step 3. 

Expected results:
It should attach successful in step 3 without any extra step working on the xml.


Additional info:
As this bug will absolutely encounterd by customer, please evaluate whether we should get excetpin+ for it, if not, we should at least mark this problem in release document and provide the workaround by editing xml, please also comment your opinion, thanks.

Comment 10 Martin Pitt 2023-05-17 06:57:17 UTC
Chen, thanks for pointing out! Done. (Meh, why is the automation so unreliable..)

Comment 14 Xianghua Chen 2023-05-22 03:43:24 UTC
Verified with Packages:
cockpit-machines-290-1.el9.noarch
cockpit-292-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-daemon-9.0.0-10.1.el9_2.x86_64

Steps:
1. Prepare a running VM (Cirros, Fedora, all ok)
2. Enter VM details page, Click "Add" after watchdog in Overview tab
3. On "Add watchdog device type" , choose "Reset", click Add

It's successfully added to the vm. So verified.

Comment 20 Xianghua Chen 2023-10-24 03:04:58 UTC
Hi Pashah, I think we can remove this known issue from RHEL8.9&RHEL9.3 release note now since they are fixed now. Thank you.

Comment 25 errata-xmlrpc 2023-11-07 08:24:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (cockpit-machines bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6336

Comment 27 Red Hat Bugzilla 2024-03-08 04:25:24 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days