Cannot purge biond glance-common (train)

Bug #1889846 reported by Eliezer Croitoru
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
Medium
Unassigned
Queens
Triaged
Medium
Unassigned
Rocky
Triaged
Medium
Unassigned
Stein
Triaged
Medium
Unassigned
Train
Triaged
Medium
Unassigned
Ussuri
Triaged
Medium
Unassigned
Victoria
Fix Released
Medium
Unassigned
glance (Ubuntu)
Fix Released
Medium
Unassigned
Bionic
Triaged
Medium
Unassigned
Focal
Triaged
Medium
Unassigned
Groovy
Fix Released
Medium
Unassigned

Bug Description

when I am trying to purge glance-comon I am receiving and error.
The question about this issue is at:
https://answers.launchpad.net/ubuntu/+question/692151

Output of:
+ cat -n /var/lib/dpkg/info/glance-common.postrm
     1 #!/bin/sh
     2
     3 set -e
     4
     5 case $1 in
     6 purge)
     7 if (which deluser && getent passwd glance) > /dev/null 2>&1; then
     8 deluser --system --quiet --backup-to /var/lib glance
     9 fi
    10 if (which delgroup && getent group glance) > /dev/null 2>&1; then
    11 delgroup --system --quiet glance
    12 fi
    13 ;;
    14 esac
    15
    16
+ getent passwd glance
glance:x:64062:64062::/var/lib/glance:/bin/false
+ getent group glance
glance:x:64062:
+ set +x

Shows that the glance user and group id are not system(ie under 1000).
Due to this the deluser and delgroup with the "--system" fails.

I don't know if the UID and GID are wrong or if the "--system" flag is wrong.
Either way it need to be fixed.

Thanks,

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: glance-common 2:19.0.3-0ubuntu1~cloud0 [origin: Canonical]
ProcVersionSignature: Ubuntu 4.15.0-112.113-generic 4.15.18
Uname: Linux 4.15.0-112-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.15
Architecture: amd64
CrashDB:
 {
                "impl": "launchpad",
                "project": "cloud-archive",
                "bug_pattern_url": "http://people.canonical.com/~ubuntu-archive/bugpatterns/bugpatterns.xml",
             }
Date: Fri Jul 31 15:28:00 2020
InstallationDate: Installed on 2020-07-31 (0 days ago)
InstallationMedia: Ubuntu-Server 18.04.4 LTS "Bionic Beaver" - Release amd64 (20200203.1)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: glance
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.glance.glance-api.conf: [modified]
mtime.conffile..etc.glance.glance-api.conf: 2020-07-31T12:27:00.564285

Revision history for this message
Eliezer Croitoru (eliezer) wrote :
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Eliezer, Thank you for reporting this bug and making Ubuntu better. I've confirmed this is a bug and triaged it as medium as there is a known work-around.

Changed in cloud-archive:
status: New → Triaged
importance: Undecided → Medium
no longer affects: cinder (Ubuntu)
Changed in glance (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I think this bug exists since queens when glance-common.postinst was updated to use reserved uid/gid for glance user/group.

Changed in glance (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → Medium
Changed in glance (Ubuntu Focal):
status: New → Triaged
importance: Undecided → Medium
Changed in cloud-archive:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glance - 2:21.0.0~b2~git2020073013.cfbe5f76-0ubuntu2

---------------
glance (2:21.0.0~b2~git2020073013.cfbe5f76-0ubuntu2) groovy; urgency=medium

  * d/glance-common.postrm: Drop --system from deluser/delgroup calls. This
    aligns with the glance-common.postinst script reserved glance uid/gid
    (LP: #1889846).

 -- Corey Bryant <email address hidden> Mon, 03 Aug 2020 12:39:41 -0400

Changed in glance (Ubuntu Groovy):
status: Triaged → Fix Released
Revision history for this message
Eliezer Croitoru (eliezer) wrote :

Since I am working on bionic and it's a tiny change, Can you backport the fix to bionic?

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package glance - 2:21.0.0~b2~git2020073013.cfbe5f76-0ubuntu2~cloud0
---------------

 glance (2:21.0.0~b2~git2020073013.cfbe5f76-0ubuntu2~cloud0) focal-victoria; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 glance (2:21.0.0~b2~git2020073013.cfbe5f76-0ubuntu2) groovy; urgency=medium
 .
   * d/glance-common.postrm: Drop --system from deluser/delgroup calls. This
     aligns with the glance-common.postinst script reserved glance uid/gid
     (LP: #1889846).

Changed in cloud-archive:
status: Fix Committed → Fix Released
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.