-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fix unreadable output in upgrade log #1323
Conversation
This commit resolves an issue where unwanted escape sequences (e.g., ANSI codes) appear in the output of certain commands like `dnf` during upgrades. The issue arises because, starting with version 242, `systemd-nspawn` introduced new pseudo-TTY capabilities (see the `Input/Output Options` section in `systemd-nspawn(1)`). As a result, commands run within container may include these escape sequences. To address this, pseudo-TTY support is explicitly disabled in `systemd-nspawn` for upgrades on RHEL9 and later. JIRA: RHEL-69829
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build.
Note that first time contributors cannot run tests automatically - they need to be started by a reviewer. It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported,
See other labels for particular jobs defined in the Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please contact leapp-infra. |
Also note that there is a warning in the man page for using
Is this applicable to us? |
Another consideration, this issue will arise on any system with |
@dkubek great job! Checking the system version is ok. Systemd will not be rebased in RHEL 8 and we are sure that RHEL 9 will not contain any older systemd version. Staying with the system version check is ok from this POV. Let's keep it simple. |
hmm.. not sure I understand it right. As far as I understand this, it should not affect us as we consider the container fully trusted as we created them and we know what we are executing. The question could be what if a user create custom actor calling custom / third party apps. But that is not different from the situation when we would like to operate without container at all and we use the container just to be able to affect the host system using tooling from the target OS. If someone is able to put malign content into the container, why they would need to escape from it when they could affect the system from inside already? |
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.
lgtm and works as expected \o/ (tested manually). good job!
This commit resolves an issue where unwanted escape sequences (e.g., ANSI codes) appear in the output of certain commands like
dnf
during upgrades.The issue seems to arise because, starting with version 242,
systemd-nspawn
introduced new pseudo-TTY capabilities (see theInput/Output Options
section insystemd-nspawn(1)
). As a result, commands run within container may include these escape sequences.To address this, pseudo-TTY support is explicitly disabled in
systemd-nspawn
for upgrades on RHEL9 and later.JIRA: RHEL-69829