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

provider/vsphere: provide host to provisioner connections #5558

Merged
merged 1 commit into from
Mar 21, 2016

Conversation

higebu
Copy link
Contributor

@higebu higebu commented Mar 10, 2016

Provide host to provisioner connections to enable to use provisioner with vsphere provider.
We cannot use remote-exec provisioner with vsphere provider for now, because vsphere provider doesn't provide host to provisioner connections. And the debug log is following:

(remote-exec): Connecting to remote host via SSH...
(remote-exec):   Host: 
(remote-exec):   User: root
(remote-exec):   Password: true
(remote-exec):   Private key: false
(remote-exec):   SSH Agent: false

Workaround:

proivsioner "remote-exec" {
  scripts = {
    "aaa.sh"
  }
  connections = {
    user = "${var.ssh_user}"
    password = "${var.ssh_password}"
    host = "${self.network_interface.0.ipv4_address}"
}

} else {
d.SetConnInfo(map[string]string{
"host": ip.(string),
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this will call d.SetConnInfo only when the waitForNetworkingActive code path is not executed. Is this the desired behavior? Seems like we might want to SetConnInfo after the boot waiting as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right! I'll fix it soon!

@higebu
Copy link
Contributor Author

higebu commented Mar 14, 2016

@phinze I fixed the behavior and rebased to master branch.

@rossedman
Copy link

👍 This has been driving me crazy. Glad I stumbled across this. Would love to see this get implemented. Have to roll this out across some big datacenters and would like to now use work arounds. Great work.

@phinze
Copy link
Contributor

phinze commented Mar 21, 2016

This LGTM - still working on getting a vSphere environment on our side to be able to properly test these PRs, but in the meantime this looks like a pretty straightforward win. 👍

phinze added a commit that referenced this pull request Mar 21, 2016
provider/vsphere: provide `host` to provisioner connections
@phinze phinze merged commit 60dd52d into hashicorp:master Mar 21, 2016
@higebu
Copy link
Contributor Author

higebu commented Mar 22, 2016

Thank you!

@rossedman
Copy link

@phinze I have vSphere 6 at home. Let me know if you need some help.

@higebu higebu deleted the vsphere-provider branch October 25, 2017 13:31
@ghost
Copy link

ghost commented Apr 6, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants