Bug 1814568 - Static IP only works with nic named either 'eth0' or 'nic1'
Summary: Static IP only works with nic named either 'eth0' or 'nic1'
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-metrics
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Shirly Radco
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
: 1867221 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-18 09:54 UTC by Guilherme Santos
Modified: 2023-10-06 19:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-11 15:10:40 UTC
oVirt Team: Metrics
Target Upstream Version:
Embargoed:
mavital: testing_plan_complete-


Attachments (Terms of Use)

Description Guilherme Santos 2020-03-18 09:54:59 UTC
Description of problem:
When setting nic custom configuration on metrics deployment, in order to have static IP, it only works (meaning, it does set the static ip desired and get connection) if the nic name is set to be either 'eth0' or 'nic1'.
The issue lies in the variable 'ovirt_template_nics' on '/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/defaults/main.yml' that is passed when the template is created and always create a 'nic1' nic, doesn't matter if a custom one set or not.

When nic is named 'eth0' it works I guess because the vm expects eth0 to be a default nic name (it doesn't work with eth1, eth2, etc), even if 'nic1' is also present.
When nic is 'nic1' works because it overrides the nic created by the template.

If the nic template name is manually changed in '/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/defaults/main.yml' it does change the name of the nic created (thus the one that is expected to work). However, not passing the variable 'template_nics' in '/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/templates/vars.yaml.template' (that gets the value of 'ovirt_template_nics') doesn't avoid creating the template nic as '/usr/share/ansible/roles/ovirt.image-template/defaults/main.yml' also set a default nic (named 'nic1' as well) when creating the vm that will generate the template.

I guess if we can't find a way to overcome this, I would suggest either documenting well about these two names possibilities or not allow user to set the nic name (only the other parameters)

How reproducible:
Always

Steps to Reproduce:
1. Deploy metrics setting a static ip with custom nic config
2.
3.

Comment 3 Sandro Bonazzola 2020-08-13 13:45:19 UTC
*** Bug 1867221 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.