This bug was fixed in the package open-vm-tools - 2:10.2.0-3ubuntu3 --------------- open-vm-tools (2:10.2.0-3ubuntu3) bionic; urgency=medium
* Disable PrivateTmp for the open-vm-tools.service as it triggers issues when triggering processes that need tmp through VMOMI API (LP: #1758428) -- Christian Ehrhardt <christian.ehrha...@canonical.com> Thu, 19 Apr 2018 11:23:58 +0200 ** Changed in: open-vm-tools (Ubuntu Bionic) Status: In Progress => Fix Released -- 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: Triaged Status in open-vm-tools source package in Bionic: Fix Released 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 _______________________________________________ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp