Bug 1814568

Summary: Static IP only works with nic named either 'eth0' or 'nic1'
Product: Red Hat Enterprise Virtualization Manager Reporter: Guilherme Santos <gdeolive>
Component: ovirt-engine-metricsAssignee: Shirly Radco <sradco>
Status: CLOSED WONTFIX QA Contact: Lucie Leistnerova <lleistne>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abpatil, emarcus, mavital, michal.skrivanek
Target Milestone: ---Keywords: ZStream
Target Release: ---Flags: mavital: testing_plan_complete-
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: 2020-06-11 15:10:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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. ***