Zypper hangs on dialogs / issues due to open tty
There's a few places where we're calling zypper.
Zypper notices that there's an open tty and runs in interactive mode.
The result is when you have unavailable repositories or key issues (i.e. nightly rudder repos) or anything else that could use manual input, zypper will stop with the relevant dialog.
i.e. in cfengine stdlib:
$ grep -R "zypper pat" *
initial-promises/node-server/common/1.0/cfengine_stdlib.cf: package_patch_list_command => "/usr/bin/zypper patches";
initial-promises/node-server/common/1.0/cfengine_stdlib.cf: package_patch_list_command => "/usr/bin/zypper patches"
same goes with most of the other techniques.
There is a --non-interactive flag, which (great) comes with safe defaults; this could be easily used, otherwise one could also try closing the tty.
#1 Updated by Nicolas CHARLES over 3 years ago
- Status changed from New to Discussion
- Assignee set to Florian Heigl
The Technique rpmPackageInstallation alreay uses --non-interactive parameter, as well as ncf
In the initial promises, we are using the package_method generic, that also uses --non-interactive
Do you have specific example where we use zypper in non-interactive mode ?
Just as a remark, we don't use most of the bundles in the cfengine standart librairy; they are there, but we just don't need them
#27 Updated by Alexis MOUSSET 9 months ago
- In package_install/remove/check we use the ncf_generic* bundles which are fixed by this PR
- In the technique and package_present/absent we use the zypper package module wich already has the non-interactive option
- In the deprecated technique we already have non-interactive option