Skip to content

fix(coreos-cloudinit): truncate hostnames #2806

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
Apr 10, 2025

Conversation

RiRa12621
Copy link
Contributor

truncate too long hostnames

Long hostnames can have unexpected consequences and this makes the truncation behavior explicit

This also cleans up existing truncating in AWS

How to use

A new node that uses cloud-init and has an overly long host name.

Technically the second case should never happen, because most cloud providers are attempting to block direct instance names longer than 63 chars, but rather safe than sorry.

Testing done

Test added for

  • always truncate on first .
  • truncate at 63 chars if segment before first . is still too long
  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@RiRa12621 RiRa12621 force-pushed the rira12621-cloudinit branch from 80febba to 4f8819e Compare April 7, 2025 11:33
@RiRa12621
Copy link
Contributor Author

fixed @sayanchowdhury

@RiRa12621 RiRa12621 requested a review from sayanchowdhury April 7, 2025 11:56
@tormath1 tormath1 added the main label Apr 9, 2025
@tormath1 tormath1 moved this to ✅ Testing / in Review in Flatcar tactical, release planning, and roadmap Apr 9, 2025
@tormath1 tormath1 merged commit b3b9f07 into flatcar:main Apr 10, 2025
1 of 3 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Testing / in Review to Implemented in Flatcar tactical, release planning, and roadmap Apr 10, 2025
@tormath1
Copy link
Contributor

@RiRa12621 thanks for the contribution. This will be available in the next Alpha release and in the nightlies (https://bincache.flatcar-linux.net/images/amd64/). We still need to discuss if we want this in Beta as well.

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

3 participants