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

fix(openbsd): fix mtu on newline in hostname files #5412

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

tobias-urdin
Copy link
Contributor

@tobias-urdin tobias-urdin commented Jun 19, 2024

Proposed Commit Message

fix(openbsd): fix mtu on newline in hostname files

The /etc/hostname.* files should have the mtu on
a separate line otherwise it gives error:

  ifconfig: mtu: bad value

The lines are executed in order by ifconfig and
mtu should be on it's own line.

Fixes: GH-5413

Additional Context

Test Steps

use cloud-init with a config drive instead of dhcp

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

@TheRealFalcon
Copy link
Member

@tobias-urdin , thanks for the PR. Changes look good to me according to https://man.openbsd.org/ifconfig.8 .

Before we can accept your change, you need to sign the CLA and add your Github username (alphabetically) to the cla signers file . The full details are described in the documentation

@TheRealFalcon TheRealFalcon self-assigned this Jun 20, 2024
@TheRealFalcon TheRealFalcon added the CLA not signed The submitter of the PR has not (yet) signed the CLA label Jun 20, 2024
The /etc/hostname.* files should have the mtu on
a separate line otherwise it gives error:

  ifconfig: mtu: bad value

The lines are executed in order by ifconfig and
mtu should be on it's own line.

Fixes: canonicalGH-5413
@tobias-urdin
Copy link
Contributor Author

@tobias-urdin , thanks for the PR. Changes look good to me according to https://man.openbsd.org/ifconfig.8 .

Before we can accept your change, you need to sign the CLA and add your Github username (alphabetically) to the cla signers file . The full details are described in the documentation

Thanks, done now.

@holmanb holmanb added CLA signed The submitter of the PR has signed the CLA and removed CLA not signed The submitter of the PR has not (yet) signed the CLA labels Jun 24, 2024
@holmanb
Copy link
Member

holmanb commented Jun 24, 2024

@igalic Hey Meena, would you mind taking a peak at this PR please?

@a-dubs
Copy link
Collaborator

a-dubs commented Jun 25, 2024

@tobias-urdin thank you for this contribution! Would you mind modifying your PR description so that it matches the expected PR template/format?

PULL_REQUEST_TEMPLATE.md

@tobias-urdin
Copy link
Contributor Author

@tobias-urdin thank you for this contribution! Would you mind modifying your PR description so that it matches the expected PR template/format?

PULL_REQUEST_TEMPLATE.md

Done.

@a-dubs
Copy link
Collaborator

a-dubs commented Jun 26, 2024

@tobias-urdin thank you so much!!

@TheRealFalcon
Copy link
Member

I'm going to go ahead and merge this as-is. Some excepts from the hostname.if manpage:

Any lines not matching these packed formats are passed directly to ifconfig(8).Any lines not matching these packed formats are passed directly to ifconfig(8). The packed formats are converted using a somewhat inflexible parser and the administrator should not expect magic — if in doubt study ifconfig(8) and the per-driver manual pages to see what arguments are permitted.

Further down:

Regular IPv4 network setup:
inet [alias] addr netmask broadcast_addr options

and

options
    Miscellaneous options to set on the interface...Valid options for a particular interface type can be found in [ifconfig(8)](https://man.openbsd.org/ifconfig.8). When used, the netmask and broadcast_addr options must also be present.

As currently implemented, broadcast_addr is NOT present, so an mtu option on the same line is not valid, thus the newline is required.

If an option including the broadcast_addr and mtu on the same line is preferred, that could be added in a later PR.

@TheRealFalcon TheRealFalcon merged commit 053331e into canonical:main Jul 3, 2024
23 checks passed
holmanb pushed a commit to holmanb/cloud-init that referenced this pull request Aug 2, 2024
The /etc/hostname.* files should have the mtu on
a separate line otherwise it gives error:

  ifconfig: mtu: bad value

The lines are executed in order by ifconfig and
mtu should be on it's own line.

Fixes: canonicalGH-5413
holmanb pushed a commit that referenced this pull request Aug 6, 2024
The /etc/hostname.* files should have the mtu on
a separate line otherwise it gives error:

  ifconfig: mtu: bad value

The lines are executed in order by ifconfig and
mtu should be on it's own line.

Fixes: GH-5413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed The submitter of the PR has signed the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants