I searched for a way to complete the update of a webserver and specifically the packages afflicted, which are:
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.
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.]