Skip to content
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

coreos-cloudinit: fix hostname reset bug #1571

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

jepio
Copy link
Member

@jepio jepio commented Jan 15, 2024

coreos-cloudinit: fix hostname reset bug

When coreos-cloudinit runs on a platform where afterburn sets the hostname it would reset the hostname to localhost. Fix that bug, by checking that the hostname is non-empty before applying. Pulls in flatcar/coreos-cloudinit#25.

See: flatcar/Flatcar#1262

How to use

Boot built image on Azure without providing any userdata to see if the hostname gets reset.

Testing done

[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]

  • 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.

@jepio
Copy link
Member Author

jepio commented Jan 15, 2024

http://jenkins.infra.kinvolk.io:8080/job/container/job/packages_all_arches/3274/cldsv/

Will merge/backport as soon as tests finish.

Copy link

github-actions bot commented Jan 15, 2024

jepio added 2 commits January 16, 2024 09:44
Coreos-cloudinit needs to only apply a hostname if it is non-empty, otherwise
the hostname ends up being "localhost".

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
@jepio jepio force-pushed the coreos-cloudinit-fix-empty-hostname branch from 53e84cf to 892a51e Compare January 16, 2024 08:44
@jepio
Copy link
Member Author

jepio commented Jan 16, 2024

tested - this now works

@jepio jepio merged commit cf05715 into main Jan 16, 2024
1 check failed
@jepio jepio deleted the coreos-cloudinit-fix-empty-hostname branch January 16, 2024 13:32
jepio added a commit that referenced this pull request Jan 16, 2024
coreos-cloudinit: fix hostname reset bug
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
jepio added a commit that referenced this pull request Jan 16, 2024
coreos-cloudinit: fix hostname reset bug
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants