cloud-init
cloud-init copied to clipboard
fix(openbsd): fix mtu on newline in hostname files
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
- [x] Squash merge using "Proposed Commit Message"
- [ ] Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)
@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
@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.
@igalic Hey Meena, would you mind taking a peak at this PR please?
@tobias-urdin thank you for this contribution! Would you mind modifying your PR description so that it matches the expected PR template/format?
@tobias-urdin thank you for this contribution! Would you mind modifying your PR description so that it matches the expected PR template/format?
Done.
@tobias-urdin thank you so much!!
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.