glance-common post-install script breaks in Ussuri when /var/lib/glance/images is a PureStorage-hosted NFS share.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
New
|
Undecided
|
Unassigned | ||
Ubuntu Cloud Archive |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I recently upgraded from Stein to Train successfully, and am now in the process of upgrading from Train to Ussuri. This bug hit me specifically on Ussuri.
I found that while trying to perform upgrades to switch to the bionic/ussuri packages for glance, I hit this error:
---
Setting up glance-common (2:20.0.
chmod: changing permissions of '/var/lib/
dpkg: error processing package glance-common (--configure):
installed glance-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of python3-glance:
python3-glance depends on glance-common (= 2:20.0.
Package glance-common is not configured yet.
---
/var/lib/
Upon investigation of the postinst scripts, I noticed a delta which I believe is responsible for this.
In 19.0.4 (train):
find /var/lib/glance -xdev -type d -exec chown glance:glance {} \;
In 20.0.1 (ussuri):
find /var/lib/glance -exec chown glance:glance "{}" +
find /var/lib/glance -type f -exec chmod 0640 "{}" + -o -type d -exec chmod 0750 "{}" +
I believe the "-xdev" flag likely prevented this from occuring previously, as /var/lib/
However, the new version makes no such exclusion. And while it's OK for the images within /var/lib/
As a workaround, I had to perform the following:
* I verified that everything aside from the .snapshot directory had the correct owner and permissions, as the post-install script would have otherwise set.
* I edited /var/lib/ dpkg/info/ glance- common. postinst, commenting out those 2 lines.
* I ran "sudo dpkg --configure glance-common" to allow the modified post-install hook to run, and for the package to complete installation. This then allowed for packages that depended on glance-common to be upgraded afterwards.