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

6 Commits

Author SHA1 Message Date
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
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
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
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
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
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