Skip to content

Comments

Remove afterburn /etc/hostname setup for EC2 and align it with upstream#43

Merged
pothos merged 1 commit intoflatcar-masterfrom
kai/afterburn-hostname
Apr 14, 2022
Merged

Remove afterburn /etc/hostname setup for EC2 and align it with upstream#43
pothos merged 1 commit intoflatcar-masterfrom
kai/afterburn-hostname

Conversation

@pothos
Copy link
Member

@pothos pothos commented Apr 13, 2022

The hostname afterburn got from the EC2 metadata was a FQDN and too
long. We actually don't need afterburn to set the hostname because it
is also set up via DHCP. Also, the upstream afterburn-hostname.service
already has conditions to run on the right platforms. We can use these
instead of custom shell logic.

Align flatcar-metadata-hostname.service with upstream afterburn and
don't use it for EC2. Adapt the upstream unit to fit our needs with a
different cmdline arg naming and skip the relabling workaround
(for now).

Fixes flatcar/Flatcar#707

How to use

Testing done

Test results in flatcar-archive/coreos-overlay#1817

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
    ↑ TODO in c-o

@pothos pothos force-pushed the kai/afterburn-hostname branch from 9cce79b to 7948d65 Compare April 13, 2022 08:40
The hostname afterburn got from the EC2 metadata was a FQDN and too
long. We actually don't need afterburn to set the hostname because it
is also set up via DHCP. Also, the upstream afterburn-hostname.service
already has conditions to run on the right platforms. We can use these
instead of custom shell logic.

Align flatcar-metadata-hostname.service with upstream afterburn and
don't use it for EC2. Adapt the upstream unit to fit our needs with a
different cmdline arg naming and skip the relabling workaround
(for now).

Fixes flatcar/Flatcar#707
@pothos pothos force-pushed the kai/afterburn-hostname branch from 7948d65 to 8743adb Compare April 13, 2022 08:41
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Apr 13, 2022
This pulls in flatcar/bootengine#43
to remove the afterburn /etc/hostname setup for EC2 and align the
afterburn /etc/hostname setup with upstream.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Apr 13, 2022
This pulls in flatcar/bootengine#43
to remove the afterburn /etc/hostname setup for EC2 and align the
afterburn /etc/hostname setup with upstream.
@pothos pothos marked this pull request as ready for review April 14, 2022 06:49
@pothos pothos requested a review from a team April 14, 2022 06:49
Copy link
Member

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

One question, but otherwise looks good.

Comment on lines +31 to +32
ConditionKernelCommandLine=|coreos.oem.id=packet
ConditionKernelCommandLine=|flatcar.oem.id=packet
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a supported ID for packet using the new name (equinix metal)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not yet, both coreos-base/oem-packet/files/grub.cfg and coreos-base/oem-packet/files/oem-release use packet

@pothos pothos merged commit 110ddbf into flatcar-master Apr 14, 2022
@pothos pothos deleted the kai/afterburn-hostname branch April 14, 2022 08:29
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Apr 14, 2022
This pulls in flatcar/bootengine#43
to remove the afterburn /etc/hostname setup for EC2 and align the
afterburn /etc/hostname setup with upstream.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Apr 14, 2022
This pulls in flatcar/bootengine#43
to remove the afterburn /etc/hostname setup for EC2 and align the
afterburn /etc/hostname setup with upstream.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Apr 14, 2022
This pulls in flatcar/bootengine#43
to remove the afterburn /etc/hostname setup for EC2 and align the
afterburn /etc/hostname setup with upstream.
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.

Flatcar on EC2 sets a incorrect os hostname

2 participants