upgrade from ppa failed while testing 3152

Bug #1751016 reported by Christian Ehrhardt 
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
open-vm-tools (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

From smattheis https://github.com/vmware/open-vm-tools/issues/229 carrying over to LP

I'm having serious difficulties to install updates, i.e., apt-get upgrade fails and I'm not able to fix it with aptitude:
$ sudo apt-get update
Hit:1 http://ppa.launchpad.net/ci-train-ppa-service/3152/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists... Done
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 open-vm-tools-desktop : Depends: open-vm-tools (= 2:10.2.0-3ubuntu0.16.04.1~ppa1) but 2:10.2.0-3ubuntu0.16.04.1~ppa2 is installed
E: Unmet dependencies. Try using -f.
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic linux-image-4.4.0-109-generic linux-image-extra-4.4.0-109-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  open-vm-tools open-vm-tools-desktop
Suggested packages:
  cloud-init
The following NEW packages will be installed:
  open-vm-tools
The following packages will be upgraded:
  open-vm-tools-desktop
1 upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
Need to get 0 B/667 kB of archives.
After this operation, 2,140 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package open-vm-tools-desktop.
(Reading database ... 440087 files and directories currently installed.)
Preparing to unpack .../open-vm-tools-desktop_2%3a10.2.0-3ubuntu0.16.04.1~ppa2_amd64.deb ...
Failed to stop run-vmblock-fuse.mount: Unit run-vmblock-fuse.mount not loaded.
dpkg: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
Failed to stop run-vmblock-fuse.mount: Unit run-vmblock-fuse.mount not loaded.
dpkg: error processing archive /var/cache/apt/archives/open-vm-tools-desktop_2%3a10.2.0-3ubuntu0.16.04.1~ppa2_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 5
/usr/bin/deb-systemd-helper: error: unable to read run-vmblock-fuse.mount
Failed to get unit file state for run-vmblock-fuse.mount: No such file or directory
run-vmblock-fuse.mount is a disabled or a static unit, not starting it.
Selecting previously unselected package open-vm-tools.
Preparing to unpack .../open-vm-tools_2%3a10.2.0-3ubuntu0.16.04.1~ppa2_amd64.deb ...
Unpacking open-vm-tools (2:10.2.0-3ubuntu0.16.04.1~ppa2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/open-vm-tools-desktop_2%3a10.2.0-3ubuntu0.16.04.1~ppa2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ sudo apt-get purge open-vm-tools open-vm-tools-desktop open-vm-tools-dkms

Now, open-vm-tools is uninstalled but open-vm-tools-desktop is installed. I cannot install, upgrade, or uninstall anything. Plus none of the services for the VM is working because open-vm-tools is uninstalled.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (12.0 KiB)

First of all a log as comparison how it "should" be:
root@x2:~# dpkg -l '*open-vm-tools*' | tee
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================-=================================-============-=============================================================
ii open-vm-tools 2:10.0.7-3227872-5ubuntu1~16.04.1 amd64 Open VMware Tools for virtual machines hosted on VMware (CLI)
un open-vm-tools-desktop <none> <none> (no description available)
root@x2:~# add-apt-repository ppa:ci-train-ppa-service/3152
 https://bileto.ubuntu.com/#/ticket/3152
 More info: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3152
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp2b8b3w92/secring.gpg' created
gpg: keyring `/tmp/tmp2b8b3w92/pubring.gpg' created
gpg: requesting key ECF1204C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp2b8b3w92/trustdb.gpg: trustdb created
gpg: key ECF1204C: public key "Launchpad PPA for CI Train PPA Service Team" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
root@x2:~# apt update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://ppa.launchpad.net/ci-train-ppa-service/3152/ubuntu xenial InRelease [23.8 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main Sources [868 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Sources [116 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/restricted Sources [4808 B]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2116 B]
Get:10 http://archive.ubuntu.com/ubuntu xenial/universe Sources [7728 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [59.1 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1516 B]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [458 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [197 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [319 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [119 kB]
Get:17 http://ppa.launchpad.net/ci-train-ppa-service/3152/ubuntu xenial/main amd64 Packages [1276 B]...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I can also install open-vm-tools-desktop just fine if needed.

There are multiple things going on atm - so to unconfuse version numbers:
1. you added the ppa with the proposed backport, that is 2:10.2.0-3ubuntu0.16.04.1~ppa2
   Up until this morning it was 2:10.2.0-3ubuntu0.16.04.1~ppa1 so you might have hit a time where
   this was partially updated?
2. there is currently an SRU update to open-vm-tools (minor fix) in flight, that is
   10.0.7-3227872-5ubuntu1~16.04.1
   to
   10.0.7-3227872-5ubuntu1~16.04.1

Your error is:
open-vm-tools-desktop : Depends: open-vm-tools (= 2:10.2.0-3ubuntu0.16.04.1~ppa1) but 2:10.2.0-3ubuntu0.16.04.1~ppa2 is installed

That is odd, as open-vm-tools-desktop is in the ppa as well.

Could you check if the following looks the same (after another apt update)?
# apt-cache policy open-vm-tools open-vm-tools-desktop
open-vm-tools:
  Installed: 2:10.2.0-3ubuntu0.16.04.1~ppa2
  Candidate: 2:10.2.0-3ubuntu0.16.04.1~ppa2
  Version table:
 *** 2:10.2.0-3ubuntu0.16.04.1~ppa2 500
        500 http://ppa.launchpad.net/ci-train-ppa-service/3152/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     2:10.0.7-3227872-5ubuntu1~16.04.2 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     2:10.0.7-3227872-2ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
open-vm-tools-desktop:
  Installed: 2:10.2.0-3ubuntu0.16.04.1~ppa2
  Candidate: 2:10.2.0-3ubuntu0.16.04.1~ppa2
  Version table:
 *** 2:10.2.0-3ubuntu0.16.04.1~ppa2 500
        500 http://ppa.launchpad.net/ci-train-ppa-service/3152/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     2:10.0.7-3227872-5ubuntu1~16.04.2 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
     2:10.0.7-3227872-2ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

That means both packages would be coming from the ppa.

Revision history for this message
smattheis (smattheis) wrote :

"so you might have hit a time where
   this was partially updated?"

Maybe this is the case, because all the aptitude commands failed with the error message:
"Failed to stop run-vmblock-fuse.mount: Unit run-vmblock-fuse.mount not loaded."

I traced the problem to the deb-systemd-invoke command. After I changed the pre-removal script of open-vm-tools, I could successfully purge open-vm-tools and open-vm-tools-desktop, then successfully do "apt-get upgrade" and again install open-vm-tools and open-vm-tools-desktop. Now it's working all fine. I'm not sure if my case is special, but maybe you could consider to fix the pre-removal script likewise? I would leave that to you. :)

<--- old version that failed --->
cat /var/lib/dpkg/info/open-vm-tools-desktop.prerm
#!/bin/sh
set -e

# workaround to avoid upgrade failures.
pkill -USR1 -f '(vmtoolsd.*vmusr|vmware-user)' || true

if [ -d /run/systemd/system ]; then
    deb-systemd-invoke stop run-vmblock\\x2dfuse.mount >/dev/null || true
fi

# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
 deb-systemd-invoke stop run-vmblock-fuse.mount >/dev/null
fi
# End automatically added section

<--- new version that succeeded to purge --->
$ cat /var/lib/dpkg/info/open-vm-tools-desktop.prerm
#!/bin/sh
set -e

# workaround to avoid upgrade failures.
pkill -USR1 -f '(vmtoolsd.*vmusr|vmware-user)' || true

if [ -d /run/systemd/system/run-vmblock\\x2dfuse.mount ]; then
    deb-systemd-invoke stop run-vmblock\\x2dfuse.mount >/dev/null || true
fi

# Automatically added by dh_systemd_start
if [ -d /run/systemd/system/run-vmblock-fuse.mount ]; then
 deb-systemd-invoke stop run-vmblock-fuse.mount >/dev/null
fi
# End automatically added section

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Your case is only a bit special (not everyone hits it), but I remember plenty of issues due to the space in the name and all that.

That is already fixed in 2:10.1.5-5055683-4 and later.
There that would already be part of the proposed changes you are testing.

Looking forward to an extended statement to "Now it's working all fine." on the other bug eventually.
I'm marking this as incomplete (no issue left) for now, but please feel free to ask if needed.

Changed in open-vm-tools (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for open-vm-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in open-vm-tools (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.