-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkgng provider on FreeBSD does not do BATCH=yes #27056
Comments
@oogali, thanks for the report. |
Any traction? This is preventing me from fully using salt-cloud to orchestrate hosts in Amazon EC2. |
Sorry for any inconvenience, but please read my last comment #29707 |
@abednarik Adding -y is not enough. -y simply tells pkg not to prompt to install the package, but has no effect on interactive post-install scripts. See my original report in which I have |
Thanks @oogali. In that case we also need ASSUME_ALWAYS_YES=YES is this correct? Cheers |
No, ASSUME_ALWAYS_YES is he same as the already present "-y". The script waits for an user input [y/n] without timeout (read -p). In my opinion the solution is to set a timeout in the postfix install script read loop, say 5min and then go on with proceeding the install script using the default "no" or in case the env. POSTFIX_DEFAULT_MTA=yes was found with "yes" as the answer. Another idea is to use additional "test -t" inside the postfix install script and detect this way if the package is installed without terminal... A workaround would be to install "/etc/mail/mailer.conf" with postfix as default before installing the postfix package (salt-cp or managed file) I suspect with a fixed fixed postfix install script, something like this will do the trick
Maybe someone has an insight if there is an salt specific environment variable that can be used for further decisions inside a script? Given the date I can only work next week on a good solution but I expect I can update the ports before next year. |
@ohauer I think the high-level solution of The See: |
It appears from the comments that this still needs a little bit of work. Removing the |
Ok. Thanks for that information. I can add a new optional param to set that env variable when running this module. |
Any update here? |
@abednarik, are you still able to work on this? |
HI I can have a look again. I'm using SaltStack in production under FreeBSD. In the next days will check this again. Thanks. |
Hello. Any news on this issue? |
I have this exact problem when installing First I tested using env vars and shell, with these results (using bash):
So it keeps waiting there for interaction, even when explicitly adding Next step is using
So using that the package gets installed. So for me working solution will be to force install using batch when you add 'Force=true' for example. I created PR #48730 with this fix. |
The pkgng provider on FreeBSD does not use the "BATCH=yes" environment setting when installing new packages.
This is problematic when installing packages that have an interactive post-install script (e.g. mail/postfix). The lack of the batch flag causes
pkg
to forever wait for a user response (which it will never receive), which in turn causes the minion to "hang".But, because the minion is still reachable by the master, your highstate never completes or times out, and you then have to log in, kill the minion child, manually install the package in question, and then restart your highstate run.
The text was updated successfully, but these errors were encountered: