Bug 1147181
Summary: | Kickstart installation without default gateway errors out | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Floris <bos> | ||||||||
Component: | anaconda | Assignee: | Jiri Konecny <jkonecny> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 7.1 | CC: | barry.gestwicki.ctr, bos, jkonecny, joherr, linux, mbanas, mkovarik, orion, pdwyer, sreber | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | anaconda-21.48.22.4-1 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-11-19 09:47:32 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: | 1133060 | ||||||||||
Attachments: |
|
Description
Floris
2014-09-27 22:41:25 UTC
Hi Floris, Could you please attach log files from /tmp during the installation? Please attach also /tmp/anaconda-tb-* file. Thanks! Created attachment 951547 [details]
Bug reporter generated .tar.gz
Out of curiosity, what happens if you change your url command to: url --url=http://192.168.178.100/proxy.php/ That is, drop the double quotes. David, there is nothing wrong with that line. Same kickstart template does work fine if you do add a default gateway. (which should not be necessary) BTW you do seem to already have special handling for the case where there is no IPv6 gateway: https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/network.py#L414 === if networkdata.ipv6gateway: gateway6 = nm.nm_ipv6_to_dbus_ay(networkdata.ipv6gateway) else: gateway6 = [0] * 16 === I am guessing you just need to do something similar for IPv4 here: https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/network.py#L389 === gateway4 = nm.nm_ipv4_to_dbus_int(networkdata.gateway) === Probaby just needs to be changed to something along the lines of: === if networkdata.gateway: gateway4 = nm.nm_ipv4_to_dbus_int(networkdata.gateway) else: gateway4 = [0] * 4 === This still appears to still be broken in 7.1, and this is killing me on a machine with two interfaces. I've eventually managed to hack network --device=eth1 --bootproto=static --ip=192.168.1.11 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=10.10.10.1 network --device=eth0 --bootproto=static --ip=10.10.40.12 --netmask=255.255.0.0 --gateway 10.10.0.1 --nameserver=10.10.10.1 which seems to work, despite eth1 not really having a gateway. I have the same issue in 7.1. I do not wish to have a gateway defined on all interfaces simply because I do not need them on any but the primary. The documentation states that you must specify the gateway and nameservers when using the static method: ~~~~~ The static method requires that you specify the IP address, netmask, gateway, and nameserver in the Kickstart file. This information is static and is used during and after the installation. ~~~~~ Document Url: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html Although it still functions without the nameservers being specified, it does req uire the gateway or it fails. Neither of these should be required for an interfa ce since some subnets are local only and maynot have DNS servers on them. Can this requirement be removed from the static method and the documentation upd ated to reflect this? Hi, I'm not able to reproduce this issue, trying with one or multiple network lines, with and without --gateway. Jiri, do you know about any reproducer we could use? Martin, I did some testing and I think the issue is fixed already now. I think the issue now is that the configuration files are created properly but without the --activate option the configuration files are not loaded by NetworkManager after the installation start so it wasn't change in the "ip addr" command. For you who still have this problem could you please add option --activate and test it again. If you still have some problems with it, please post here your kickstart file and these logs: /tmp/*.log /tmp/syslog and NetworkManager configuration files: /etc/sysconfig/network-scripts/ifcfg-[device-name] Created attachment 1030074 [details]
joherr - failing kickstart
I have been using the --activate option. I am using the latest 7.1 installation DVD from the customer portal. I have attached a copy of my kickstart file. I did however try again this morning with the attached file. This should not matter, but I am installing into a virtual machine using the following command. virt-install --name jh-bug-test \ --ram 4096 \ --vcpus 2 \ --hvm \ --os-type linux \ --os-variant rhel7 \ --disk path=/dev/vg_vms/jh-bug-test \ --network bridge=IntPublic \ --network bridge=Provision \ --initrd-inject /tmp/jh-bug-test.ks \ --extra-args "ks=file:/jh-bug-test.ks" \ --noautoconsole \ --graphics spice \ --autostart \ --location rhel-server-7.1-x86_64-dvd.iso Thank you joherr. Now I known what is the problem. When you use network command in the kickstart normally then during the start dracut creating configuration files and this files are loaded by NetworkManager after the anaconda starts. This working correctly now. But when you create network settings in pre section which means that the anaconda must connect to NetworkManager and the NetworkManager create the files from what the anaconda tells it. The bug is when anaconda trying to send empty gateway to NetworkManager. I will fix it. I'm attaching minimal reproducer ks file for you Martin. Created attachment 1030361 [details]
reproducer.ks
Also happens when you do not have a pre section, but fetch the kickstart file from an url (kickstart=http://server/kickstart-generating-script.php), instead of local file. Hello Floris, I looked on your logs in more detail (comment 4) and I found that you are using network kickstart command without the --device option. This could be problem that the dracut don't know how to parse this option (it's related to bug 1085310). However after this fix and my fix for this bug everything should work. Please try the installation with --device=<device name>. With this option dracut should parse it properly. I would recommend you to always use --device option and if you don't know what device to use please use the --device=link. If that logs are not actual please attach new logs with boot options you are using. Thank you. Dear Jiri, As I pointed out before, the exact same kickstart file works fine if you do add a gateway parameter. Note that we are a software development company that makes software to provision dedicated servers in datacenters ( https://www.noc-ps.com/ ). The profile has been tested on a lot of servers. For all our customers that use it to provision Internet connected servers it works fine. For all our customers that are using a private network without gateway for provisioning, it has been broken since 7.0, but worked with 6.x. Cannot make it any more simple than that. We do not use --device=link because in datacenter environments more often than not more than one network adapter has a link. When omitting --device it should be using the device whose MAC address we pass through the ksdevice=$mac parameter instead. If that no longer works in the development version you are testing with, you got yourself another regression. Dear Floris, I have found solution for your use case. I created one small patch already and the next one will continue. Everything should work for you in 7.2. *** Bug 1206267 has been marked as a duplicate of this bug. *** 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. https://rhn.redhat.com/errata/RHBA-2015-2284.html |