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]
vyos@vyos# 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]
vyos@vyos# show system task-scheduler
task testtask01 {
crontab-spec @reboot
executable {
path /config/scripts/testscript01.script
}
}
[edit]
vyos@vyos#Script content:
root@vyos:/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]
vyos@vyos# 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]
vyos@vyos#
vyos@vyos# exit
exit
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 u/u
lo 127.0.0.1/8 u/u
::1/128
vyos@vyos:~$So, script is working. But, now if we try to change configuration:
[edit] vyos@vyos# set system host-name test01 Set failed [edit] vyos@vyos# set interfaces ethernet eth1 speed 100 Set failed [edit] vyos@vyos# set firewall name test1 default-action drop Set failed [edit] vyos@vyos#
... and so on. Configuration management become completely broken until we disable script and reboot.