Hi all!
If we change some configuration from script, then we can't do after this any changes manually until reboot system.
Example:
Startup configuration:
[edit] [email protected]# show interfaces ethernet eth2 address 192.168.202.1/24 disable duplex auto hw-id 08:00:27:2d:07:cb policy { route google } smp-affinity auto speed auto [edit] [email protected]# show system task-scheduler task testtask01 { crontab-spec @reboot executable { path /config/scripts/testscript01.script } } [edit] [email protected]#
Script content:
[email protected]:/home/vyos# cat /config/scripts/testscript01.script #!/bin/vbash source /opt/vyatta/etc/functions/script-template sleep 30s configure delete interfaces ethernet eth2 disable commit exit
Reboot, wait 30 seconds and check for configuration changes:
[edit] [email protected]# show interfaces ethernet eth2 address 192.168.202.1/24 duplex auto hw-id 08:00:27:2d:07:cb policy { route google } smp-affinity auto speed auto [edit] [email protected]# [email protected]# exit exit [email protected]:~$ 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 u/u lo 127.0.0.1/8 u/u ::1/128 [email protected]:~$
So, script is working. But, now if we try to change configuration:
[edit] [email protected]# set system host-name test01 Set failed [edit] [email protected]# set interfaces ethernet eth1 speed 100 Set failed [edit] [email protected]# set firewall name test1 default-action drop Set failed [edit] [email protected]#
... and so on. Configuration management become completely broken until we disable script and reboot.