Page MenuHomeVyOS Platform

Failed to delete vrrp transition-script
Closed, InvalidPublic

Description

"VRRP scripts" can be deleted after a reboot and if the script was not run on VYOS.
Scripts cannot be removed after several VRRP switches:

vyos@Slave:~$ show configuration commands | match scripts
set high-availability vrrp group Router transition-script backup '/config/scripts/vrrp-slave.sh'
set high-availability vrrp group Router transition-script fault '/config/scripts/vrrp-master.sh'
set high-availability vrrp group Router transition-script master '/config/scripts/vrrp-master.sh'

vyos@Slave# delete high-availability vrrp group Router transition-script
Failed to delete specified config path
Delete failed

vyos@Slave# delete high-availability vrrp group Router transition-script backup
Failed to delete specified config path
Delete failed

vyos@Slave# delete high-availability vrrp group Router transition-script backup /config/scripts/vrrp-slave.sh
Failed to delete specified config path
Delete failed

Version: VyOS 1.3.0
Release train: equuleus
Built on: Sun 19 Dec 2021 12:59 UTC
Hardware vendor: QEMU

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3.0 Sun 19 Dec 2021 12:59 UTC
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

m.korobeinikov created this task.
m.korobeinikov created this object in space S1 VyOS Public.
m.korobeinikov added a subscriber: Unknown Object (User).Feb 15 2022, 1:19 AM

@n.fort
I ve added this code in to the scrip and the issue resolved.
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
fi

vyos@Slave-RTR:~$ sudo cat /config/scripts/vrrp-slave.sh
#!/bin/vbash
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
  exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
fi
source /opt/vyatta/etc/functions/script-template
configure
set interfaces bonding bond5 disable
commit
exit

vyos@Slave-RTR:~$
vyos@Slave-RTR:~$ conf
[edit]
vyos@Slave-RTR# delete high-availability vrrp group Router transition-script
[edit]

The command was executed without any mistake.

m.korobeinikov changed the task status from Open to Needs testing.Apr 4 2022, 1:37 AM

Great.
In that case I suggest marking this invalid and close it