Page MenuHomeVyOS Platform

op-mode: "run generate pki wireguard key-pair install" returns error
Closed, ResolvedPublicBUG

Description

vyos@bpi-r4# run generate pki wireguard key-pair install interface wg0
Failed to install 1 value(s). Commands to manually install:
set interfaces wireguard wg0 private-key 'xxxxxx'
Corresponding public-key to use on peer system is: 'xxxxxx'

That's because when installing key-pair, env vyos_validators_dir is not set.
If I change the code below to cmd(f'vyos_validators_dir=/usr/libexec/vyos/validators /opt/vyatta/sbin/my_set {path}'), it will not return error.

https://github.com/vyos/vyos-1x/blob/25224cff345210aaecaa4db95a67bd759af666fb/python/vyos/utils/misc.py#L58

This command has sometimes worked normally and sometimes returned errors over the past year, I don't know the proper way to fix it.

Details

Version
2025.11.02-0021-rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav changed the subtype of this task from "Task" to "Bug".Tue, Nov 11, 4:04 AM
c-po renamed this task from `run generate pki wireguard key-pair install` returns error to op-mode: "run generate pki wireguard key-pair install" returns error.Tue, Nov 18, 3:11 PM