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

Kitchen Driver hangs at '$VM is now ready' #42

Open
humboldtux opened this issue Jun 2, 2017 · 7 comments
Open

Kitchen Driver hangs at '$VM is now ready' #42

humboldtux opened this issue Jun 2, 2017 · 7 comments

Comments

@humboldtux
Copy link

humboldtux commented Jun 2, 2017

Versions:

Chef Development Kit Version: 1.4.3
chef-client version: 12.19.36
delivery version: master (41b94ffb5efd33723cf72a89bf4d273c8151c9dc)
berks version: 5.6.4
kitchen version: 1.16.0
inspec version: 1.25.1
chef-provisioning-vsphere 2.0.4

Platform Details

  • Version of vSphere/vCenter: 6.0.0
  • Version of ESXi: 6.0.0.

Scenario:

I want to converge a Linux VM.

Steps to Reproduce:

Execute

       kitchen converge testing-TPL-Debian

With following .kitchen.yml

---
driver:
  name: vsphere
  driver_options:
    host: '1.2.3.4'
    user: 'user'
    password: 'pass'
    insecure: true
  machine_options:
    start_timeout: 60
    create_timeout: 60
    ready_timeout: 9
    bootstrap_options:
      use_linked_clone: true
      datacenter: 'DC'
      template_name: 'TPL_Debian'
      vm_folder: ''
      num_cpus: 2,2
      network_name:
        - VLAN01
      memory_mb: 8192
      resource_pool: 'TESTING'
      ssh:
        user: root
        paranoid: false
        password: pass
        port: 22
provisioner:
  name: chef_zero
  environments_path: ../../environments
  roles_path: ../../roles

platforms:
  - name: TPL_Debian

suites:
  - name: production
    run_list:
      - recipe[base-openssh]
    provisioner:
      client_rb:
        environment: production
  - name: testing
    run_list:
      - recipe[base-openssh]
    provisioner:
      client_rb:
        environment: testing

Expected Result:

I want the VM to be provisionned/converged with chef

Actual Result:

The VM is created, but not converged:

  waiting for testing-TPL-Debian-586d0836 (50003afa-ae25-6a88-c663-82442d970339 on vsphere://1.2.3.4/sdk?use_ssl=true&insecure=true) to be ready ...                                     
   ............testing-TPL-Debian-586d0836 is now ready 

I the same result with:

       kitchen create testing-TPL-Debian

Kitchen hangs at:

   ............testing-TPL-Debian-586d0836 is now ready 

Thanks

@jjasghar
Copy link

jjasghar commented Jun 2, 2017

Can you run this with debug on too? -VV so we can see what it's attempting to do?

@humboldtux
Copy link
Author

@jjasghar the following command:

kitchen converge  testing-TPL-Debian -vv

Doesn't give me more info in the output 😞

@jjasghar
Copy link

jjasghar commented Jun 2, 2017

Oh sorry, it's the kitchen debug not chef-provisioning-vSphere. It is something like --log :debug or something like that. Please check the help and you should be able to find it.

@humboldtux
Copy link
Author

My bad, your right, for reference, the exact command is:

 kitchen converge  testing-TPL-Debian -l debug

Unfortunately, the debug option doesn't give additional helpful info in the output of the command, neither in the logs.

@humboldtux
Copy link
Author

How does the driver know how to use this:

      ssh:
        user: root
        paranoid: false
        password: pass
        port: 22

How does he reaches and know how to reach the VM? How does he get the ip of the VM?

@jjasghar
Copy link

jjasghar commented Jun 5, 2017

Yeah this was written before the transport layer was created for tk. There still is some legacy code, which there are 🐉 s. I'm trying to clean it up, but any investigation is pretty sparse right now. I'm trying to get this back in order, but honestly, without you debugging this, this issue won't be resolved anytime soon.

@gaelcolas
Copy link

In my (very little) experience, exclusively with the winrm transport, I'd suggest the following.

It seems that you're going as far as this line, and that's working as expected.

But then you're failing somewhere between there, and line 462, where you should see the next message: waiting up to XX seconds for customization.

Calling those methods along the way:
attempt_ip() -> ip_to_bootstrap() -> wait_for_ip()

So the suggested way to debug:

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

No branches or pull requests

3 participants