Bug 865680 - [RFE] Ability to add "LINKDELAY=" to network config file
Summary: [RFE] Ability to add "LINKDELAY=" to network config file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: lab controller
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 0.11
Assignee: Dan Callaghan
QA Contact: Qixiang Wan
URL:
Whiteboard: Kickstart
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-12 06:18 UTC by Jun'ichi NOMURA
Modified: 2018-02-06 00:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-17 04:33:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Jun'ichi NOMURA 2012-10-12 06:18:06 UTC
Description of problem:

Some NICs sometimes fail to get IP during boot up.
To work around the problem, recent RHELs provide "LINKDELAY=" parameter
in /etc/sysconfig/network-scripts/ifcfg-eth<X> file.

For example of RHEL6.3 Techinical Notes:
> 3.6. Networking
>   kernel component
>     Some e1000e NICs may not get an IPv4 address assigned after
>     the system is rebooted. To work around this issue, add the following
>     line to the /etc/sysconfig/network-scripts/ifcfg-eth<X> file:
>
>       LINKDELAY=10

Because this can happen on the first boot up just after install
and then all test fails before starting any test, this cannot be
worked around by a test.

The snippet below provides "linkdelay=" kickstart metadata which
adds "LINKDELAY=" parameter to the config file of the active NIC.

--------------------------------------------------------------------------------
{% if linkdelay %}
IFACE=$(route -n 2> /dev/null | awk '/^0\.0\.0\.0/ {print $8}' | tail -n 1)
echo "LINKDELAY={{ linkdelay }}" >> /etc/sysconfig/network-scripts/ifcfg-$IFACE
{% endif %}
--------------------------------------------------------------------------------

Please add such a feature to the stage of kickstart %post.
(e.g. somewhere in the rhts_post snippet or so)

Comment 1 Dan Callaghan 2012-10-12 06:23:36 UTC
Would it be reasonable to add the LINKDELAY= line to every ifcfg-* file (except ifcfg-lo) instead of guessing the interface?

Comment 2 Jun'ichi NOMURA 2012-10-12 07:06:38 UTC
Yes, I think so.

Comment 3 Dan Callaghan 2012-11-27 03:35:17 UTC
On Gerrit: http://gerrit.beaker-project.org/1513

Comment 6 Qixiang Wan 2012-12-24 10:48:42 UTC
Verified with build beaker-server-0.10.6-1.git.95.9d3b913.el6.

Submitted a job with:

<recipe kernel_options="" kernel_options_post="" ks_meta="linkdelay=20" role="RECIPE_MEMBERS" whiteboard="">

After provision, LLINKDELAY=20 is added into the ifcfg-* files:

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="52:54:3D:43:76:B6"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="829c5a02-34c3-4dd4-9e2d-4ac2325f67eb"
LINKDELAY=20

Comment 7 Dan Callaghan 2013-01-17 04:33:30 UTC
Beaker 0.11.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.