dhcp-all-interfaces.sh may faild when interface remains in DOWN state

Bug #1777396 reported by Radoslaw Smigielski
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Radoslaw Smigielski

Bug Description

In diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh
before get_if_link() is called, the interface suppose to be set up:

>> ip link set dev $interface up &>/dev/null

but if for whatever reason the link remains down entire script fails on get_if_link()

for ((; tries > 0; tries--)); do
  # Need to set the link up on each iteration
  ip link set dev $interface up &>/dev/null
  has_link=$(get_if_link $interface)
  [ "$has_link" == "1" ] && break
  sleep 1

get_if_link() should ignore links in DOWN state so the above loop can carry on and check other interfaces.

Changed in diskimage-builder:
assignee: nobody → Radoslaw Smigielski (radoslaw-smigielski)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.