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

Failed to complete #create action: [comparison of Integer with nil failed] on default-centos-7 #74

Open
nadobando opened this issue Dec 12, 2017 · 3 comments

Comments

@nadobando
Copy link

nadobando commented Dec 12, 2017

Versions:

  • Version of Chef-Provisioning:
  • Version of Chef-Provisioning-vSphere: (2.0.10)

Platform Details

  • Version of vSphere/vCenter: 6
  • Version of ESXi:

Scenario:

converge cookbook

Steps to Reproduce:

normal installation

Expected Result:

convergence

Actual Result:

Failed to complete #create action: [comparison of Integer with nil failed] on default-centos-7

---
driver:
 name: vsphere
 driver_options:
  host: "xxxx"
  user: '[email protected]'
  password: 'xxx'
  insecure: true
 machine_options:
  start_timeout: 300
  create_timeout: 300
  ready_timeout: 90
  bootstrap_options:
   datacenter: 'Datacenter'
   vm_folder: "Test"
   template_name: 'CentOS_7'
   num_cpus: 2
   memory_mb: 4096
   customization_spec:
     domain: local
     ipsettings:
       ip: '192.168.30.115'
       subnetMask: '255.255.255.0'
       gateway: ["192.168.3.1"]
       dnsServerList: ['192.168.10.230','192.168.10.231','192.168.10.239']

   ssh:
     user: root
     paranoid: false
     password: ""
     port: 22
   resource_pool: 'Testing Env'
   bootstrap_ipv4: true
   network_name:
        - DVs_30
provisioner:
  name: chef_zero

platforms:
  - name: centos-7

suites:
  - name: default
    run_list:
      - recipe[vcenter_test::default]
    verifier:
      inspec_tests:
        - test/smoke/default
    attributes:


Debug:

establishing connection to vcenter-isr
finding networks...
network: DVs_30 is a DistributedVirtualPortgroup
changing template nic for DVs_30
customizing default-centos-7-46b75566               with static IP 192.168.30.115
customizing default-centos-7-46b75566 with /
              dynamic IP and DNS: ["192.168.10.230", "192.168.10.231", "192.168.10.239"]

default-centos-7-46b75566 progress: 10%
default-centos-7-46b75566 progress: 22%
default-centos-7-46b75566 progress: 35%
default-centos-7-46b75566 progress: 40%
default-centos-7-46b75566 progress: 50%
default-centos-7-46b75566 progress: 60%
default-centos-7-46b75566 progress: 70%
default-centos-7-46b75566 progress: 80%
default-centos-7-46b75566 progress: 90%
default-centos-7-46b75566 progress: 100%
default-centos-7-46b75566 done!Machine - created - default-centos-7-46b75566 (5027fa7d-5caa-a931-e2e0-b67055cc1759 on vsphere://vcenter-isr/sdk?use_ssl=true&insecure=true)
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:59:in `deep_symbolize'
Power on VM [Test/default-centos-7-46b75566]
waiting for default-centos-7-46b75566 (5027fa7d-5caa-a931-e2e0-b67055cc1759 on vsphere://vcenter-isr/sdk?use_ssl=true&insecure=true) to be ready ...
.................default-centos-7-46b75566 is now ready
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [comparison of Integer with nil failed] on default-centos-7
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

D      ------Exception-------
D      Class: Kitchen::ActionFailed
D      Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [comparison of Integer with nil failed] on default-centos-7
D      ----------------------
D      ------Backtrace-------
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command.rb:183:in `report_errors'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command.rb:174:in `run_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command/test.rb:42:in `block in call'
D      /opt/chefdk/embedded/lib/ruby/2.4.0/benchmark.rb:293:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command/test.rb:38:in `call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/cli.rb:52:in `perform'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/cli.rb:245:in `test'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/bin/kitchen:13:in `block in <top (required)>'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/errors.rb:171:in `with_friendly_errors'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/bin/kitchen:13:in `<top (required)>'
D      /usr/bin/kitchen:255:in `load'
D      /usr/bin/kitchen:255:in `<main>'
D      ----End Backtrace-----
D      -Composite Exception--
D      Class: Kitchen::ActionFailed
D      Message: Failed to complete #create action: [comparison of Integer with nil failed] on default-centos-7
D      ----------------------
D      ------Backtrace-------
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:893:in `>'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:893:in `ip_to_bootstrap'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:349:in `transport_respond?'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:278:in `ready_machine'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/kitchen/driver/vsphere.rb:49:in `block in create'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/kitchen/driver/vsphere.rb:86:in `with_provisioning_driver'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/kitchen/driver/vsphere.rb:47:in `create'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:469:in `public_send'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:469:in `block in perform_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:536:in `synchronize_or_call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:498:in `block in action'
D      /opt/chefdk/embedded/lib/ruby/2.4.0/benchmark.rb:293:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:497:in `action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:469:in `perform_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:379:in `create_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:368:in `block in transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:367:in `each'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:367:in `transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:157:in `verify'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:186:in `block in test'
D      /opt/chefdk/embedded/lib/ruby/2.4.0/benchmark.rb:293:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:182:in `test'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command.rb:197:in `public_send'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command.rb:197:in `run_action_in_thread'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'
D      ----End Backtrace-----
D      ---Nested Exception---
D      Class: Kitchen::ActionFailed
D      Message: Failed to complete #create action: [comparison of Integer with nil failed]
D      ----------------------
D      ------Backtrace-------
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:893:in `>'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:893:in `ip_to_bootstrap'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:349:in `transport_respond?'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/chef/provisioning/vsphere_driver/driver.rb:278:in `ready_machine'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/kitchen/driver/vsphere.rb:49:in `block in create'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/kitchen/driver/vsphere.rb:86:in `with_provisioning_driver'
D      /root/.chefdk/gem/ruby/2.4.0/gems/chef-provisioning-vsphere-2.0.10/lib/kitchen/driver/vsphere.rb:47:in `create'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:469:in `public_send'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:469:in `block in perform_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:536:in `synchronize_or_call'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:498:in `block in action'
D      /opt/chefdk/embedded/lib/ruby/2.4.0/benchmark.rb:293:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:497:in `action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:469:in `perform_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:379:in `create_action'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:368:in `block in transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:367:in `each'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:367:in `transition_to'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:157:in `verify'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:186:in `block in test'
D      /opt/chefdk/embedded/lib/ruby/2.4.0/benchmark.rb:293:in `measure'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/instance.rb:182:in `test'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command.rb:197:in `public_send'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command.rb:197:in `run_action_in_thread'
D      /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.19.2/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'
D      ----End Backtrace-----

@binpath
Copy link

binpath commented Dec 21, 2017

We have the same error, but trying to provision a windows2012. The Version is 2.0.10, we uninstall the gem and install the 2.0.7... is the only way we could make it work.

------Exception-------
Class: Kitchen::ActionFailed
Message: 1 actions failed.
Failed to complete #create action: [comparison of Integer with nil failed] on default-windows2012R2-vSphere

Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

driver:
  name: vsphere
  driver_options:
    host: '10.161.152.55'
    user: 'USERS'
    password: 'PASSWORD'
    insecure: true
  machine_options:
      start_timeout: 3600
      create_timeout: 3600
      ready_timeout: 300
      bootstrap_options:
        use_linked_clone: true
        datacenter: 'POC'
        resource_pool: 'CLUPOC'
        additional_disk_size_gb:
        - '24'
        - '10'
        bootstrap_ipv4: true
        ipv4_timeout: 3600
        template_folder: 'Templates'
        # template_name: 'TPL-WIN2012R2DCE-V2BASE-CLON'
        template_name: 'TPL-WIN2012R2DCEP-V1CHEF'
        vm_folder: 'nvd'
        datastore: 'nvsinf01at_d_nas_03'
        num_cpus: 6
        network_name:
        - nvs-prod01-nvd
        memory_mb: 4192
        convergence_options:
          ssl_verify_mode: verify_none
        ssh:
          user: Administrator
          paranoid: false
          password: 'XXXXXXX'
        customization_spec:
          domain: local
          hostname: 'nvsxwsdmvt01'
          time_zone: 'America/Santiago'
          win_time_zone: 56
          product_id: ''
          ipsettings:
            ip: 10.159.76.66
            subnetMask: 255.255.255.0
            gateway:
              - 10.159.76.1
            dnsServerList:
              - 10.159.76.11
              - 10.159.76.12


provisioner:
  name: chef_zero
  data_bags_path: ../../data_bags


verifier:
  name: inspec

platforms:
  - name: windows2012R2_vSphere

suites:
  - name: default
    run_list:
      - recipe[nvs_swap::default]
    attributes:```

@tpmullan
Copy link

tpmullan commented Jan 8, 2018

I am also running into the same issue trying to provision Ubuntu and Oracle Linux. On the second try it always works, but this breaks our automation. The easiest solution we found was to simply use an older version of the gem

@wduncanfraser
Copy link

Saw the same behavior when using the kitchen driver with our Ubuntu 16.04 templates in vCenter 6.0. Our CentOS 7.4 templates were working without issue. Rolling back from 2.0.10 to 2.0.7 resolved the issue.

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

4 participants