Ticket: CM-9881
Reviewed By: Roopa Prabhu
Testing Done: yes
This patch is the second version of drop ssh sessions
changes:
added try catch around os.setsid()
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
fixes the following:
- if the vrf slave had a master but is no longer a slave
according to ifaceobj, look at running state and
undo vrf enslavement
- add support to cl-vrf service disable <vrf>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This was bringing down vrf master earlier than required
leading to ssh session hangs in case of management vrf
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: CM-9881
Reviewed By: Roopa Prabhu
Testing Done: yes
***initial version ***
SSH clients will be closed to avoid the connection hang
when management VRF is enabled or disabled using a login through eth0
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
Ticket: CM-10016
Reviewed By:
Testing Done: Tested with the upperiface bring up case described in
CM-10016
upperiface bringup is best effort and does not imply that the current
interface bring up has an error. It only means that the upperiface may
be in an incomplete state. Hence this patch resets scheduler error state
before returning from upperiface bringup.
Ticket:
Reviewed By:
Testing Done: Tested vrf-table id with valid and invalid table ids
currently the reserved table id range is set to 1001-5000
and it comes from a policy file /var/lib/ifupdown2/policy.d/vrf.json
Ticket: CM-10005
Reviewed By:
Testing Done: Tested boot and ifreload after changes
- fix access to addr_method on an object which had no
address method defined. This was a recently introduced
regression that caused vrf enslavement to end per-matuarely.
- few fixes around vrf_table conversion between string
and integer
Ticket: CM-9993
Reviewed By: julien
Testing Done: Tested with interfaces file and steps described in the CM
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: CM-9995
Reviewed By: julien
Testing Done: Tested on amd64 hardnode
Right now, ifquery -r shows link speed, duplex and autoneg current running values.
This patch changes the behavior to not show link attributes unless they
differ then the defaults for that interface.
Ticket: CM-9975
Reviewed By: Roopa Prabhu
Testing Done: yes, by installing deb file onto dell-s3000-02
Avoid adding duplicate ipv6 fib rule when one is missing for IPv4
Ticket: CM-8658
Reviewed By: Roopa Prabhu, Scott Emery
Testing Done: Yes, by installing ifupdown .deb file onto cel-e1031-01
This patch includes a check for multicast bit of vrr virtual mac
address and set an error
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
Ticket: CM-9957
Reviewed By: dsa, julien, nikhil
Testing Done: Tested vrf enslave/deslave + ifreload
This patch fixes a few corner cases:
- release dhcp on all new enslavement or change of enslavement
- fix a NoneType error on ifreload when a vrf enslavement was removed
- handle a corner case with auto table ids
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: CM-7168
Reviewed By: julien, nikhil, stannous
Testing Done: Tested with errors in interfaces file
This patch changes a few errors to warns. and propagates errors
on ifaceobjects to upperlayers.
- any exception passed to upper layers (/sbin/ifupdown) results in
exit code of 1
- It uses a global SCHED flag to flag a scheduler error (maybe there is
a better way). But traversing all the interfaces again to check status
is an overkill
- Changes a few errors to warns
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: CM-9929
Reviewed By:
Testing Done: Tested vrf dhcp slave enslavement on ifreload
algo:
- when a vrf slave enslavement changes, before performing the
new master enslavement,
- check if vrf slave has dhcp configured
- if yes, release dhclient running on the vrf slave
Ticket: CM-9921
Reviewed By: trivial
Testing Done: Tested with table id auto for management vrf
I have recently added special handling for vrf slaves with dhcp.
And missed handling of vrf-table auto for such slaves.
This patch fixes auto when bringing up vrf masters for dhcp vrf
slaves
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
default
Ticket:
Reviewed By: CCR-4268 (previous review)
Testing Done: Tested ifup/ifdown/ifreload/ifquery of multiple iface stanzas for
same interface
This patch is an extension to previous commit 99ce689411.
The previous commit squashes both external (ifquery) and internal
(ifup/ifdown/ifreload) representation of multiple iface stanzas into
one and it is off by default.
What we really want is internal representation to be squashed by
default. To that effect this patch introduces a new config flag
ifaceobj_squash_internal to only squash internal representation which is
used by ifup/ifdown/ifreload. ifquery forces this flag to off so that
external representations remain unsquashed and user does not see any
difference. This flag is on by default.
User can still get a squashed external representation if he sets
ifaceobj_squash=1 in ifupdown2.conf
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: CM-9596
Reviewed By: Roopa Prabhu
Testing Done: Yes, by installing ifupdown2 deb onto cel-e1031-01
This patch makes sure ifupdown2 will not report a NoneType error
when VRF is defined but not used
Ticket: CM-6896
Reviewed By: CCR-4276
Testing Done:
host: sm-e1031-02
$ # > adding "hwaddress 02:01:02:03:04:08" to eth0 in /etc/network/interfaces
$ ifreload -a
$ ifup -v -a
$ ifdown -a -v
$ ifquery -c -a
$ reboot
$ # > analyze /var/log/syslog for boot error message
$ cat /var/log/syslog | grep ifupdown
I did the same process with "hwaddress ether 02:01:02:03:04:11"
also without the hwaddress statement.
Ticket: CM-9868
Reviewed By: dsa, nikhil, julien
Testing Done: tested with vrf slaves with dhcp
Problem:
since vrf slaves are brought up before master, When vrf slaves are
configured for dhcp, the dhclient hook for vrf runs before the master is
up. This was seen with management vrf.
This solution is special logic to handle vrf slaves with
dhcp in the vrf addon module.
currently only supports interface declared with dhcp and
indicated as vrf slave. as in example below (dhcp and vrf must be in the
same iface stanza):
auto eth0
iface eth0 inet dhcp
vrf mgmt
changes to vrf module:
- make vrf module methods accept the ifaceobj lookup function, which is
already passed as argument to all methods from ifupdown scheduler
- during vrf slave bringup,
- if master does not exist and slave's address_method is dhcp
- lookup master object, and bring up the vrf master
- mark this master as processed so that the next time this vrf
module sees master it knows that it is already processed
(this is covered by the vrfPrivFlags)
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This avoids 'No such file or directory' errors at bootup
when ifupdown2 is called from the init script
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This reverts commit bed653e31b.
Reverting commit because this does not do the right thing and also
prints 'NoneType' errors. We should not be changing anything for
running values. The ether check is only needed for configured values.
Ticket: CM-9773
Reviewed By: Roopa Prabhu
Testing Done: yes, by installing ifupdown .deb file onto cel-e1031-01
adding default route to ipv6 table when the attribute
vrf-default-route is set to yes
Ticket:
Reviewed By: trivial
Testing Done:
This patch adds WARNING to ifaceStatus and adds a new method
iface:set_status
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: CM-7938
Reviewed By: roopa
Testing Done: tested on amd64 cel-redxp box
If the user has not configured a link attribute,
we should not be checking it against the default config.
This will only confuse users into thinking link attributes
were configured.
Modifications to the ethtool.py addon module
to check of configs exist before checking them.