From e89b0ee276b668295e9915b63b95d4f7150a1437 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 10 Jan 2022 19:14:55 -0800 Subject: [PATCH] container: Avoid a warning that interactive mode is intended Currently, with recent version of systemd on host machine, running './container up' results in the following warning thrown many times. Fix this. Console mode 'pipe' selected, but standard input/output are connected to an interactive TTY. Most likely you want to use 'interactive' console mode for proper interactivity and shell job control. Proceeding anyway. Tests: - With systemd version 248 on host machine, run './container up' and notice that warning is no longer printed. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- container | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/container b/container index 48194ac26..95ede7667 100755 --- a/container +++ b/container @@ -551,7 +551,12 @@ def _resize_disk_image(image_file, new_size): def _get_nspawn_command(image_file): """Return the base nspwan command.""" - pipe_argument = ['--pipe'] if systemd_version > 241 else [] + pipe_argument = [] + if systemd_version >= 247: + pipe_argument = ['--console=autopipe'] + elif systemd_version > 241: + pipe_argument = ['--console=pipe'] + return [ 'sudo', 'systemd-nspawn',