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>
fi
}
+ifup_mgmt () {
+ ifaces=$(ifquery --list --allow=mgmt 2>/dev/null)
+ if [ -n "$ifaces" ]; then
+ echo "bringing up mgmt class interfaces"
+ ifup --allow=mgmt
+ fi
+}
+
ifupdown_init() {
# remove state file at boot
[ ! -e ${IFSTATE_LOCKFILE} ] && rm -f ${IFSTATE_FILE}
exclusions=$(process_exclusions)
perfoptions=$(perf_options)
echo ${NAME}':' "Configuring network interfaces"
+ ifup_mgmt
ifup -a $EXTRA_ARGS $exclusions $perfoptions
;;
-
stop)
if [ "$SKIP_DOWN_AT_SYSRESET" = "yes" ]; then
SYSRESET=0