Skip to content

feat(nodeadm): add console logging support to nodeadm#2620

Merged
fletcherw merged 1 commit intoawslabs:mainfrom
chenwng:console-log
Feb 23, 2026
Merged

feat(nodeadm): add console logging support to nodeadm#2620
fletcherw merged 1 commit intoawslabs:mainfrom
chenwng:console-log

Conversation

@chenwng
Copy link
Copy Markdown
Contributor

@chenwng chenwng commented Feb 9, 2026

Issue #, if available:

N/A

Description of changes:

This PR adds a global flag --console to enable sending nodeadm logs to the node console. This helps troubleshoot node not joining cluster issues and the access to node is limited. The global flag --console defaults to false to be backward compatible.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

@fletcherw
Copy link
Copy Markdown
Contributor

Hello! This is an interesting change, but I'm not sure we want to enable this by default. Can you say more about your issues with "This helps troubleshoot node not joining cluster issues and the access to node is limited." Do you have nodes where SSM or SSH access are not possible?

Copy link
Copy Markdown
Contributor

@fletcherw fletcherw left a comment

Choose a reason for hiding this comment

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

After further discussion, I think we're actually good to do this via systemd, that way the log output sent to the console is timestamped and has the systemd unit name like so:

[    7.468759] cloud-init[2247]: Cloud-init v. 22.2.2 running 'modules:config' at Thu, 19 Feb 2026 20:17:38 +0000. Up 7.41 seconds.
[    8.005622] cloud-init[2260]: Cloud-init v. 22.2.2 running 'modules:final' at Thu, 19 Feb 2026 20:17:39 +0000. Up 7.93 seconds.
[    8.065212] cloud-init[2260]: Cloud-init v. 22.2.2 finished at Thu, 19 Feb 2026 20:17:39 +0000. Datasource DataSourceEc2.  Up 8.05 seconds
[    8.181199] nodeadm[2261]: info init/init.go:55 Checking user is root..
[    8.182677] nodeadm[2261]: info init/init.go:65 Loading configuration.. {"configSource": ["imds://user-data", "file:///etc/eks/nodeadm.d/"], "configCache": "/run/eks/nodeadm/config.json"}
[    8.188546] nodeadm[2261]: warn configprovider/chain.go:30 Encountered error in config provider {"error": "no config found in directory"}
[    8.190862] nodeadm[2261]: info init/init.go:75 Setting up nodeadm environment aspect..

No need to modify the nodeadm logger code.

@chenwng
Copy link
Copy Markdown
Contributor Author

chenwng commented Feb 22, 2026

Thanks for the suggestion. I've updated the PR. Please help review it.

This helps troubleshoot node not joining cluster issues when the access
to node is limited.
@fletcherw
Copy link
Copy Markdown
Contributor

gosec failure is a false positive, proceeding to merge.

@fletcherw fletcherw merged commit 81b2cbf into awslabs:main Feb 23, 2026
11 of 12 checks passed
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