Skip to content

fix: remove progress and control codes from log output #4699

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aarongorka
Copy link

@aarongorka aarongorka commented Aug 11, 2025

This commit removes some not very useful output from the /var/log/user-data.log output that looks like this:

1 file(s) remaining ^MCompleted 6.2 MiB/214.5 MiB (22.3 MiB/s) with 1
file(s) remaining ^MCompleted 6.5 MiB/214.5 MiB (23.1 MiB/s) with 1
file(s) remaining ^MCompleted 6.8 MiB/214.5 MiB (23.9 MiB/s) with 1
file(s) remaining

This goes on for potentially several screens worth of log output.

It also removes a similar progress bar output from the IMDS token fetching, and as a bonus side effect, prevents the token itself from being persisted to the logs.

Finally, quotes are added around some of the values returned by curl to prevent bash from splitting it if there's whitespace in the return value and subsequent unintentional behaviour.

This commit removes some not very useful output from the
`/var/log/user-data.log` output that looks like this:

```
1 file(s) remaining ^MCompleted 6.2 MiB/214.5 MiB (22.3 MiB/s) with 1
file(s) remaining ^MCompleted 6.5 MiB/214.5 MiB (23.1 MiB/s) with 1
file(s) remaining ^MCompleted 6.8 MiB/214.5 MiB (23.9 MiB/s) with 1
file(s) remaining
```

This goes on for potentially several screens worth of log output.

It also similar progress bar output from the IMDS token fetching, and as
a bonus side effect, prevents the token itself from being persisted to the
logs.

Finally, quotes are added around some of the values returned by curl to
prevent bash from splitting it if there's whitespace in the return
value and subsequent unintentional behaviour.
@aarongorka aarongorka requested a review from a team as a code owner August 11, 2025 04:19
@aarongorka
Copy link
Author

Screenshot 2025-08-11 at 2 03 45 pm

@aarongorka
Copy link
Author

Also, there's a number of other shellcheck violations in this file (which is odd because there is a # shellcheck shell=bash at the top?), but I wasn't sure if it'd be appropriate to fix them in this PR - happy to add them in if it's acceptable.

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.

1 participant