Page MenuHomeVyOS Platform

Make it possible to pass custom arguments to VRRP transition scripts
Closed, ResolvedPublic

Description

The old VRRP had an undocumented feature: it was possible to pass custom arguments to transition scripts. Like this:

set ... vrrp vrrp-group 10 run-transition-scripts master "/config/scripts/master.sh FOO BAR BAZ"

It was never documented or intended, but it was possible because the script was executed by shelling out, and the script option string was passed verbatim.

Switching to executing those scripts with exec() (rather, subprocess.call()) broke that.

It does seem useful though, so we perhaps should switch back to shelling out (not a big issue for scripts that use predefined arguments and rarely run), and make the script path validator capable of validating scripts with arguments by splitting the string at the first space and assuming that the first part is the script file and the rest is arguments.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

dmbaturin created this task.
dmbaturin created this object with visibility "Public (No Login Required)".