nova-common dpkg postinst script fails when root does not have write permissions to every subdirectory
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,
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: | added: wishlist |
description: | updated |
Changed in nova: | |
importance: | Undecided → Wishlist |
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 |
Changed in nova (Ubuntu): | |
status: | Confirmed → Triaged |