Bug 1870552
| Summary: | net-update can not work with the split daemon virtqemud | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | yalzhang <yalzhang> |
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
| Status: | CLOSED ERRATA | QA Contact: | Yanqiu Zhang <yanqzhan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | --- | CC: | jdenemar, jsuchane, lmen, mprivozn, virt-maint, yafu |
| Target Milestone: | rc | Keywords: | Triaged, Upstream |
| Target Release: | 8.3 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-7.3.0-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-11-16 07:50:50 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: | 7.2.0 |
| Embargoed: | |||
Patches posted upstream: https://listman.redhat.com/archives/libvir-list/2021-March/msg00052.html Merged upstream: b0f78d626a lib: Fix calling of virNetworkUpdate() driver callback 94741bc53e network: Implement virConnectSupportsFeature() v7.1.0-324-gb0f78d626a One patch missed VZ driver: ae1201fab4 vz: Add case for VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER v7.1.0-325-gae1201fab4 Verified this bug on:
hostA:
libvirt-daemon-7.4.0-1.module+el8.5.0+11218+83343022.x86_64
libvirt-client-7.4.0-1.module+el8.5.0+11218+83343022.x86_64
qemu-kvm-6.0.0-18.module+el8.5.0+11243+5269aaa1.x86_64
hostB:
libvirt-client-7.0.0-13.module+el8.4.0+10604+5608c2b4.x86_64
libvirt-daemon-7.0.0-13.module+el8.4.0+10604+5608c2b4.x86_64
qemu-kvm-5.2.0-15.module+el8.4.0+10650+50781ca0.x86_64
Steps:
Enable split daemon mode on hostA:
[root@hostA ~]# systemctl stop libvirtd.service
Warning: Stopping libvirtd.service, but it can still be activated by:
libvirtd-admin.socket
libvirtd.socket
libvirtd-ro.socket
[root@hostA ~]# systemctl stop libvirtd{,-ro,-admin,-tcp,-tls}.socket
[root@hostA ~]# for drv in qemu network nodedev nwfilter secret storage proxy; do systemctl stop virt${drv}d{,-ro,-admin}.socket; done
[root@hostA ~]# systemctl start virtqemud
[root@hostA ~]# systemctl start virtnetworkd
Scenario 1: New client and daemon
[root@hostA ~]# virsh -c qemu:///system net-dumpxml default
<network>
<name>default</name>
<uuid>68e87ba7-d95a-417f-b1a2-ef978eb7d1cd</uuid>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:36:f2:27'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
</network>
[root@hostA ~]# virsh -c qemu:///system net-update default add dns-txt '<txt name="example" value="example value"/>'
Updated network default live state
[root@hostA ~]# virsh -c qemu:///system net-dumpxml default
<network>
<name>default</name>
<uuid>68e87ba7-d95a-417f-b1a2-ef978eb7d1cd</uuid>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:36:f2:27'/>
<dns>
**<txt name='example' value='example value'/>**
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
</network>
Scenario 2: Newer client talking to older daemon
[root@hostA ~]# virsh -c qemu+ssh://hostB/system net-update default add dns-txt '<txt name="example" value="example value"/>'
Updated network default live state
[root@hostA ~]# virsh -c qemu+ssh://hostB/system net-dumpxml default|grep txt -1
<dns>
<txt name='example' value='example value'/>
</dns>
Scenaro3: Older client talking to newer daemon
[root@hostB ~]# virsh -c qemu+ssh://hostA/system net-update default add dns-txt '<txt name="example" value="example value"/>'
error: Failed to update network default
error: Operation not supported: can't update 'ip' section of network 'default'
Same behaviors with 'virsh -c network'.
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 (virt:av 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-2021:4684 |
Description of problem: net-update can not work with the split daemon virtqemud Version-Release number of selected component (if applicable): # rpm -q libvirt qemu-kvm libvirt-6.6.0-2.module+el8.3.0+7567+dc41c0a9.x86_64 qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901.x86_64 How reproducible: 100% Steps to Reproduce: 1. enable split daemon #systemctl stop libvirtd.service #systemctl stop libvirtd{,-ro,-admin,-tcp,-tls}.socket #for drv in qemu network nodedev nwfilter secret storage proxy; do systemctl stop virt${drv}d{,-ro,-admin}.socket; done # systemctl start virtqemud # systemctl start virtnetworkd 2. prepare a network as below: # virsh -c qemu:///system net-dumpxml net-1 <network> <name>net-1</name> <uuid>d7f1e011-6347-5c14-1941-46d7ff1b5e57</uuid> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='net-test' stp='on' delay='0'/> <mac address='52:54:00:e7:56:e9'/> <ip address='192.168.200.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.200.2' end='192.168.200.254'/> </dhcp> </ip> </network> 3. Execute the net-update command via the virtqemud: # virsh -c qemu:///system net-update net-1 add dns-txt '<txt name="example" value="example value"/>' error: Failed to update network net-1 error: Operation not supported: can't update 'ip' section of network 'net-1' 4. Execute the same net-update command via the virtnetworkd, it succeed: # virsh -c network:///system net-update net-1 add dns-txt '<txt name="example" value="example value"/>' Updated network net-1 live state # virsh -c qemu:///system net-dumpxml net-1 <network> <name>net-1</name> <uuid>d7f1e011-6347-5c14-1941-46d7ff1b5e57</uuid> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='net-test' stp='on' delay='0'/> <mac address='52:54:00:e7:56:e9'/> <dns> <txt name='example' value='example value'/> </dns> <ip address='192.168.200.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.200.2' end='192.168.200.254'/> </dhcp> </ip> </network> Actual results: in step 3, the net-update command fail with weird error message Expected results: In step 3, when I connected to virtqemud and issue a "net-update" command it should get auto-forwarded to the virtnetworkd, and it should succeed with the command just like in step 4 Additional info: