← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1758428] Re: Subprocesses of StartProgramInGuest fail when creating temporary files

 

After a serious dedup/crossreading session (so confusing :-/) I realized
this needs to be reported to Debian, I did so and will link up the bug
here ...

** Bug watch added: Debian Bug tracker #905170
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905170

** Also affects: open-vm-tools (Debian) via
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905170
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1758428

Title:
  Subprocesses of StartProgramInGuest fail when creating temporary files

Status in open-vm-tools package in Ubuntu:
  Fix Released
Status in open-vm-tools source package in Xenial:
  Fix Released
Status in open-vm-tools source package in Artful:
  Fix Released
Status in open-vm-tools source package in Bionic:
  Fix Released
Status in open-vm-tools package in Debian:
  Unknown

Bug description:
  Using open-vm-tools/xenial,now 2:10.2.0-3ubuntu0.16.04.1~ppa6 amd64
  [installed], subprocesses started by vim.vm.guest.ProcessManager fail
  to create temporary files.

  Summary:
  * When running subprocesss through open-vm-tools 2:10.2.0-3ubuntu0.16.04.1 (via vim.vm.guest.ProcessManager), subprocesses crash while trying to write temporary files.
  * Subprocesses run correctly when executed directly from the shell
  * Subprocesses execute correctly from open-vm-tools open-vm-tools-10.2.0-7253323, when compiled from source

  Steps to reproduce:
  1. Install open-vm-tools/xenial 2:10.2.0-3ubuntu0.16.04.1~ppa6 on a VMWare ESX 6.5 16.04 guest
  2. Using VMOMI API, start a child process that relies on temporary files (eg. `apt-get update`)
  3. Note the error code on the child process (eg. 100)
  4. Run process directly from guest shell (eg. `apt-get update`)
  5. Note the successful return code on the child process (1)

  Logs from vmtoolsd on guest:

  
  Mar 23 19:32:32 kcp vmtoolsd[660]: Hit:1 https://apt.dockerproject.org/repo ubuntu-xenial InRelease
  Mar 23 19:32:32 kcp vmtoolsd[660]: Couldn't create tempfiles for splitting up /var/lib/apt/lists/apt.dockerproject.org_repo_dists_ubuntu-xenial_InReleaseErr:1 https://apt.dockerproject.org/repo ubuntu-xenial InRelease
  Mar 23 19:32:32 kcp vmtoolsd[660]:   Could not execute 'apt-key' to verify signature (is gnupg installed?)

  ---------------------------------

  Psuedo code using pyVMOMI API to start a child process:
      
  #!/usr/bin/python
  import re
  import time
  from pyVim import connect
  from pyVmomi import vim, vmodl

  service_instance = connect.SmartConnectNoSSL(host=<vcenter_hostname>,
                                              user=<vcenter_username>,
                                              pwd=<vcenter_password>,
                                              port=443)
  content = service_instance.RetrieveContent()

  vm = content.searchIndex.FindByIp(datacenter=None,
                                    ip=<vm_ip_address>,
                                    vmSearch=True)

  creds = vim.vm.guest.NamePasswordAuthentication(
      username="root", password=<guest_password>
  )

  pm = content.guestOperationsManager.processManager
  ps = vim.vm.guest.ProcessManager.ProgramSpec(
     programPath="/usr/bin/apt-get",
     arguments="update"
  )
  res = pm.StartProgramInGuest(vm, creds, ps)
  pid_exitcode = pm.ListProcessesInGuest(vm, creds,
                                         [res]).pop().exitCode
  while re.match('[^0-9]+', str(pid_exitcode)):
      time.sleep(5)
      pid_exitcode = pm.ListProcessesInGuest(vm, creds,
                                             [res]).pop().exitCode
      if pid_exitcode == 0:
          print("Program %d completed with success" % res)
          break
      # Look for non-zero code to fail
      elif re.match('[1-9]+', str(pid_exitcode)):
          print("ERROR: Program apt-get completed with Failure %s" % pid_exitcode)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/open-vm-tools/+bug/1758428/+subscriptions