-
Bug
-
Resolution: Done-Errata
-
Normal
-
CNV v4.20.0
-
Quality / Stability / Reliability
-
0.42
-
False
-
-
False
-
CNV v4.99.0.rhel9-2302
-
-
Moderate
-
None
Description of problem:
Currently, when hot-plugging an interface to a running guest VM, a `RestartRequired` condition is updated in the VM spec. This mostly affects the UI users, as the UI limits the ability to use the guest until this condition is filled, i.e. until the VM is restarted.
Version-Release number of selected component (if applicable):
OCP 4.19.0-ec.3 CNV v4.19.0 (brew.registry.redhat.io/rh-osbs/iib:935792)
How reproducible:
100%
Steps to Reproduce:
1.
Create a new namespace to work in.
You can apply the following ProjectRequest for that:
apiVersion: project.openshift.io/v1
kind: ProjectRequest
metadata:
name: l2-bridge-test-bridge-nic-hot-plug
2.
Create a linux-bridge on the cluster workers. This can be done by applying a NodeNetworkConfigurationPolicy like the following:
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
name: hot-plug-br-nncp
spec:
desiredState:
interfaces:
- bridge:
options:
stp:
enabled: false
port:
- name: enp9s0
ipv4:
auto-dns: true
dhcp: true
enabled: true
ipv6:
auto-dns: true
autoconf: false
dhcp: false
enabled: false
name: hot-plug-br
state: up
type: linux-bridge
nodeSelector:
node-role.kubernetes.io/worker: ""
3.
Create a NetworkAttachmentDefinition that connects to the linux-bridge:
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: hot-plug-br-nad
namespace: l2-bridge-test-bridge-nic-hot-plug
spec:
config: '{"name": "hot-plug-br", "plugins": [{"type": "bridge", "bridge": "hot-plug-br"}],
"cniVersion": "0.3.1"}'
4.
Create a simple fedora VM. You can use the attached vm-for-hot-plug.yaml, which is created without any secondary interface.
5.
Start the created VM (virtctl start hot-plug-test-vm).
6.
After the VM is up and running - hot-plug an interface to it (the interface is supposed to be backed by the bridge node interface you created, via the NAD).
This can be done by editing the *VM* (not VMI) spec and adding the following:
spec:
template:
spec:
domain:
devices:
interfaces:
- bridge: {}
name: hot-plug-iface
networks:
- multus:
networkName: hot-plug-br-nad
name: hot-plug-iface
7.
Check {.status.conditions} in the VM spec.
Actual results:
A `RestartRequired` condition was added:
{
"lastProbeTime": null,
"lastTransitionTime": "2025-03-19T16:02:37Z",
"message": "a non-live-updatable field was changed in the template spec",
"status": "True",
"type": "RestartRequired"
}
Expected results:
Restart is not required to complete the hot-plug, thus this condition shouldn't be there.
Additional info:
For QE: For verifying - you can run the *setup* steps of `test_vmi_spec_updated_with_hot_plugged_interface`, and check the conditions in the VM spec (not VMI).
- is cloned by
-
CNV-61357 Don't require guest VM restart after interface hot-plug
-
- Closed
-
-
CNV-61358 Don't require guest VM restart after interface hot-plug
-
- Closed
-
-
CNV-61373 Don't require guest VM restart after interface hot-plug
-
- Closed
-
- is depended on by
-
CNV-58495 Remove the "Restart required" for network hot-plug after CNV-58395
-
- Verified
-
- is related to
-
CNV-56943 Remove banner "Live migrate or restart the VirtualMachine to apply changes." from add-nic modal
-
- Closed
-
- links to
-
RHEA-2025:150257
OpenShift Virtualization 4.20.0 Images