Page MenuHomeVyOS Platform

Make vyos-configd relay stdout from scripts to the user's console
Closed, ResolvedPublic

Description

The vyos-configd client, vyshim, doesn't relay the stdout/stderr from scripts to the user's console. This is problematic because many scripts have used printing for displaying warnings or debug information.

We need to make sure everything scripts want to tell reaches the user who initiated the commit.

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Internal change (not visible to end users)

Event Timeline

dmbaturin triaged this task as Urgent! priority.
jestabro changed the task status from Open to In progress.Feb 17 2021, 2:06 AM

Currently, vyos-configd will explicitly report ConfigError to the console; however, non-fatal warnings or information will not be reported. An example of a non-fatal warning is:

https://github.com/vyos/vyos-1x/blob/current/src/conf_mode/service_pppoe-server.py#L63

Using the context managers redirect_stdout and redirect_stderr from contextlib allows a simple resolution. A link to this approach in testing is below.

One open issue is the absence of the component path, for example [ service pppoe-server ], in non-fatal warnings. This output is prepended by the backend, on interception of stdout, and has caused inconsistencies in the past, unrelated to vyos-configd --- cf. T2347.

Version in testing:
https://github.com/vyos/vyos-1x/compare/current...jestabro:T3302

jestabro moved this task from Open to Finished on the VyOS 1.4 Sagitta board.
jestabro moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus board.

If commit is not initiated from a 'live' session (for example, on boot), then redirected stdout/err should go to a file.

jestabro changed the task status from Resolved to Unknown Status.May 12 2021, 3:56 PM
jestabro added a project: VyOS 1.3 Equuleus.

This task was superseded by T3411, hence was not backported; however that missed the bug fix in the final commit. cherry-pick eeb9687.

jestabro changed the task status from Unknown Status to Resolved.May 12 2021, 5:09 PM
jestabro moved this task from In Progress to Finished on the VyOS 1.3 Equuleus board.
SrividyaA set Issue type to Internal change (not visible to end users).Aug 31 2021, 11:17 AM