Solving errors when updating linux-cloud-tools-common

When doing a regular periodical update of a webserver, some packages remain 'not fully installed'.

I searched for a way to complete the update of a webserver and specifically the packages afflicted, which are:

linux-cloud-tools-common
linux-cloud-tools-3.13.0-100
linux-cloud-tools-3.13.0-100-generic
linux-cloud-tools-virtual
hv-kvp-daemon-init

tl;dr

The solution I finally came up with is to run:

After that run 'apt upgrade' again to complete the installation of the updates.

I'd like to tell you a bit more about how I came to this solution.

More information about the issue

The issue turned up after a regular 'sudo apt-get update && sudo apt-get upgrade'. The server involved is a Ubuntu 14.04 Virtual Machine on Azure.

The first thing I tried was runnning apt upgrade again. It showed that five packages are not fully installed.

And after confirmation, the same errors as listed above are generated again and the situation is unchanged. 

Finding others with the same issue

​This is the point where I used Google to find out if others encountered the same error and if so, if they found a solution. At first I only found generic possible solutions that are appliccable to every apt package issue. One that I tried is this reccommendation.

Instead, I followed a stack-overflow post (which I can't find anymore):

However, when running upgrade, configure and/or force install, the same error occurs: 'initscript hv-kpv daemon, action "start" failed', just like the first time.

Even completely removing and reinstalling the package with the following commands gave the same issue.

Direct cause

I found the following blog, which correctly found the issue to be with /etc/init/hv-kvp-daemon.conf. After installation the linux-cloud-tools-common package is configured by running this specific config file. On the last line it runs /usr/sbin/hv_kvp_daemon, however, this file does not exist. 

The blog then suggests to simply not run the script by replacing the location to the script with /bin/true. This didn't sound like a good suggestion to me, scripts are there for a reason (ok, maybe I’m a little naive). The blog also recommends to revert the config file afterwards, but this would only bring the issue back every time the linux-cloud-tools-common package is updated.

Looking for the file

I remembered that when upgrading a package, the previous configuration file is saved with an extra extension in the file name. So I went looking for such files.

The last modification date of the file hv_kvp_daemon_3.2.0-67-virtual was in 2014, which I believed to be too old to be applicable. However, the file hv_kvp_daemon.hv-kvp-daemon-init was actually installed at the same time as other files that begin with 'hv_', part of the same package. But this file was not listed in the packages file list, so I wasnt certain that this was the file that I was looking for . 

On APT Browse, I found what the contents of /usr/sbin/hv_kvp_daemon should be (although it is not the lastest version), which seems to be the same as hv_kvp_daemon.hv-kvp-daemon-init.
Solution: so I made a symbolic link from hv_kvp_daemon.hv-kvp-daemon-init to hv_kvp_daemon, and when running apt upgrade the packages all updated correctly and everything was fully installed and fully up to date again.
 
After some thinking, I remembered that I recently upgraded the server. The underlying issue might have started by an earlier upgrade from Ubuntu 12.04 to 14.04 and only shown itself after the first update of linux-cloud-tools-common.
 
Note: after posting this article I found out that the solution had already been mentioned on this blog, so much for thinking I was the awesome pioneer in this solution.

[Jacco is a developer at Infi.]
 

Wil je iets waarmaken met Infi?

Wil jij een eigen webapplicatie of mobiele app waarmee jij het bij anderen maakt?

Waargemaakt door de nerds van Infi.
Nerds met liefde voor softwareontwikkeling en die kunnen communiceren. En heel belangrijk: wat we doen, doen we met veel lol!

Wij willen het fixen. Laat jij van je horen?

Voor wie heb je een vraag?