Project

General

Profile

Actions

Bug #19310

open

Unattended PXE-less image does not work on DHCP network w/ multiple NICs

Added by Lukas Zapletal about 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Image
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When there are multiple NICs and PXE-less discovery is remastered with pxauto=1 (unattended mode) leaving all defaults values, discovery picks up from interfaces with link randomly (https://github.com/theforeman/foreman-discovery-image/blob/master/root/usr/lib64/ruby/vendor_ruby/discovery.rb#L91-L108) which can only work if ALL interfaces are connected to the provisioning network, which was an incorrect assumtion. We assumed that operator will disconnect all irrelevant networks on the server for the time being.

Using discovery PXE less for DHCP networks is valid workflow and we need to let users to specify how to pick the interface in unattended mode. Therefore the proper fix is to ask in the unattended mode to pick the correct interface, which makes it not unattended anymore, but the interface has to be passed in.

I was thinking of an alternative way to initialize all interfaces with DHCP setting some extra flag (discovery_dhcp) and in the kexec template ignoring static network configuration completely in this case. But the question is - which interface should be considered provisioning (and which primary)? Auto-provisioning needs to be ruled out from this workflow as there is no way setting this up, only manual discovery provisioning is possible (when user can check which interface is primary). Other option might be to detect the interface from subnets - if a subnet has discovery proxy turned on, it will be the primary and provisioning.

This is too complicated and can be confusing for users. Early versions of discovery had the "bring all interfaces up" behavior but it was not working properly with multiple interfaces as default route was messed up or users had multiple interfaces in the same subnet (which needs some kernel tuning in order to get working), so I think we should stick with the original idea - simply to ask user in this case.

Workaround 1: Disable or disconnect all interfaces except the provisioning for the discovery phase.

Workaround 2: Modify KExec template and remove ip=#{ip} netmask=#{mask} gateway=#{gw} dns=#{dns} from Anaconda kernel command line completely, so it falls back to DHCP. This will only work if discovered node will be able to discover itself.

Actions #1

Updated by Lukas Zapletal almost 7 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF