Bug 865680 - [RFE] Ability to add "LINKDELAY=" to network config file
[RFE] Ability to add "LINKDELAY=" to network config file
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: lab controller (Show other bugs)
0.9
Unspecified Unspecified
unspecified Severity medium (vote)
: 0.11
: ---
Assigned To: Dan Callaghan
Qixiang Wan
Kickstart
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-12 02:18 EDT by Jun'ichi NOMURA
Modified: 2013-01-16 23:33 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-16 23:33:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jun'ichi NOMURA 2012-10-12 02:18:06 EDT
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 02:23:36 EDT
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 03:06:38 EDT
Yes, I think so.
Comment 3 Dan Callaghan 2012-11-26 22:35:17 EST
On Gerrit: http://gerrit.beaker-project.org/1513
Comment 6 Qixiang Wan 2012-12-24 05:48:42 EST
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-16 23:33:30 EST
Beaker 0.11.0 has been released.

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