-
Notifications
You must be signed in to change notification settings - Fork 296
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
✨: Add guestinfo.hostname to config of a VM #2071
✨: Add guestinfo.hostname to config of a VM #2071
Conversation
Welcome @odvarkadaniel! |
Hi @odvarkadaniel. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
@zhanggbj: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
I wouldn't mind some additional eyes from /assign @akutz |
ab9fc6c
to
f403d45
Compare
Is this CAPV as a stand-alone management cluster? Also, please see coreos/afterburn#888 as it will likely be useful in the future. |
/hold Please see #2071 (comment). Changes needed. |
Do I get that right that I will need to get the necessary data from the newly introduced netplan config file which will be stored as guestinfo.metadata? |
Yup that's correct. Given the complexity of networking on-prem environments, we decided that netplan had the required expressivity, and we'll be encouraging all bootstrap providers to adopt it. I would sync up with Flatcar counterparts in Ignition. |
Hi, I just came back from PTO. I have chatted with folks from flatcar forum and I don't really understand what needs to be done here in order for this to get merged as this file exists and I suspect this is going to be plugged in as As of right now we just take the metadata file from Thank you for clarifying this situation in case I am missing something. |
/assign @randomvariable for helping to clarify. Thanks! |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Can you please follow up on this, @randomvariable? Thank you! |
So if I understand this PR and #2013 correctly - @odvarkadaniel issue is not about setting the hostname of the guest, but about exposing that value through vCenter. Given that we are aligned on using |
With the current config file stored in the field What my question is, with all the other PRs mentioned in this one, what is actually getting changed? The netplan config will stay the same as it is now, as far as I understand, which is why I don't understand what direction this needs to be moved as the current change should fix the issue (set hostname on vCenter's VM). |
Sorry, but I can't follow. Let's forget |
Ah, totally forgot to mention that this is for Ignition, sorry. The ignition bootstrapping method currently does not set the hostname on the VM as cloud-init does. This just adds the same thing as cloud-init does, but for Ignition. We are running into an issue, where MachineSet provisions a Machine and a new VM gets created in the vCenter, but never gets ignited due to a failure cause by empty hostname. |
Do you have an error message/log that shows what's going on? As far as I
know neither ignition, nor afterburn care about the value of
`guestinfo.hostname`.
Flatcar also uses ignition and in CAPV it has a systemd service defined in
ignition data that sets the node hostname. Without this `kubeadm join`
doesn't work, but ignition itself does. Do you use the same ignition
template from this repo? Would that approach work for your case as well?
…On Mon, Sep 25, 2023, 15:55 dodvarka ***@***.***> wrote:
Sorry, but I can't follow. Let's forget guestinfo.hostname for a second.
What usecase is currently broken for you?
guestinfo.metadata.local_hostname is where CAPV places the hostname right
now. Cloud-init processes it and sets the VM hostname to that value. The
Flatcar template currently has a systemd service that performs that
operation, and in future this will be handled by afterburn.
Ah, totally forgot to mention that this is for Ignition, sorry. The
ignition bootstrapping method currently does not set the hostname on the VM
as cloud-init does. This just adds the same thing as cloud-init does, but
for Ignition.
We are running into an issue, where MachineSet provisions a Machine and a
new VM gets created in the vCenter, but never gets ignited due to a failure
cause by empty hostname.
—
Reply to this email directly, view it on GitHub
<#2071 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXINVXGCH46BEQAMQKKMLLX4GEN5ANCNFSM6AAAAAA2TZ4JEI>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
I have been testing this with our openshift downstream version of CAPV (which should be identical to upstream) with our ignition config files. We do stuff a little bit different downstream, which comes to this issue, I thought it could also be useful adding this upstream (assign value to |
Do you have a link to the downstream code that uses/depends on
`guestinfo.hostname`?
…On Mon, Sep 25, 2023, 17:36 dodvarka ***@***.***> wrote:
Do you have an error message/log that shows what's going on? As far as I
know neither ignition, nor afterburn care about the value of
guestinfo.hostname. Flatcar also uses ignition and in CAPV it has a
systemd service defined in ignition data that sets the node hostname.
Without this kubeadm join doesn't work, but ignition itself does. Do you
use the same ignition template from this repo? Would that approach work for
your case as well?
I have been testing this with our openshift downstream version of CAPV
(which should be identical to upstream) with our ignition config files. We
do stuff a little bit different downstream, which comes to this issue, I
thought could also be useful adding upstream (assign value to
guestinfo.hostname for ignition from CAPV), so this is not a bug in here,
just a feature that would help us downstream work with MachineSets.
—
Reply to this email directly, view it on GitHub
<#2071 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXINVSMLICS7OSVUGMS2B3X4GQI3ANCNFSM6AAAAAA2TZ4JEI>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Sorry for confusion, it's been a long time since I worked on this. I think that our machine-approver operator is preventing the machine from getting created as the newly created machine is currently missing an |
So it sounds like you really want this part of the PR merged: + machineAddresses = append(machineAddresses, clusterv1.MachineAddress{
+ Type: clusterv1.MachineInternalDNS,
+ Address: ctx.Machine.Name,
+ }) |
Yes, that seems to fix this issue for us. Didn't realise at first that upstream's ignition template already has a service that sets the hostname on the VM. |
I think that part should be OK to merge. Would you agree @akutz ? @odvarkadaniel : in the meantime, are you able to help or find someone at Red Hat who could take care of the points blocking coreos/afterburn#888 (comment) from getting merged? Those are: reviews and packaging dependencies in Fedora. Then we can build on that PR to also handle the |
We are discussing this in the original issue linked to this PR. Of course, I will ask about the coreos/afterburner PR. |
@jepio, Just to update you on the afterburner PR - I talked to folks from coreos team and they are currently not working on it nor on their radar as this is not a priority for them currently. |
I see. That afterburn PR would help CAPV cover more scenarios, which would also benefit Openshift. |
…ceiver 🌱 Use pointer receiver consistently in vspheremachine controller
f403d45
to
fef5f54
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@odvarkadaniel: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What this PR does / why we need it:
The VMs in the vCenter are currently without a DNSName (they don't have a config data at key guestinfo.hostname) while using an ignition to set the VM up. With setting this field up, we can also append an internal DNS address to the list of machine's addresses.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2013
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: