Page MenuHomeVyOS Platform

Python environment lacks definition of vyos_libexec_dir when calling os.system()
Resolved (N/A)PublicBUG


Rewriting the SNMP configuration as XML/Python requires that the running VyOS configuration is altered by the python script. This is aweful.

The reason is that if a user specifies a plaintext password it will be converted to an encrypted one during SNMP startup. Later this encrypted pasword is re-read and set as encrypted-key in the running config whereas the plaintext-key node is deleted.


os.system('/opt/vyatta/sbin/my_delete service snmp v3 user "nms" auth plaintext-key')

Resulted in:

sh: / No such file or directory

The available environment has been extracted using os.system('env')

image.png (963×948 px, 108 KB)

The current workaround in is more than ugly (definition of the environment variable before calling the script)


Difficulty level
Hard (possibly days)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Event Timeline

dmbaturin added a subscriber: dmbaturin.

@c-po You've found a workaround, right?

Yes, just pass the variable on calls to os.system()

@dmbaturin the "workaround" and implementation is IMHO super bad ( as it uses /opt/vyatta/sbin/my_set or /opt/vyatta/sbin/my_delete.

Can't we use vyos.configtree in a Python script to replace those bad shell calls? I think this would be the best solution!

In other words, does vyos.configtree support the effective configuration?

syncer changed the task status from Open to In progress.Feb 8 2019, 12:03 AM
syncer assigned this task to dmbaturin.
syncer raised the priority of this task from Low to Normal.
zsdc changed Difficulty level from Unknown (require assessment) to Hard (possibly days).Mar 11 2021, 2:19 PM
zsdc set Is it a breaking change? to Unspecified (possibly destroys the router).
dmbaturin changed the task status from Resolved to Resolved N/A.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.Sep 3 2021, 12:01 PM
dmbaturin set Issue type to Internal change (not visible to end users).