[Bug 1929142] [NEW] glance-common post-install script breaks in Ussuri when /var/lib/glance/images is a PureStorage-hosted NFS share.

Paul Goins 1929142 at bugs.launchpad.net
Thu May 20 23:32:54 UTC 2021


Public bug reported:

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.1-0ubuntu1~cloud0) ...
chmod: changing permissions of '/var/lib/glance/images/.snapshot': Read-only file system
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.1-0ubuntu1~cloud0); however:
  Package glance-common is not configured yet.
---

/var/lib/glance/images/ is an NFS mount from a PureStorage device.  It
has a /var/lib/glance/images/.snapshot/ directory, and while I'm not a
PureStorage expert, any attempt to write any file to that .snapshot/
directory returns "Read-only file system" errors.

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/glance/images/ would have been on a different
filesystem than /var/lib/glance/, thus it would have been skipped.

However, the new version makes no such exclusion.  And while it's OK for
the images within /var/lib/glance/images/ to be chown'd/chmod'd, this
fails and crashes because it also tries to modify the .snapshot
directory.

** Affects: cloud-archive
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1929142

Title:
  glance-common post-install script breaks in Ussuri when
  /var/lib/glance/images is a PureStorage-hosted NFS share.

Status in Ubuntu Cloud Archive:
  New

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.1-0ubuntu1~cloud0) ...
  chmod: changing permissions of '/var/lib/glance/images/.snapshot': Read-only file system
  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.1-0ubuntu1~cloud0); however:
    Package glance-common is not configured yet.
  ---

  /var/lib/glance/images/ is an NFS mount from a PureStorage device.  It
  has a /var/lib/glance/images/.snapshot/ directory, and while I'm not a
  PureStorage expert, any attempt to write any file to that .snapshot/
  directory returns "Read-only file system" errors.

  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/glance/images/ would have been on a different
  filesystem than /var/lib/glance/, thus it would have been skipped.

  However, the new version makes no such exclusion.  And while it's OK
  for the images within /var/lib/glance/images/ to be chown'd/chmod'd,
  this fails and crashes because it also tries to modify the .snapshot
  directory.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1929142/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list