2011-05-02 14:25:24 |
Kevin Bringard |
description |
When performing an apt-get install or upgrade on nova-common, certain conditions will cause the 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. |
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. |
|