Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-9261

vsphere : wait_for_completion does not return

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: vsphere
    • Labels:
    • Environment:

      Running puppet apply from a crontab on the puppet master to create new nodes on Vsphere VCENTER using the puppetlabs/vsphere module version 1.3.1.

    • Template:
      MODULES Bug Template
    • Acceptance Criteria:
      Hide

      Clone of our templates no longer cause puppet apply to hang.

      Show
      Clone of our templates no longer cause puppet apply to hang.
    • Team:
      Modules
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 1.3.1
      Puppet Version: 2018.1.2
      OS Name/Version: Linux 6.7

      Describe your issue in as much detail as possible...

      Desired Behavior: return cleanly from CloneVM_Task even for templates that are slow to clone (i.e. large or on slow storage or resource starved)

      Actual Behavior: for clone operations that take 30 minutes ( ? ) or more the puppet apply hangs due to the CloneVM_Task.wait_for_completion not returning (despite the clone actually completing)

      Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

      Suggested solution:

      diff --git a/modules/vsphere/lib/puppet/provider/vsphere_vm/rbvmomi.rb b/modules/vsphere/lib/puppet/provider/vsphere_vm/rbvmomi.rb
      index d4fabe9..aa22b00 100644
      — a/modules/vsphere/lib/puppet/provider/vsphere_vm/rbvmomi.rb
      +++ b/modules/vsphere/lib/puppet/provider/vsphere_vm/rbvmomi.rb
      @@ -299,7 +299,9 @@ Puppet::Type.type(:vsphere_vm).provide(:rbvmomi, :parent => PuppetX::Puppetlabs:
      vm.CloneVM_Task(
      :folder => find_or_create_folder(datacenter_instance.vmFolder, instance.folder),
      :name => instance.name,
      - :spec => clone_spec).wait_for_completion
      + :spec => clone_spec).wait_for_progress do |progress|
      *+ # report on progress here if you want to - see https://github.com/nsidc/vagrant-vsphere/pull/246*
      + end

      execute_command_on_machine if resource[:create_command]

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              loredana.ionce Loredana Ionce
              Reporter:
              IanJessett Ian Jessett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support