-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
provider/vsphere: Fix missing ssh connection info #4283
Conversation
@chrislovecnm does this look correct to you? In order to use any provisioners the connection info will need setting - it's somewhat unclear from the chain in the linked issue whether they ever worked or not? |
@jen20 We are running into an api issue, and it would be good to get some feedback from the api owners. I am going to file a bug with the vmware guys and see if we can loop them in. @tkak we need to determine why we are not getting the ip addresses from mvm.Guest.Net should we do a wait for ip before? |
Filed vmware/govmomi#405 to the api owners. Thanks @tkak for this, and it would be good to get |
@tkak see the issue on the govmomi API. We may want to do a 'WaitForIP' on the call to get 'Guest.Net' |
wasn't this what the "boot_delay" parameter was supposed to deal with? This is something we had implemented a long time before the merge with this repo, but I can't find any traces of this feature anymore. |
@lesaux not really. We need to wait for the IP address to be bound to the nic, as the owners of govmomi recommended this pattern. Do you have concerns about this aproach? |
@@ -484,6 +483,16 @@ func resourceVSphereVirtualMachineRead(d *schema.ResourceData, meta interface{}) | |||
return fmt.Errorf("Invalid network interfaces to set: %#v", networkInterfaces) | |||
} | |||
|
|||
ip, err := vm.WaitForIP(context.TODO()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkak shouldn't we be doing this earlier in the method? If we move it to before collector.RetrieveOne
we may get better results. The thought that I have is that we are setting the network interfaces from Guest.Net
and the data may not be populated until vm.WaitForIP
returns. I am pushing a change to a branch on my repo, and maybe someone can test.
@ryanl-ee have you tested this change on this pull? I am still looking for a test bed unfortunately, but I will make the change that I mentioned to @tkak
@phinze this is ok for now, but I will probably tweak it later This is a P1 |
Rebased this in #6293 - will be merging that |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This fixes missing ssh connection info.
References: