Bug 2217541
| Summary: | IP address not set by cloud-init when using secondary NIC via NetworkAttachmentDefinition | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Container Native Virtualization (CNV) | Reporter: | Matthew Secaur <msecaur> | ||||
| Component: | Networking | Assignee: | Petr Horáček <phoracek> | ||||
| Status: | NEW --- | QA Contact: | Nir Rozen <nrozen> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.13.0 | CC: | alkaplan, jeremy.coulombe, sgott | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 4.14.2 | ||||||
| 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: | 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
Matthew Secaur
2023-06-26 15:49:12 UTC
Reassigning component to Networking based on the description. Please feel free to reassign if this appears to be in error. @sgott I'm actually not sure which component this is. OCP-Virt is mangling the cloud-init (or at least that's part of the issue). If the folks working on Networking handle that piece, then the change is great. If not, then maybe it needs to go somewhere else. I believe this is the same issue as the one reported and investigated here: https://issues.redhat.com/browse/CNV-28700 I think that there is a good chance that this is the same issue Jira CNV-28700 is exactly the same for at least part of this BZ (Scenario #1 in the original description). However, Scenario #2 isn't covered in that Jira. Having said that, I suppose if CNV-28700 is fixed, it would ultimately negate the need for Scenario #2 at all. Even after removing the redundant "network" object under "networkData" generated by Console, I still can't make this work. This should be investigated by the network team, to come up with a working example of IP configuration through networkData for VMs on https://console-openshift-console.apps.cnv2.engineering.redhat.com/k8s/cluster/projects: 1) Create a VM from a template 2) Edit the YAML, so it has networkData adjusting the config 3) See if it works The network team will investigate this. Increasing the priority since providing a working example blocks the progress on the UI side of this, and because of the severity To Alona's request - I'm adding 2 examples of networkData definitions (from a VM spec) that end up with a valid VMI, including a functioning secondary NIC (note that the second example also includes networData for the default interface):
Example #1:
- cloudInitNoCloud:
networkData: |
version: 2
ethernets:
eth1:
addresses:
- 10.10.10.14/24
Example #2:
networkData: |
ethernets:
eth0:
addresses:
- fd10:0:2::2/120
dhcp4: true
gateway6: fd10:0:2::1
eth1:
addresses:
- 10.200.0.2/24
eth2:
addresses:
- 10.200.1.2/24
eth3:
addresses:
- 10.200.2.2/24
version: 2
Perhaps while we are at this, we can try to resolve a bigger issue around our current use of cloud init network configuration: As highlighted by Dominik in https://issues.redhat.com/browse/OCPBUGS-13573?focusedId=22739386&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-22739386, the problem goes beyond faulty configuration - the networkData API is unusable when the user applies credentials API to inject SSH keys. I favor his suggestion to convert our UI and docs to the network_data.json format, where network and SSH config can coexist. Before we make that step however, we'll need to come up with a VMI example using that API. |