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

providers/vmware: support injecting custom network kargs #404

Merged
merged 1 commit into from
May 20, 2020

Conversation

lucab
Copy link
Contributor

@lucab lucab commented Apr 28, 2020

This implements fetching logic specific to the vmware provider
in order to support injecting custom network kargs, which are meant
to override the default ones.

In particular, this checks for an optional guestinfo property named
guestinfo.afterburn.initrd.network-kargs which can be used to provide
a string containing VM-specific overrides.

@jcpowermac
Copy link

@lucab I was following the closed PR.
I would assume that vmtoolsd would need to be running before trying to query for guestinfo?
Could we use this to set the hostname?

cc:
@mtnbikenc
@patrickdillon

@lucab
Copy link
Contributor Author

lucab commented Apr 29, 2020

I would assume that vmtoolsd would need to be running before trying to query for guestinfo?

No, this has no dependency on vmtoolsd. Like Ignition, it queries the hypervisor back-channel directly. At the time when this (and Ignition) runs in initramfs, it is quite too early for vmtoolsd.

Could we use this to set the hostname?

Possibly, if you already have it as part of your ip= and if that works generally.
However, I'd recommend against approaching it that way as it is fragile (as we keep finding out, see e.g. coreos/fedora-coreos-tracker#466)
Hostname should be coming from DHCP. If that is missing or needs to be overridden, static hostname configuration should be performed via Ignition configuration (like all other OS customizations).

This implements fetching logic specific to the `vmware` provider
in order to support injecting custom network kargs, which are meant
to override the default ones.

In particular, this checks for an optional guestinfo property named
`guestinfo.afterburn.initrd.network-kargs` which can be used to provide
a string containing VM-specific overrides.
@lucab lucab force-pushed the ups/vmware-net-kargs branch from 5762d36 to d4aa045 Compare May 18, 2020 12:22
@lucab
Copy link
Contributor Author

lucab commented May 19, 2020

Rebased against master, this is ready for review. CI is green and I manually tested on a vSphere setup with static networking.

/cc @jlebon

@lucab lucab requested a review from jlebon May 19, 2020 12:53
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.

3 participants