1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

9 Commits

Author SHA1 Message Date
Nigel Kukard
6a5a7c6b2c For hotplug devices check if the link is present, not up (#28)
Checking operstate would require firmware to be loaded and link
negotiation to of taken place. Some firmwares take a few seconds to
upload and online the device, and some link negotiations take a second
or two.

Immediately checking operstate is not feasible here. Checking if the
link is present is a more suitable non-delaying approach.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
2017-07-27 01:45:52 +02:00
Julien Fortin
de1127b0be sbin: start-networking: adjust allow-hotplug behavior to ifupdown
Ticket: Bug#855598: src:ifupdown2: allow-hotplug behaves differently, not UPing interfaces
Reviewed By: Roopa
Testing Done: mark an interface (ethX) as hotplug then reboot

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-02-23 16:42:34 +07:00
Roopa Prabhu
d521f1f053 systemd: start-networking: include interface exclusions in all targets
Ticket: CM-12934
Reviewed By: julien
Testing Done: tested systemctl <start|stop> networking with interface
exclusions

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-11-23 04:54:39 +01:00
Julien Fortin
d02acd0226 sbin: start-networking: support hotplug class from init script
Ticket: CM-9296
Reviewed By: Roopa
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-06-16 03:37:35 +01:00
Roopa Prabhu
6642399fee start-networking: ifup mgmt class interfaces if present
Ticket: CM-9919
Reviewed By: dsa, daniel
Testing Done: Checked that mgmt class interfaces are brought up at boot
if present

Note that this only indicates that:
- 'mgmt' is a reserved class
- if any interfaces are tagged as 'mgmt', they will be brought up at
  boot

With this we can put out documentation saying that mgmt devices
can be put into its own class for easier management of mgmtvrf.

{noformat}
$cat /etc/network/interfaces
auto lo
iface lo inet loopback

allow-mgmt eth0
iface eth0 inet dhcp
     vrf mgmt

allow-mgmt mgmt
iface mgmt
     address 127.0.0.1/8
     vrf-table auto

$ifquery -l --allow=mgmt
eth0
mgmt

$ifquery  -l -a
lo

$ifreload --allow=mgmt
$ifup --allow=mgmt

{noformat}

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-04-21 13:11:22 -07:00
Roopa Prabhu
d74c20e9ce start-networking: bring back support for SKIP_DOWN_AT_SYSRESET in /etc/default/networking
Ticket: CM-9668
Reviewed By: daveO, roopa (patch by daveO)
Testing Done: Tested reboot/shutdown and made sure network
unconfiguration was not getting triggered

This is controlled by a variable SKIP_DOWN_AT_SYSRESET="yes"
(defaults to yes). Should probably default to 'no' for upstream.
2016-03-03 21:29:53 -08:00
Roopa Prabhu
09b1b7fb0f start-networking: introduce state lock file /run/network/ifstatelock in
non-persistant storage

This is a reimport of missing peices of commit
f819c3602e56 in 2.5cl ifupdown2.

commit log from 2.5cl:
Introduce a lock file in non-persistent storage
/run/network/ifstatelock to make sure the state
file in persistent storage is cleaned up correctly

ifupdown2 state file was moved to /var/tmp because /var/tmp was
tmpfs and was large enough (100MB) for the state file. But it
appears it has changed (or is not consistent) across all platforms.
We can move it under /run, but /run again size varies on various
platforms and it is too small on some platforms.

This patch:
- continues to keep the ifupdown2 state file under /var/tmp (because
  it needs the space)
- ntroduces a second level /run/network/ifstatelock file that stays
  on non-persistant storage and is used to delete the state file at
  /boot up

Closes: CM-9573, CM-7774
Review: CCR-3623 (original review)
Tested-by: Mallikarjuna rao Uppalapati <mallik@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-02-29 16:22:25 -08:00
Dave Olson
9a7878c682 Remove /etc/init.d/networking after all - causes loops during image builds
Ticket:  none
Reviewed By: trivial
Testing Done:  installed, Alex tried for image creations.

apparently with some of our packages like mstpd still using init.d for a
while longer, just having the init.d/networking file causes the original
complaints about loops between services.

So I'm purging it completely.

Also clean up the comments a bit in start-networking
2016-02-08 13:54:17 -08:00
Dave Olson
07678ee4ce Create a networking service script, so we can run it after switchd
Ticket: CM-8790
Reviewed By: wkok,roopa
Testing Done: built, installed, rebooted

jessie's networking starts as an init.d service.   Trying to force ordering
between init.d and systemd services when there are dependencies doesn't work
well (especially since the init.d/networking service is forced very early
because of the remote filesystem requirement in jesie).

Converting networking to a script run as a systemd service allows us to start
networking after switchd.  The new script is /sbin/start-networking.  I chose
to keep it in /sbin, rather than put it in /usr/cumulus/bin, because it's core
functionaity.

I am not removing /etc/init.d/networking, it just gets ignored unless somebody
types it manually.  If somebody does that, systemctl runs through the lsb
hooks.  The two lost abilities below are just ignored if passed.  I'm
also preventing creating the rc.d symlinks to the init.d/networking
script to reduce future confusion.

We lose some init.d "convenience" functionality because it's not available
through systemd.  What we lose are:
  reload-currently-up - can still be done with ifreload --currently-up
  force-reload - can still be done with ifreload -f -a
We keep start, stop, reload, restart
2016-01-20 13:05:13 -08:00