Condition in dhcp-interface systemd service stops interfaces from coming up

Bug #1763474 reported by Tim Rozet on 2018-04-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Undecided
Tim Rozet

Bug Description

Consider a baremetal node being booted for the first time with these interfaces:

eno1 - able to dhcp
eno3 - will fail dhcp
enp4s0f3 - has an ifcfg already, able to dhcp

The node boots up, linux networking attempts to dhcp interfaces in order. eno1 is successful, eno3 fails and dhcp stops (expected behavior). Therefore we rely on <email address hidden> to bring up enp4s0f3. However, because of the condition:

ConditionPathExists=!/etc/sysconfig/network-scripts/ifcfg-%i

and the ifcfg-enp4s0f3 file exists, this service will never run. Leaving the interface down. However, this condition is not necessary. What actually runs in the service is:
ExecStartPre=/usr/local/sbin/dhcp-all-interfaces.sh %i
ExecStart=/sbin/ifup %i

dhcp-all-interfaces.sh already includes a check for if the ifcfg exists, then just return 0 and do not write a new ifcfg file. Following that the ifup will occur, which is fine for an interface which is either already up, or already has an icfg file and is down. The ConditionPathExists is redundant and actually stops the interface from coming up.

Tim Rozet (trozet) on 2018-04-12
Changed in diskimage-builder:
assignee: nobody → Tim Rozet (trozet)
status: New → In Progress
Tim Rozet (trozet) wrote :

We hit this in tripleo, more info in the OPNFV jira:
https://jira.opnfv.org/browse/APEX-588

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers