-
Notifications
You must be signed in to change notification settings - Fork 1.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
lxc_container: fix lxc argument when executing lxc command #5659
lxc_container: fix lxc argument when executing lxc command #5659
Conversation
shipit! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Can you please add a changelog fragment? Thanks.
lxc_container fails when executing the lxc command (e.g. when creating a new container) because PR#5358 broke the module argument parsing. The resulting argument dict contained only the module argument name and the argument flag but not the value. E.g. ``` - lxc_container: template: debian ``` would result in lxc command arguments `lxc template --template` instead of `lxc --template debian`. Fixes: 6f88426 ("lxc_container: minor refactor (ansible-collections#5358)") Fixes ansible-collections#5578 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
c41dce0
to
f6f8ce0
Compare
Done. |
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #5697 🤖 @patchback |
lxc_container fails when executing the lxc command (e.g. when creating a new container) because PR#5358 broke the module argument parsing. The resulting argument dict contained only the module argument name and the argument flag but not the value. E.g. ``` - lxc_container: template: debian ``` would result in lxc command arguments `lxc template --template` instead of `lxc --template debian`. Fixes: 6f88426 ("lxc_container: minor refactor (#5358)") Fixes #5578 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Alexander Couzens <lynxis@fe80.eu> (cherry picked from commit af53271)
@lynxis thanks for fixing this! |
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #5698 🤖 @patchback |
lxc_container fails when executing the lxc command (e.g. when creating a new container) because PR#5358 broke the module argument parsing. The resulting argument dict contained only the module argument name and the argument flag but not the value. E.g. ``` - lxc_container: template: debian ``` would result in lxc command arguments `lxc template --template` instead of `lxc --template debian`. Fixes: 6f88426 ("lxc_container: minor refactor (#5358)") Fixes #5578 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Alexander Couzens <lynxis@fe80.eu> (cherry picked from commit af53271)
…t when executing lxc command (#5697) lxc_container: fix lxc argument when executing lxc command (#5659) lxc_container fails when executing the lxc command (e.g. when creating a new container) because PR#5358 broke the module argument parsing. The resulting argument dict contained only the module argument name and the argument flag but not the value. E.g. ``` - lxc_container: template: debian ``` would result in lxc command arguments `lxc template --template` instead of `lxc --template debian`. Fixes: 6f88426 ("lxc_container: minor refactor (#5358)") Fixes #5578 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Alexander Couzens <lynxis@fe80.eu> (cherry picked from commit af53271) Co-authored-by: Alexander Couzens <lynxis@fe80.eu>
…t when executing lxc command (#5698) lxc_container: fix lxc argument when executing lxc command (#5659) lxc_container fails when executing the lxc command (e.g. when creating a new container) because PR#5358 broke the module argument parsing. The resulting argument dict contained only the module argument name and the argument flag but not the value. E.g. ``` - lxc_container: template: debian ``` would result in lxc command arguments `lxc template --template` instead of `lxc --template debian`. Fixes: 6f88426 ("lxc_container: minor refactor (#5358)") Fixes #5578 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Alexander Couzens <lynxis@fe80.eu> (cherry picked from commit af53271) Co-authored-by: Alexander Couzens <lynxis@fe80.eu>
SUMMARY
lxc_container fails when executing the lxc command (e.g. when creating a new container) because PR #5358 broke the module argument parsing. The resulting argument dict contained only the module argument name and the argument flag but not the value. E.g.
would result in the lxc command:
lxc template --template
(current result)lxc --template debian
(while this is the correct line)Fixes: 6f88426 ("lxc_container: minor refactor (#5358)")
Fixes #5578
CC: @russoz
ISSUE TYPE
COMPONENT NAME
lxc_container
ADDITIONAL INFORMATION
To reproduce the issue create a container which doesn't exist before:
will execute
/usr/bin/lxc-create --name some --quiet template --template backing_store --bdev -- --dist debian --release bullseye --arch amd64
correct would be
/usr/bin/lxc-create --name some --quiet --template template --bdev dir -- --dist debian --release bullseye --arch amd64