Is the task scheduler still working?


#1

Running 1.2 RC4. Is the task scheduler still working? i’m trying to shut down interfaces on boot for 10 minutes and then enable them. this is to prevent the routes leaking to BGP peers because filters don’t work for the first few minutes.

I have:

set system task-scheduler task ShtdownInterfaceOnBoot crontab-spec ‘@reboot
set system task-scheduler task ShtdownInterfaceOnBoot executable path ‘/opt/vyatta/etc/config/scripts/BootInterfaceShutdown.script’

and the script itself is:

#!/bin/sh

sudo ifconfig eth15 down
sudo ifconfig eth6 down
sudo ifconfig eth13 down

but this is not running on boot. any ideas?

thank you


#3

Execution works as far as I have tested. Could it be something with your script? FRR won’t do anything if your interfaces are down, so I doubt that your plan with the scripts will work. Or does it load the map and when you activate the interface the map is active? I gotta set some time aside to check that.


#4

I’ve been logging in real fast and running a sudo ifconfig eth15 down

FRR still loads but can’t connect. even with the bgp sessions shutdown, it still seems to connect until the ‘shutdown’ is loaded. problem is the route maps don’t load either and so it leaks our entire routing table to the peer.

so what I’m trying to do is on boot shut the interfaces down for a few min till FRR can fully load, then bring htem up.

ideas?

this is not working. not even running.

set system task-scheduler task ShtdownInterfaceOnBoot crontab-spec ‘@reboot
set system task-scheduler task ShtdownInterfaceOnBoot executable path ‘/opt/vyatta/etc/config/scripts/interfaceshutdown.script’

and the file /opt/vyatta/etc/config/scripts/interfaceshutdown.script:

#!/bin/sh

sleep 300
ifconfig eth15 down
ifconfig eth6 down
ifconfig eth13 down

but again, it’s not doing anything. errr

thank you


#5

Hi, @BarrySDCA!
Actually, script is working, but for some reason “ifconfig” won’t change configuration. I propose don’t finding reasons for this, because anyway ifconfig is obsolete way to change interface settings. Use “ip” instead. Works perfectly for your task:

#!/bin/bash

sleep 30s
ip l set eth2 down

Interface state after script running:

vyos@vyos:~$ show interfaces 
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             10.0.2.5/24                       u/u  
eth1             192.168.20.60/24                  u/u  
eth2             192.168.202.1/24                  A/D  
lo               127.0.0.1/8                       u/u  
                 ::1/128
vyos@vyos:~$ 

#6

that works. thank you very much!!


#7

@BarrySDCA I think I’ve fixed the BGP script bug that was giving you troubles. See https://phabricator.vyos.net/T944

If you want to test even before we make rc5, I can give you a custom package.


#8

I can test it on Saturday no problem. getting too close to the end of our maintenance window now.

the bug btw happens on the way up or down if that helps.

but sure happy to test it on Saturday.

thank you much


#9

I scheduled the test for Saturday morning if you can get me an ISO…

thanks much