nova-common dpkg postinst script fails when root does not have write permissions to every subdirectory

Bug #775613 reported by Kevin Bringard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Wishlist
Unassigned
nova (Ubuntu)
Triaged
Low
Unassigned

Bug Description

When performing an apt-get install or upgrade on nova-common, certain conditions will cause the postinst script to fail.

Specifically, when the command "chown -R nova:root /var/lib/nova /var/log/nova" is run, if the user executing the apt-get (generally root) does not have write permissions to every directory under {/var/lib,/var/log}/nova the upgrade will fail.

The most common failure scenario (I've seen) is when the instances and/or log directories are stored on an exported NFS mount which does automatic snapshots (such as a NetApp filer head). Because the snapshot directories are exported as read-only filesystems to the host machine, the chown command fails with every upgrade.

As a quick workaround line 8 can be changed to the following:

find /var/lib/nova -iname \.\* | xargs chown nova:root && find /var/log/nova -iname \.\* | xargs chown nova:root

This will exclude any files or directories which begin with a dot (.). Unfortunately (at least in the case of a NetApp) the export is read-only, but the file permissions do not reflect that, so we cannot simply exclude based on permissions. There are doubtlessly additional failure scenarios, but this should work as a stopgap in the meantime.

Tags: wishlist
tags: added: wishlist
description: updated
Jay Pipes (jaypipes)
Changed in nova:
importance: Undecided → Wishlist
Thierry Carrez (ttx)
Changed in nova (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Changed in nova:
status: New → Invalid
Changed in nova (Ubuntu):
assignee: nobody → Yolanda Robla (yolanda.robla)
assignee: Yolanda Robla (yolanda.robla) → nobody
James Page (james-page)
Changed in nova (Ubuntu):
status: Confirmed → Triaged
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.