Skip to content

systemd: T7356: use short service names to avoid truncation #959

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

Merged
merged 1 commit into from
May 5, 2025

Conversation

c-po
Copy link
Member

@c-po c-po commented May 4, 2025

Change summary

By thinking about the issue again in another context I found the root cause - systemd. The issue ONLY appears on small terminals where systemd automatically truncates the lines to match the terminal width - so far so good. The BUG is, if truncation happens in the service name which is BOLD you're pretty much screwed, as truncation will not reset the color.

We can set StatusUnitFormat=name in /etc/systemd/system.conf which will not print the service long description to avoid truncation making the boot a little less verbose.

This is back to the roots - VyOS 1.3 only showed the service description but not the service name during system boot.

https://www.freedesktop.org/software/systemd/man/latest/systemd-system.conf.html#StatusUnitFormat=

Before:

image

After

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

The issue ONLY appears on small terminals where systemd automatically truncates
the lines to match the terminal width - so far so good. The BUG is, if
truncation happens in the service name which is BOLD you're pretty much
screwed, as truncation will not reset the color.

We can set StatusUnitFormat=description in /etc/systemd/system.conf which will
not print the service long description to avoid truncation making the boot a
little less verbose.

This actually restores the behavior of VyOS 1.3
Copy link

github-actions bot commented May 4, 2025

👍
No issues in PR Title / Commit Title

@github-actions github-actions bot added the current VyOS rolling release label May 4, 2025
@c-po c-po requested review from dmbaturin, zdc, jestabro and sever-sever May 4, 2025 21:54
@c-po c-po added bp/sagitta Create automatic backport for sagitta LTS version bp/circinus Create automatic backport for circinus labels May 4, 2025
Copy link
Contributor

@jestabro jestabro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A cleaner solution for T7356.

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cosmetic change, no objections.

@dmbaturin dmbaturin merged commit 16b82be into vyos:current May 5, 2025
7 checks passed
@github-actions github-actions bot added the mirror-initiated This PR initiated for mirror sync workflow label May 5, 2025
@vyosbot vyosbot added mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels May 5, 2025
@c-po c-po deleted the ansi-T7356 branch May 17, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bp/circinus Create automatic backport for circinus bp/sagitta Create automatic backport for sagitta LTS version current VyOS rolling release mirror-completed
Development

Successfully merging this pull request may close these issues.

4 participants