Debian build systems use debian subdir for building and having a debian
dir in the source package causes issues.
Moving it to debianpkg avoids the issue and allows us to ship debian
package files in the source distribution
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
minimize diffs between the base debian files and each backport to the
changes that actually matter, so that they aren't lost in the noise of
capitalization and ordering differences.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
this removes some cruft -- old/outdated/incorrect information,
trailing whitespace, etc., and updates the descriptions. Some small
changes were made where appropriate to minimize the diff between the
base control file and those of the various backports.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
These are unused and not referenced anywhere.
debian/rules.orig: included by mistake
debian/watch: no longer applicable; url is not valid
debian/patches: stale, unused, misleading
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Neither of these daemons are installed on 14.04, leading to build
failures now that the man pages are excluded from the Makefiles when
the daemons aren't enabled for install.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
The quilt source format expects the upstream tarball's version to
correspond roughly to the debian version of the package, and errors
will be thrown (at unpack time, in our case) if it doesn't. Do a
sanity check when we're building the source package to make sure they
match up.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Testing-done: built all backports in schroots and VMs
made files identical between different backports symlinks
to the ones for the more recent distribution, and updated
relevant tar invocations to follow symlinks.
Signed-off by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Testing-done: `--add-depends pkg-config' sbuild
The dependency on pkg-config was introduced recently, and
missed because it's in our schroots by default. Need to add
it for other build environments (e.g. ubuntu schroots).
Signed-off by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Added 'debian/patches' to the exclude file, since the existing patches
interfere with the build and are unused by our build. No other
changes were necessary. Used '-0~ubuntu16.04+1' as the version
extention, to denote: no patches (-0), debian packaging files changed
for backport (+1).
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
`git diff'ed the main (cmaster) branch against the 14.04 branch
to determine changed debian files, then pulled them into
debian/backports via `git cat-file'. Added 'debian/patches' to
the exclude file, since the existing patches interfere with the
build and are unused by our build. Used '-0~ubuntu14.04+1' as
the version extention, to denote: no patches (-0), debian
packaging files changed for backport (+1).
Original commit by Silas with updates on fork name by Martin
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
`git diff'ed the main (cmaster) branch against the 12.04 branch
to determine changed debian files, then pulled them into
debian/backports via `git cat-file'. Added 'debian/patches' to
the exclude file, since the existing patches interfere with the
build and are unused by our build. Used '-0~ubuntu12.04+1' as
the version extention, to denote: no patches (-0), debian
packaging files changed for backport (+1).
Original commit by Silas with updates on fork name by Martin
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Testing-done: ran 'make dist', unpacked elsewhere, built from result
Adjusted target to build the .orig.tar.gz accordingly, since it must
exclude the debian/ subdirectory. Allows for building any backport from
only a tarball.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
dpkg-parsechangelog and dpkg-source were both using flags
not yet available in the versions available on 12.04.
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Source a makefile (when it exists) in debian/rules to assemble
a source package via:
* a debian.tar.gz tarball built from combining the contents of debian/
and debian/backports/$backport/debian/ using other details under
debian/backports/$backport
* an orig.tar.gz file (not generated by this makefile). This can (and
should) be the same for all backports.
Details in debian/backports/README
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
iproute has been a transitional package that only depends on iproute2
since Debian Jessie or Ubuntu 14.04. To avoid installing this transitional
dummy package on newer installations we add iproute2 as a dependency
alternative to iproute. The iproute dependency can be dropped when
wheezy / 12.04 support is no longer needed.
Signed-off-by: Sebastian Lohff <seba@someserver.de>
Switch to using syslog as the default logging mechanism, rather than
the log file mechanism.
Send SIGHUP to syslog (any process with syslog in the name) if they have
files open in /var/log/frr/* (for debian, using lsof). For redhat, add
sending HUP to any of the pids in /var/run/*syslog*pid, for /var/log/frr/frr.log
Updated logrotate.d/frr to handle all the new daemons for debian; redhat
already had them.
Continue to send SIGUSR1 to all running frr daemons even when syslog is
in use, in case logging has been switched from file to syslog or vice versa.
For debian, accumulate all the PIDs and use a single kill command.
Add /etc/rsyslogd.d/45-frr.conf to have all frr daemons (and tag
frr) logs go to /var/log/frr/frr.log. If other syslog daemons are
used, logs will go to default log file.
Signed-off-by: Dave Olson <olson@cumulusnetworks.com>
If the user were to uncomment last line
and allow VTYSH_SHOW to be used as a non-root
account, this would allow arbitrary command completion
inside of vtysh via multiple -c ... -c .... lines
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
FRR when compiled with this debian packaging will cause
some issue with the system to work properly due to the
sudoers file conflicts.
So to prevent some level of stupidity, mark them as
conflicting.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
The debian.conf file is to specific of a name towards
debian distributions. Rename to be daemons.conf
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Moving cumulus/etc/rt_protos.d/frr.conf to tools/etc/rt_protos.d/frr.conf
Requested in Review.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14313
Reviewed By:
Testing Done: bgpmin, ospfmin, bgp_kitchen_sink_test
'ip route show' displays all routes as belonging to protocol zebra.
The user has to run an additional command (in vtysh) to get the actual
source of a route (bgp/ospf/static etc.). This patch addresses that by
pushing the appropriate protocol string into the protocol field of the
netlink route update message. Now you can see routes with the correct
origin as well as filter on them (ip route show proto ospf).
'ospf' is used for both IPv4 and IPv6 routes, even though the OSPF
version is different in both cases.
Sample output (old):
9.9.12.13 via 69.254.2.38 dev swp3.2 proto zebra metric 20
9.9.13.3 proto zebra metric 20
nexthop via 69.254.2.30 dev swp1.2 weight 1
nexthop via 69.254.2.34 dev swp2.2 weight 1
nexthop via 69.254.2.38 dev swp3.2 weight 1
Sample output (new):
9.9.12.13 via 69.254.2.38 dev swp3.2 proto bgp metric 20
9.9.13.3 proto bgp metric 20
nexthop via 69.254.2.30 dev swp1.2 weight 1
nexthop via 69.254.2.34 dev swp2.2 weight 1
nexthop via 69.254.2.38 dev swp3.2 weight 1
There's no point in installing libospf anymore, now that
libfrrospfclient doesn't link it.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Convert the libospfapiclient -> libfrrospfapiclient
and libospf -> libfrrospf to prevent namespace
collision with Quagga.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
The library libzebra that is installed with FRR will
conflict with Quagga. So let's rename it to libfrr.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Turn off the building of pimd in cmaster-next.
Ticket: CM-12015
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Add pimd to the log rotate script so that the USR1 signal
can be sent to pimd to tell it to rotate the log.
Ticket: CM-11253
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit does two things:
1) Fixes package name to have ...+cl3u1
2) Allows the build to determine if we are building
a debian package on a init.d or systemd style system
and to do the right thing.
3) Fixed quagga service file naming
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
This commit fixes some quagga build issues such
that you can now use -j in your sbuild line.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Jon Toppins <toppins@cumulusnetworks.com>
We want the ability to start up quagga in a varied set of
environments. This needs to be done in SysV and systemd
startups. As such refactor the code to allow us to
allow end users to easily switch between the two
sysV:
edit the /etc/quagga/daemons file
service quagga [start|stop|reload|restart]
Systemd:
edit the /etc/quagga/daemons file
systemctl [start|stop|reload|restart] quagga
Ticket: CM-10634
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
We've decided to remove /usr/bin/quagga from
the quagga packaging. It was only going
to confuse the end user.
Ticket: CM-10456
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
The creation of the quagga user was not the only place
to add the quagga user to the quaggavty group. If
we are reinstalling quagga over a old version of
code then we need to check to see if the quagga
user is in the quaggavty and do the right thing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
The quagga user was not being added to the quaggavty group.
Modify the user creation to add this step.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Add the ability to call 'systemctl reload <daemon>'.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Create the man page for the quagga systemctl script.
Ticket: CM-9748
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Fix the install location of the quagga script
to /usr/bin/quagga.
Additionally reset restart controls to a more
normal level in the service files.
Ticket: CM-9492
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
The daemons file is no longer needed as well as the debian.conf
file. They have been subsumed by the systemd initialization
methodology.
Ticket: CM-9581
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
The <daemon>.pid and <daemon>.vty files were not being
removed on shutdown. This was causing issues w/
logrotate becaue it depends on pid files being correct
about what is running in order to not error out.
Fixed some additional debugs accidently left in the quagga
script.
Ticket: CM-9293
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Remove quagga.service, it was a bad idea culminating in a
series of mistakes.
Replaced with /usr/lib/quagga/quagga script.
Use this script to start/stop quagga as a whole.
Ticket: CM-9445
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
There exist cases where Cumulus Code( in this case code surrounding
when we want to send Router Advertisements ) should only be
turned on for Cumulus Switches.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
The ability to restart was just restarting all daemons.
Modify code so that only daemons running *or* enabled are
started.
Ticket: CM-9384
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Address some start/stop issues that Dave has pointed out, in addition add
the ability to work with multi-instance ospf.
Ticket: CM-9298
Reviewed-by: Dave Olson
Testing: By hand and passed to Atul for further testing
Add the ability to issue 'systemctl reload quagga'
and for it to reload the quagga configuration.
Ticket: CM-9286
Reviewed-by: Daniel Walton
Testing: Manual
Modify quagga startup control files to allow
for temporary startup while we iron out the
network.target details
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket:
Reviewed By: inprogress
Testing Done: minimal. Built, installed, started a few services.
This is in progress testing. quagga.service tries to start and stop
all the routing daemons. There is no check for whether they are enabled
via /etc/quagga/daemons (yet).
As installed, nothing is enabled (won't start on system boot or install).
The -A 127.0.0.1 is now in /etc/default/quagga, and picked up from there
by all routing daemons.
MAX_FDS is in all the service files for now as LimitNOFILE. Users who
need to modified the number of fd's will use e.g.
the file /etc/systemd/system/bgpd.service.d/maxfds.conf to override
bgpd.service contents
[Service]
LimitNOFILE=2048
MAX_INSTANCES isn't implemented yet.
reload isn't implemented yet (it should be possible via ExecReload
in the services, just not done yet).
The init.d file is removed.
All of the daemons are started without the -d/--daemonize option, and
use Type=simple rather than forking in the services file, to use the
systemd daemonizing.
All the daemons were set to have a 1m start time, and restart up to 3
times in 3 minutes, and for now, are only restart on-abnormal, not always
(we'll likely want the latter, but testing is easier with abnormal).
Also use tmpfiles.d to create /run/quagga
For now, we leave dh_installinit, even though it creates unneeded
update-rc.d calls, and causes lintian complaints about init.d files
that aren't present, so that it installs files like etc/default/quagga.
It also runs the tmpfiles.d commands for us, so we need to add those to
postinst if we dummy it out to fix the update-rc.d lines being added
(and lintian complaints).
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
During the upgrade process of quagga, the user is asked
if they would like to stop quagga. There is no point in
asking this question. The fact that you are upgrading
means you are willing for a service interruption.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
The cl-utilities dependency were causing issues in two situations:
A) The cl-utilities package name has been changed but the quagga
cmaster branch was being built on two different branches, one
with the old name, one with the new name
B) People installing quagga on non-cumulus switches were experiencing
issues due to cl-utilities not being installed. This was especially
true if they built quagga from our source code. We only need
cl-utilities for the startt-stop-daemon wrapper so that we could
have jdoo watch watchquagga. This is not a big deal if people are
missing this.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Modify the build type from patch to git
Fix the rules: spaces to tabs these were causing build issues
Add some additional dependent packages
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Alex Doyle <adoyle@cumulusnetworks.com>
Ticket: CM-7132
Reviewed By: CCR-3461
Testing Done: the usual
Today, 'service quagga status' merely sets the return code and nothing
more. Like other services, it'd be good to print some useful output as
well.
Example output:
cumulus@top1$ sudo service quagga status ospfd
[ ok ] ospfd-1 is running.
[ ok ] ospfd-2 is running.
cumulus@top1$ sudo service quagga status
[ ok ] zebra is running.
[ ok ] ospfd-1 is running.
[ ok ] ospfd-2 is running.
[ ok ] ospf6d is running.
cumulus@top1$ sudo service quagga status
[ ok ] zebra is running.
[ ok ] ospfd-1 is running.
[FAIL] ospfd-2 is not running ... failed!
[ ok ] ospf6d is running.
cumulus@top1$ echo $?
1
cumulus@top1$
Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Watchquagga: In phased restart with zebra, invoke restart all when zebra dies
To correctly handle starting and stopping of individual daemons not affecting
watchquagga's monitoring, we resorted to fixing up watchquagga's daemon watch
list every time a daemon was started or stopped. This was done by restarting
watchquagga itself. This meant the handling of phased restart of individual
daemons was broken in watchquagga as it attempted to stop daemons individually
before starting them all individually. Fix this by restarting all when this
happens. This does make mode 4 indistinguishable from mode 1, but I don't
understood the point of mode 4 and we don't think users change watchquagga
modes.
Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
Modified debian/control file to list as a dependency the cl-utilities package
as the cl-utilities package provides start-stop-monitor which is needed by
quagga to be monitored correctly.
Setup default number of filedescriptors allowed in quagga defaults and ulimit calls
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
Add support for service quagga status.
As per LSB initscript status code definitions, support is added for
querying status of quagga. All daemons supposed to have been enabled, will
be checked as running and if any one of them is found to be not running, the
appropriate status code is returned.
Note that if watchquagga is running, a status indicating a problem maybe a
trasient problem because watchquagga will start back an unresponsive or dead
process.
http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
init.d: Add reload option
Add an option to apply only modifications to running configuration from the
specified configuration file. The default modification file is
/etc/quagga/Quagga.conf. A new script, quagga-reload.py, has been added to
the tools directory.
Support Multi-Instance protocol daemons initd
OSPFd is the first of the multi-instance daemons. This patch allows the
starting, stopping, restarting and monitoring of multiple instances of
the same protocol daemon.
Multiple instances are specified in the daemons file using a new variable:
ospfd_instances="1,2"
Absence of this variable means ospfd will start in legacy, single instance
mode. The original "ospfd=yes" line is still required.
Daemons are started with the "-n <instance>" option. Each daemon is named
"<daemon>-<instance>", for example "ospfd-1", "ospfd-2" etc. Similarly,
pid files are ospfd-1.pid and vty files are named ospfd-1.vty.
We're also introducing a new file, /etc/default/quagga to store the
default value for the maximum instances associated with a daemon.
watchquagga and others are unmodified and everything else just works once
this code is in place.
The code has been enhanced to support restarting watchquagga with only the
updated daemons when an individual daemon is stopped or started. For example,
without this patch, stopping just bgpd would terminate watchquagga even if
ospfd and zebra are still running. Similarly, starting just bgpd when ospfd
and zebra are running wouldn't update watchquagga to include bgpd. Furthermore,
when the daemons file is modified and a daemon is no longer deemed necessary
and quagga restarted, the daemon is not killed. For example, switching
ospfd=yes to ospfd=no and restarting the quagga will leave ospfd daemon
running. This case is also fixed with this patch.
However, adding a new instance to the ospfd_instances file and starting
just that instance will start just that instance and add it to watchquagga.
Similarly, a single instance maybe stopped or restarted.
Caveat emptor: With multi-instance daemons, stopping a single instance and then
starting a different instance will cause all instances to be monitored by
watchquagga i.e. all instances will be restarted, if necessary.
Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
Avoid cleaning up the source tree and running reconf every time. Allows
recompilation of only those files that have been modified since last
run. Relies on the existence of config.status file to decide if we've
run the first time or subsequent times.
The building of quagga.pdf requires the convert program out of the imagemagick
package. Getting this to run correctly in the scratchbox2 environment is
painful. Conditionally generate documentation during native compilation.