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

137 Commits

Author SHA1 Message Date
0ab836bd27 Merge remote-tracking branch 'cumulus/dev'
Conflicts:
	config/ifupdown2.conf
	nlmanager/nllistener.py
2016-09-02 15:45:58 -07:00
9b22fdfcfc Changing to a correct version fro EA track builds 2016-08-19 09:35:21 -07:00
ccc833043e Staging cl3u4 version for merge to stable and release
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-01 09:59:45 +02:00
e367482f2e debian: avoid zipping of generate_interfaces.py file
Ticket: CM-10751
Reviewed By: Roopa Prabhu, Julien Fortin
Testing Done: Yes, by extracting and installing .deb onto dell-s3000-02

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-06-16 03:37:34 +01:00
d6dd6fe653 Merge remote-tracking branch 'cumulus/dev' 2016-06-06 13:18:39 -07:00
1cf891d101 Staging cl3u3 version for merge to stable and release 2016-06-05 09:03:45 -07:00
8f361f7d4c debian: replace all cumulus email ids to dev-support@cumulusnetworks.com
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-05-07 20:22:47 -07:00
612aadeac9 debian: changelog: update for new release: 1.1-cl3u2
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-05-04 20:18:42 +02:00
90c6eab5f1 debian: move /sbin/start-networking to /usr/share/ifupdown2/sbin
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-04-19 16:00:35 -07:00
7b2e838e95 Dry-run upgrade test 2016-04-19 14:37:39 -07:00
f332cfbee8 debian: add /var/lib/ifupdown2/hooks dir
This can be used to execute third party scripts.
One such script /var/lib/ifupdown2/hooks/get_reserved_vlan_range.sh
if exists is used by the vlan module to get the reserved
vlan range on the system.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-04-16 20:39:58 -07:00
87907576b7 debian: Add new SKIP_DOWN_AT_SYSRESET /etc/init.d/networking config option to skip deconfiguring interfaces
Ticket: CM-5900
Reviewed By: CCR-2921
Testing Done: Tested 'service networking stop' during system reboot and shutdown

this is cherry-pick of cumulus-3.2.y commit ac231e966a04eb78153d9b53f0d236a149c7bba5
2016-04-03 10:29:33 -07:00
26b7f9bf3e Don't timeout networking start
Ticket: CM-9216
Reviewed By: roopa
Testing Done: installed, verified that even with long sleeps, no timeout

After much discussion with Roopa, Wilson, Anuradha, Mallik, and Scott,
we decided we would go back to the 2.5 behavior of not timeing out
on networking startup.  See the bug for some of the discussion.

This needs clagd changes to not hang forever if clag is to be restarted.

Since this is a oneshot service, the default is to not timeout, so
simply remove the TimeoutSec variable to get the default of no timeout.
2016-03-02 15:03:30 -08:00
8f79f54df8 Fix incorrect install location of networking default file
Ticket: none
Reviewed By: roopa,satish
Testing Done: built, installed, verified correct location

The install file resulted in creating /etc/default/networking/ as a
directory and installing the networking.default file in it.  Rename
networking.default to networking, and change the install file.
Normally dh_installinit handles all this, but since the package is
ifupdown2, and the file is networking, that doesn't happen.

Also, because we had created a directory with the name of what we want
to install as a file, we need to remove it if it exists.  This addition
of a preinst file should not go upstream, and should be removed in a few
weeks when everybody has re-installed enough.
2016-02-19 14:06:58 -08:00
42517ec5f7 Changing source format to git to support revisions 2016-02-15 11:57:10 -08:00
18f6ded263 Reset version to CL3.0 convention. Package builds from jenkins will come as <base>~<time>.<commit id>. First release is cl3u1 2016-02-15 11:55:30 -08:00
57eca61da5 Fixed one more reference to /etc/init.d/networking; remove switchd dependency
Ticket:
Reviewed By: trivial
Testing Done:  built, installed

Don't want to leave incorrect confusing references behind.

Instead of having the networking script depend on switchd, since
ifupdown2 is upstream, I'll add the reverse dependency to the
switchd.service.

Added Documentation line
2016-02-08 20:32:49 -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
28102a01e2 debian: add /var/lib/ifupdown2/policy.d to .dirs file
Fixes: ec205cb3f8b0("policymanager: fix default policy file paths")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-02-02 22:35:41 -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
b695613baa debian: remove systemd networking .service file
This patch temporarily removes systemd networking service
script. This enables ifupdown2 native init script to run.
systemd networking init script will be re-enabled in the
future after we test and claim that it works.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2015-12-22 23:42:34 -08:00
59dad2ca80 debian: sync debian files with from upstream debian repo
These include changes that were done to move ifupdown2
to use pybuild and some debian policy fixes

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2015-12-20 23:06:12 -08:00
ff50f301d5 move ifupdown2/* .
ifupdown2 code was one level deeper because ifupdown2 initially
had ifupdown2 and ifupdown2-addons as two separate packages.
Since they were combined into one package, it makes sense to
move all combined code under the top level directory

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2015-08-02 05:05:52 -07:00
29de56fe14 apt-get remove of python-ifupdown2 fails due to postrm script error
Ticket: CM-6655
Reviewed By: Trivial
Testing Done: tested install and removal of python-ifupdown2

There was an invalid equality test in the postrm script for
ifupdown2.  In Dash, equality is tested with a single '='
and not '=='.
2015-07-13 11:12:44 -04:00
458b49fa1e move udev script processing to before restarting networking
Ticket: CM-5764
Reviewed By: jtoppins
Testing Done:
2015-05-07 16:13:52 -07:00
d1017fec7a ifupdown2: fixup maintainer scripts
Ticket: CM-5764
Reviewed By: TBA
Testing Done: of course none ;) Will update when I have some time to test

fupdown2's postinst and postrm scripts do not conform to Debian's policy
for maintainer scripts [1]. Specific non-conformance follows:

* fixed maintainer scripts so they only use /bin/sh as other shells are
  non-essential packages and may not exist on the system
* fixed maintainer scripts so only actions specified by $1 are performed
  per run of the script
* fixed maintainer scripts to only support specific values for $1, and
  will otherwise exit with error
* included at the bottom of the postrm script the "#DEBHELPER#" tag as
  during package building debianhelper will inject extra code at this
  location

[1] https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
(cherry picked from commit 2289fe4e90a0134fcb07fe7e2e838de755d73e68)
2015-04-27 15:33:54 -07:00
ef7b7c04b4 ifupdown2: fixup maintainer scripts to not crash on files not existing
Ticket: CM-5735
Reviewed By: no one
Testing Done: lots of repo upgrade testing by John B.

This partially reverts commit 8959e8e4ec93487228733b17ef2b220ed47c1260 ("Fix
bash completion for sudo users (mostly cosmetic)") in the sections where
the Debian maintainer scripts were modified.

In addition fixed up the Debian maintainer scripts to prevent a
potential upgrade failure, discussion follows:

The Cause For the upgrade Failure
=================================

Commit 8959e8e4ec93487228733b17ef2b220ed47c1260 introduced changes to
ifupdown2's package maintainer scripts to override some files provided
by the bridge-utils and udev packages as they conflict with ifupdown2.

The change to ifupdown2's postrm script is currently causing the script
to exit with a failure code if the following files do not exist on the
box:
/etc/udev/rules.d/80-networking.rules
/etc/udev/rules.d/60-bridge-network-interface.rules

The reason for this is in how the script is written.

Since the postrm script is configured to exit on the first command
failure, the "set -e" on line 3, the commands on lines 20 and 22 will
fail if the files being looked for do not exist, causing the script to
exit with a non-zero exit code. Causing apt to fail the upgrade.

.postrm script excerpt
----------
20 udevlink=$(readlink /etc/udev/rules.d/80-networking.rules 2>/dev/null)
21 [ -n "$udevlink" -a "$udevlink" == "/dev/null" ] && rm -f /etc/udev/rules.d/80-networking.rules
22 udevlink=$(readlink /etc/udev/rules.d/60-bridge-network-interface.rules 2>/dev/null)
23 [ -n "$udevlink" -a "$udevlink" == "/dev/null" ] && rm -f /etc/udev/rules.d/60-bridge-network-interface.rules
----------

Solution
--------

The solution requires having the newer version of the ifupdown2 package
provide a preinst script that gets run before the older package's postrm
script is run[1,2]. This gives us the opportunity to quietly fix the
problem. We also fix the postrm script in newer versions of the package
so it cannot bomb out in this way.

Finally, removed what appears to be a poor merge from commit
5f5d84e3261bf70dd3541666a3d3a7f817727ce6.

Fixes: 8959e8e4ec93487228733b17ef2b220ed47c1260
(cherry picked from commit 0eab79eb5aed4cdf0674e3f0ddad3631dd457bdc)
2015-04-20 15:11:11 -07:00
c9bba7539d Move LINK_MASTER/LINK_SLAVE to a new field link_type (purna hit some
issues with having it in flags) + add check for bond slave being already up

Ticket: CM-4408
Reviewed By:
Testing Done: some bond sanity test
2014-12-08 22:59:41 -08:00
522bf8e68b Fix bash completion for sudo users (mostly cosmetic) + man page and
example fixes

Ticket: CM-2911
Reviewed By: CCR-1637
Testing Done: tested ifupdown2 sanity and bash completion

The python argcomplete module that i use for ifupdown2 has a limitation
that it does not work with sudo when used in the global mode. But there is
a workaround for it online (long story short...instead of enabling the global
argparse complete ...the author recommends registering argparse complete bash
completion individually for your script). This patch does just that.

This patch also moves the udev overrides to their respective packages.
Two of them are owned by ifupdown2.

Conflicts:
	rootconf/default/home/cumulus/sysroot-complete
2014-06-10 19:31:50 -07:00
4931e447fe Update/add copyright files for Cumulus .debs. 2014-05-23 15:32:53 -07:00
93e8319a1f Move interfaces example generation script to under
/usr/share/python-ifupdown2

Ticket: CM-2643
Reviewed By:
Testing Done: Tested ifupdown2 sanity
2014-05-21 12:39:30 -07:00
d40e96ee4e man page cleanup + cleanup + minor fixes
Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifupdown sanity
2014-04-25 16:09:14 -07:00
4c3af47081 Link ifdown manpage
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-04-11 12:34:47 -07:00
739f665baa A whole lot of fixes and some new code (needs some cleanup which will be
part of subsequent checkins)

Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifup, ifdown and ifquery

Conflicts:
	packages/ifupdown2-addons/addons/ifenslave.py
2014-01-30 19:53:25 -08:00
551a3627d4 Some fixes in dependency handling
Ticket: CM-1438
Reviewed By:
Testing Done: tested with configs involving vlan devices and bridges

- fix dependency handling which i had broken recently with my last
  checkin (nat reported this one)
- In inet pluggins, dont issue ip addr get unless required (saw cpu
  spike up because of CM-1889)
- and some other minor changes lying in my tree
2013-11-30 23:52:30 -08:00
3e8ee54f30 more fixes + cleanup + support for --exclude argument
Ticket: CM-1438
Reviewed By:
Testing Done:
2013-11-13 16:07:15 -08:00
a6f80f0e0b python-ifupdown initial checkin
Ticket: CM-1438
Reviewed By: TBD
Testing Done:

- Will checkin build files after some more testing and performance
  numbers. It will go into the testing repo for 2.0

- All TODO items are part of the checked in TODO file
2013-11-04 06:06:11 -08:00