Bug 2237408

Summary: Secondary network interface is not presenting in VM
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: NetworkingAssignee: Petr Horáček <phoracek>
Status: CLOSED MIGRATED QA Contact: Yossi Segev <ysegev>
Severity: high Docs Contact:
Priority: high    
Version: 4.14.0CC: gouyang, ysegev
Target Milestone: ---   
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-09-07 08:32:30 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:
Attachments:
Description Flags
attachments of nncp/nad/vm/vmi none

Description Guohua Ouyang 2023-09-05 11:08:42 UTC
Created attachment 1987047 [details]
attachments of nncp/nad/vm/vmi

Description of problem:
Adding secondary network interface to a running VM and then migrate the VM, the 2nd NIC is not presenting in VM


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Configure NNCP on all nodes
2. Create NAD with the bridge
3. Create a VM and get it running
4. Enable the network hotplug feature
5. Add 2nd NIC to the VM
6. Migrate the VM
7. Check the VM guest after the VM migration complete

Actual results:
2nd NIC is not presenting in VMI spec and the guest

Expected results:
2nd NIC is presenting in VM guest

Additional info:

Comment 1 Yossi Segev 2023-09-05 13:02:33 UTC
I ran the same scenario from CLI rather than UI.
I used the same resources as Guohua (my resources are attached), and it passed successfully - I see t.he hot-plugged interface in the VMI spec and in the guest.
The difference between my scenario and the original scenario (except for using CLI vs. UI) is that I created the NAD and the VM in a new namespace which I created, while Guohua ran it in the default namespace (I don't think this difference should affect, but I can't be sure).

Comment 5 Petr Horáček 2023-09-05 14:07:43 UTC
Guohua, would you please try this again, using a custom namespace, to make sure that there is no difference compared to what Yossi has tried through CLI? If the issue persists, it would mean that this is a UI bug, interacting incorrectly with the backend.

Comment 6 Guohua Ouyang 2023-09-06 01:28:10 UTC
I tested it again in custom namespace, there is no difference, the 2nd Nic is not presenting in VM guest.
Yossi, could you test it in my cluster to ensure there is no configuration gap between the clusters? 
BTW, the cluster I used is FIPS enabled, can it be an the problem?

Comment 7 Yossi Segev 2023-09-06 07:31:01 UTC
(In reply to Guohua Ouyang from comment #6)
> I tested it again in custom namespace, there is no difference, the 2nd Nic
> is not presenting in VM guest.
> Yossi, could you test it in my cluster to ensure there is no configuration
> gap between the clusters? 
> BTW, the cluster I used is FIPS enabled, can it be an the problem?

Tested again via CLI on Guohua's cluster (uit-414-0905), in a custom namespace, and it worked fine - the hot-plugged interface is added successfully, and seen on both the VMI and the guest after migration.

Comment 8 Petr Horáček 2023-09-06 08:15:31 UTC
Thanks a lot for isolating the issue.

This needs to be fixed on the UI component. Guohua, would you please move this to the UI backlog? Our team will be of course available to assist you if you have any questions.

Comment 9 Guohua Ouyang 2023-09-06 10:43:20 UTC
I compared the VM yaml and made two changes to the VM I created, and now the 2nd NIC can show up after restarting the VM, but it could not show up by migrating the VM, I was totally lost.

Comment 10 Guohua Ouyang 2023-09-07 08:02:20 UTC
https://issues.redhat.com/browse/CNV-32666 
Opened a separate issue about the VM spec seems not right after adding the nic.

Comment 11 Petr Horáček 2023-09-07 08:32:12 UTC
I will close this backend BZ in favor of https://issues.redhat.com/browse/CNV-32666. Feel free to reopen this if you believe there is an issue on the backend too.

Comment 12 Petr Horáček 2023-09-07 08:34:48 UTC
Guohua, please note that in 4.14, hot-plug cannot be initiated just by changing the VM spec. You need to use a virtctl command: https://docs.openshift.com/container-platform/4.14/virt/vm_networking/virt-hot-plugging-network-interfaces.html#virt-hot-plugging-bridge-network-interface_virt-hot-plugging-network-interfaces
In 4.15 that will change, all you would need to do then is to edit the spec.