Page MenuHomeVyOS Platform

VRRP impossible to set scripts out of the /config directory
Closed, ResolvedPublicBUG

Description

VRRP impossible to set scripts out of the /config directory

vyos@r11-roll# set high-availability vrrp group FOO transition-script backup '/usr/bin/true'

  Warning: file /usr/bin/true is outside the "/config" directory
  It will not be automatically migrated to a new image on system update
  
  
  
  Invalid value
  Value validation failed
  Set failed

[edit]
vyos@r11-roll#
root@r11-roll:/home/vyos# /usr/libexec/vyos/validators/script /usr/bin/true
Warning: file /usr/bin/true is outside the "/config" directory
It will not be automatically migrated to a new image on system update
root@r11-roll:/home/vyos# 
root@r11-roll:/home/vyos# echo $?
1
root@r11-roll:/home/vyos#

It should be just a warning message with exit-code 0

As if was in 1.2

vyos@r12-lts# sudo whereis true
true: /bin/true /usr/share/man/man1/true.1.gz
[edit]
vyos@r12-lts# set high-availability vrrp group FOO transition-script master '/bin/true'

  Warning: file /bin/true is outside the /config directory
  It will not be automatically migrated to a new image on system update

[edit]
vyos@r12-lts# compare 
+high-availability {
+    vrrp {
+        group FOO {
+            interface eth1
+            transition-script {
+                master /bin/true
+            }
+            virtual-address 192.0.2.45/24
+            vrid 120
+        }
+    }
+}
[edit]
vyos@r12-lts#

And after rewriting it was changed https://github.com/vyos/vyos-1x/commit/3639a5610b590a64d6d56bee81dddd252994cfe5#diff-87ee33ff4bebeec3921219895213b6db1fb2a732c9aaa4715f5484c21007bfc8L46

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.4-rolling-202112030318, VyOS 1.3-beta-202112060443
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

Unknown Object (User) added a subscriber: Unknown Object (User).Dec 6 2021, 10:15 AM

I believe that CLI should protect a user and deny him to shoot in his leg. In any case, we cannot guarantee a successful update if the script will not be migrated

Viacheslav changed the task status from Open to Needs testing.Dec 6 2021, 4:59 PM
Viacheslav claimed this task.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus (1.3.0) board.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.