Skip to content

profile: filter out bullet point when parsing failed units#16

Merged
pothos merged 1 commit intoflatcar-masterfrom
kai/motd-list-failed-services
Feb 1, 2021
Merged

profile: filter out bullet point when parsing failed units#16
pothos merged 1 commit intoflatcar-masterfrom
kai/motd-list-failed-services

Conversation

@pothos
Copy link
Copy Markdown
Member

@pothos pothos commented Jan 29, 2021

The output of "systemctl list-units --state=failed --no-legend" still
contains the bullet point which is not expected and ends up being taken
as the unit name which was previously on the start of the line.
Filter the bullet point out to stay compatible with the old behavior in
case upstream would remove the bullet point again.

How to use

Log in to a system with a failed unit and see that now the unit name is printed while before it was just

Failed Units: 1
  ●

Testing done

I manually ran the fixed version of the profile script to see that they now print the unit name as before

$ source fixed-flatcar-profile.sh 
Failed Units: 1
  tcsd.service

The output of "systemctl list-units --state=failed --no-legend" still
contains the bullet point which is not expected and ends up being taken
as the unit name which was previously on the start of the line.
Filter the bullet point out to stay compatible with the old behavior in
case upstream would remove the bullet point again.
@pothos pothos requested a review from a team January 29, 2021 18:48
Copy link
Copy Markdown

@margamanterola margamanterola left a comment

Choose a reason for hiding this comment

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

LGTM. I don't like this text parsing thing, but if we are doing it, we should do it right.

@pothos pothos merged commit 003645f into flatcar-master Feb 1, 2021
@pothos pothos deleted the kai/motd-list-failed-services branch February 1, 2021 12:00
pothos added a commit that referenced this pull request Feb 1, 2021
profile: filter out bullet point when parsing failed units
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 1, 2021
This pulls in
flatcar/baselayout#16
to fix parsing of failed units shown as motd.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 1, 2021
This pulls in
flatcar/baselayout#16
to fix parsing of failed units shown as motd.
@pothos
Copy link
Copy Markdown
Member Author

pothos commented Feb 1, 2021

Picked for the flatcar-2605-2705 baselayout branch

pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 1, 2021
This pulls in
flatcar/baselayout#16
to fix parsing of failed units shown as motd.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 1, 2021
This pulls in
flatcar/baselayout#16
to fix parsing of failed units shown as motd.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Mar 1, 2021
This pulls in
flatcar/baselayout#16
to fix parsing of failed units shown as motd.
@margamanterola
Copy link
Copy Markdown

Our latest stable version (2765) doesn't seem to have this fix :-/

pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Jun 1, 2021
…s for flatcar-2765

The output of "systemctl list-units --state=failed --no-legend" still
contains the bullet point which is not expected and ends up being taken
as the unit name which was previously on the start of the line.
Filter the bullet point out to stay compatible with the old behavior in
case upstream would remove the bullet point again.

This pulls in
flatcar/baselayout#16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants