Bug 1715203
| Summary: | Bare-metal multiple NIC ip=<static-ip>:<gw>:.. installation process fails | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | William Caban <william.caban> | ||||
| Component: | RHCOS | Assignee: | Steve Milner <smilner> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Micah Abbott <miabbott> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 4.1.0 | CC: | adeshpan, bbreard, behoward, dcain, dornelas, dustymabe, imcleod, jligon, mzali, nstielau, rhowe, smilner | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 4.2.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-09-06 17:49:08 UTC | 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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1186913 | ||||||
| Attachments: |
|
||||||
In the attached example am I correct in thinking that only one NIC should be static, and the rest should be DHCP? Yes. That is an option. The other option is just to ignore all the other NICs as unused or unmanaged. Will it work if you specify dhcp for the other NICs? ip=:::::<iface>:dhcp It works correctly when passing ip=<iface>:dhcp The error message is coming from the Dracut module "35network-legacy": https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-legacy/parse-ip-opts.sh#L80-L85 The issue is not specific to the Installer, nor RHCOS itself. The Dracut module requires that in the case of multiple NICs that you _must_ provide an interface per comment #5. To whit: # When supplying more than only ip= line, <interface> is mandatory and # bootdev= must contain the name of the primary interface to use for # routing,dns,dhcp-options,etc. In order to know if this is a bug or not, we need to know more information. Can you please provide the kernel commandline? In order to have a static IP on one interface, you will have to provide an `ip=:::::<iface>:dhcp" for each interface that you want to DHCP. As a clarification: This bare-metal installation was trying to use a single NIC out of 9 NICs the server had. When trying to pass a static IP (and not use or ignore the other NICs) is when the behavior occurred. William, I need to know the following: - WHAT was the commandline used for the kernel? We don't have enough information. - HOW did you instruct RHCOS to ignore the other interfaces? One way that I can see this scenario playing is that user appends the static "ip=" directive to the commandline and DOES NOT remove the existing "ip=dhcp". That is part of the reason why I am asking for the kernel commandline. I would fully expect things to work if: - user removes the existing "ip=dhcp" directive off - user adds their "ip=:::::<interface>:<dhcp>" (or static ip=...) configuration In the case of multiple NICs, Dracut will error out when there are multiple "ip=" directives. William, this is considered a release blocker for 4.2. Could you please provide the requested information or we may have to push this into 4.3 William, I need to know the following: - WHAT was the commandline used for the kernel? We don't have enough information. The format was like this: rd.neednet=1 initrd=rhcos/rhcos-initramfs.img console=tty0 coreos.inst=yes coreos.inst.install_dev=sda coreos.inst.ignition_url=http://192.168.1.1:8000/worker.ign coreos.inst.image_url=http://192.168.1.1:8000/metal/rhcos-4.1.0-x86_64-metal-bios.raw.gz ip=XXXXX Where XXXX followed the format: ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface> And nothing was configured for the other interfaces. - HOW did you instruct RHCOS to ignore the other interfaces We did not find a way to ignore the other NIC. That is why we had to use ip=<interface>:dhcp instead. Closing this as NOTABUG. Please see [1] and [2] The ip line provided misses the critical piece of "none" for the "autoconf" setting, which is in the exmaple of [1]. The example provides is "ip=192.168.7.20::192.168.7.1:255.255.255.0:bootstrap:enp1s0:none:192.168.7.77" The correct commandline should have been "ip=192.168.1.13:192.168.1.1:192.168.1.1:master-3.ocp4poc.example.com:eno4:none:192.168.1.1" assuming that the Gateway and the DNS server is 192.168.1.1. The full commandline format is "ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>" per [2]. [1] https://blog.openshift.com/openshift-4-bare-metal-install-quickstart/ See the "STATIC IPS" section. [2] https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt Please note that the multiple NICs were a distraction. Using the shorter "ip=<iface>:dhcp" worked because the longer format was invalid. The reason for the error is that the _default_ is "dhcp" [1]. The way the code is parsed [2], it requires at least 7 values to unset the "dhcp". The error reported should only ever happen when using the long format but with less than 7 values. [1] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-legacy/parse-ip-opts.sh#L61-L65 [2] https://github.com/dracutdevs/dracut/blob/master/modules.d/40network/net-lib.sh#L436 Okay. Thanks. We might need to correct or update our "man dracut.cmdline" then. _W |
Created attachment 1574999 [details] screenshot multiple NIC one interface with static IP If a static IP is passed to one of the interfaces with ip=<static-ip>:<gw>:.. the installation process fails if it does not have static IPs for all the NICs in the system. (see attached screenshot)