Currently we run the configuring snippet only when we provision using PXE, we can include the same snippet in finish templates. We'll have to restart networking as well because host is not rebooted after finish script is run.
Created from redmine issue http://projects.theforeman.org/issues/9287
Moving to POST since upstream bug http://projects.theforeman.org/issues/9287 has been closed
Katello part is here https://github.com/Katello/katello/pull/5012
please provide verification steps
Try to provision a host with additional interfaces, using image based provisioning (finish template is used). Make sure that the interface is configured on that host.
I am currently using
a) image based provisioning (on libvirt)
b) using finish based template
c) when trying to provision a host with additional interfaces, the "ifcfg-" file get's created.
d) Under the network tab and under the vm tab I had selected the "add interface options"
Looks like I am missing something in here. Need help here.
How did you set the additional interface, what values did you use? It should be able to create additional virtual interfaces (vlans, aliases), but you probably can't setup additional physical interfaces because you don't know the MAC until the machine is created, so the Foreman can't find the real interface name.
Now I feel, I don't know how to test this bug, if I go as per you comment 10.
I might really be missing soemthing.
The comment 8 says,
a) I need to use additional interface (whihc means use "Add interface")
b) Use image based provisioning with finish tempalte (which means I need to use either 'rhevm or libvirt', taking into consideration step a), no openstack as for openstack we cannot "add interface")
So wondering how can we check this if we cannot know the MAC address until the machine is created and real interface name not known?
This bug can only be verified once Bug 1193460 is FIXED.
As we need to use virtual interfaces with aliases and that not possible to configure currently due to the bug 1193460, wondering is there any other way to verify this bug.
Just review other than virtual interfaces. E.g. use baremetal with two interfaces and configure second interface (you have to know MAC), verify its configuration file.
This requires image based provisioning, so thinking baremetal would not be of much use here.
Right, sorry I forgot you want to test image template explicitly. You may try to configure additional interface for image based provisioning since the finish script is run later so it might work. At least we should see that it tried to create config file (that was subject of this BZ). If it creates the file with wrong MAC, it will be fixed by bug 1193460
currently it creates a ifcfg-:0 device file when trying to create using virtual NIC's.
I don't know how to configure additional interface when using image based provisioning apart from virtual NIC's.
You can add additional interfaces in "Virtual Machine" tab using "+ Add Interface" button, unfortunately this won't help since we won't get the MAC from libvirt. So running the configuration snippet for image based provisioning is not much useful now but you've verified that it's being run.
VERIFIED this bug with Sat6.1-GA-SNAP3
Networking configuration snippet does get used during image based provisioning, but currently it does not create an interface properly due to bug 1193460.
so I will be moving this bug to VERIFIED state.
This bug is slated to be released with Satellite 6.1.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.