dpkg-statoverride will sometimes fail on upgrades

Bug #1275080 reported by Joel
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
openstack-manuals
Opinion
Medium
Unassigned

Bug Description

-----------------------------------
Built: 2014-01-31T19:59:50 00:00
git SHA: b2c1950209741ccc7e543e7bba56e3081e040b1e
URL: http://docs.openstack.org/trunk/install-guide/install/apt/content/nova-compute.html
source File: file:/home/jenkins/workspace/openstack-install-deploy-guide-ubuntu/doc/install-guide/section_nova-compute.xml
xml:id: nova-compute

on a normal apt-get upgrade, I see this.

Setting up linux-image-3.8.0-35-generic (3.8.0-35.52~precise1) ...

update-initramfs: Generating /boot/initrd.img-3.8.0-35-generic
run-parts: executing /etc/kernel/postinst.d/statoverride 3.8.0-35-generic /boot/vmlinuz-3.8.0-35-generic
dpkg-statoverride: error: An override for '/boot/vmlinuz-3.8.0-35-generic' already exists, aborting.

This is happening when the package update hits
/etc/kernel/postinst.d/statoverride

I was able to hack around this issue using this...

dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-${version} || /bin/true

The core of the problem seem to be that the kernel has a new package version, but it results in the same kernel file names.

--force might also be a reasonable work around...

Revision history for this message
Andreas Jaeger (jaegerandi) wrote :

Please discuss this with the Ubuntu folks, we're following an Ubuntu advise on how to make this file readable.

Changed in openstack-manuals:
importance: Undecided → Medium
Revision history for this message
Napo Mokoetle (azanians) wrote :

I'm also getting this error when I try to upgrade Ceilometer due to version mismatch

run-parts: executing /etc/kernel/postinst.d/statoverride 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
dpkg-statoverride: error: an override for '/boot/vmlinuz-3.11.0-17-generic' already exists; aborting
run-parts: /etc/kernel/postinst.d/statoverride exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-extra-3.11.0-17-generic.postinst line 1010.
dpkg: error processing linux-image-extra-3.11.0-17-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-extra-3.11.0-17-generic; however:
  Package linux-image-extra-3.11.0-17-generic is not configured yet.

dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.11.0.17.18); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-extra-3.11.0-17-generic
 linux-image-generic
 linux-generic

Anne Gentle (annegentle)
Changed in openstack-manuals:
status: New → Confirmed
status: Confirmed → Triaged
status: Triaged → Opinion
Revision history for this message
Bobby Yakovich (bgyako) wrote :

Seeing same error on several ubuntu 14.04 servers.
Usually happens when /boot is 100% full. Once partition is cleaned, error does not go away.
Have NO work around at this time.
Please Help!

Error:
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-46-generic /boot/vmlinuz-3.13.0-46-generic
run-parts: executing /etc/kernel/postinst.d/statoverride 3.13.0-46-generic /boot/vmlinuz-3.13.0-46-generic
dpkg-statoverride: error: an override for '/boot/vmlinuz-3.13.0-46-generic' already exists; aborting
run-parts: /etc/kernel/postinst.d/statoverride exited with return code 2
dpkg: error processing package linux-image-extra-3.13.0-46-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.13.0-46-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
George (lmihaiescu) wrote :

Do "dpkg-statoverride --remove /boot/vmlinuz-3.13.0-46-generic" and then retry the upgrade.

Revision history for this message
QuentinHartman (qhartman) wrote :

I jsut ran into this on some 14.04 hosts. To resolve it consistently I had to:

for i in `dpkg-statoverride --list | grep vmlinuz | awk '{print $4}'`;do dpkg-statoverride --remove $i; done
dpkg --configure linux-image-3.13.0-46-generic # Current kernel version
for i in `dpkg-statoverride --list | grep vmlinuz | awk '{print $4}'`;do dpkg-statoverride --remove $i; done
dpkg --configure linux-image-extra-3.13.0-46-generic # Current kernel version
for i in `dpkg-statoverride --list | grep vmlinuz | awk '{print $4}'`;do dpkg-statoverride --remove $i; done
dpkg --configure --pending

I'd love some clarification as to why this statoverride change is even necessary. Openstack doesn't seem to be doing anything wonky with vmlinuz files that I can see. Is this just superstition that has outlived it's usefulness?

Revision history for this message
Chris Martin (6-chris-z) wrote :

> Openstack doesn't seem to be doing anything wonky with vmlinuz files that I can see. Is this just superstition that has outlived it's usefulness?

It's still needed for environments (like mine) where Nova libvirt password injection or SSH key injection are used with Ubuntu compute hosts. These features use libguestfs, which only works if it can read the kernel. See https://bugs.launchpad.net/nova/+bug/1507915.

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.