I was able to reproduce this. It seems its because MAAS leaves linguering processes that still run under the 'maas' user causing this:
Purging configuration files for libipmiconsole2 (1.4.11-1.1ubuntu4.1) ... Purging configuration files for maas-common (2.5.0~beta2-7253-gbf4047776-0ubuntu1~18.04.1) ... Removing user `maas' ... Warning: group `maas' has no more members. userdel: user maas is currently used by process 7083 /usr/sbin/deluser: `/usr/sbin/userdel maas' returned error code 8. Exiting. /usr/sbin/delgroup: `maas' still has `maas' as their primary group! userdel: user maas is currently used by process 7083 /usr/sbin/deluser: `/usr/sbin/userdel maas' returned error code 8. Exiting. /usr/sbin/delgroup: `maas' still has `maas' as their primary group! dpkg: error processing package maas-common (--purge): installed maas-common package post-removal script subprocess returned error exit status 128 Errors were encountered while processing: maas-common E: Sub-process /usr/bin/dpkg returned an error code (1) ubuntu@maas00:~$ ps faux | grep maas ubuntu 28095 0.0 0.0 13136 1040 pts/1 S+ 18:46 0:00 | \_ grep --color=auto maas ubuntu 16674 0.0 0.0 6212 836 pts/3 S+ Sep19 0:04 | \_ tail -f /var/log/maas/rackd.log maas 7083 0.0 0.0 581136 10156 ? Ssl 14:41 0:07 /usr/sbin/rsyslogd -n -f /var/lib/maas/rsyslog.conf -i /var/lib/maas/rsyslog.pid maas 7246 0.0 0.0 4628 740 ? Ss 14:41 0:00 /bin/sh -c exec /usr/sbin/rackd 2>&1 | tee -a $LOGFILE maas 7248 1.4 0.5 719460 88916 ? Sl 14:41 3:26 \_ /usr/bin/python3 /usr/sbin/rackd maas 7537 0.1 0.3 139880 51448 ? S 14:41 0:27 | \_ /usr/bin/python3 /usr/lib/maas/maas-common observe-beacons eno1 root 7791 0.0 0.0 64104 3564 ? S 14:41 0:00 | | \_ sudo -n /usr/lib/maas/beacon-monitor eno1 maas 7540 0.1 0.3 139880 51412 ? S 14:41 0:23 | \_ /usr/bin/python3 /usr/lib/maas/maas-common observe-beacons usb0 root 7793 0.0 0.0 64104 3628 ? S 14:41 0:00 | | \_ sudo -n /usr/lib/maas/beacon-monitor usb0 maas 7890 0.0 0.3 139624 51440 ? S 14:41 0:03 | \_ /usr/bin/python3 /usr/lib/maas/maas-common observe-arp eno1 root 7917 0.0 0.0 64104 3632 ? S 14:41 0:00 | | \_ sudo -n /usr/lib/maas/network-monitor eno1 maas 7891 0.0 0.3 139624 51324 ? S 14:41 0:01 | \_ /usr/bin/python3 /usr/lib/maas/maas-common observe-arp usb0 root 7921 0.0 0.0 64104 3568 ? S 14:41 0:00 | | \_ sudo -n /usr/lib/maas/network-monitor usb0 maas 7892 0.0 0.3 139624 51296 ? S 14:41 0:01 | \_ /usr/bin/python3 /usr/lib/maas/maas-common observe-mdns maas 7916 0.0 0.0 35180 2952 ? S 14:41 0:00 | | \_ /usr/bin/avahi-browse --all --resolve --no-db-lookup --parsable --no-fail maas 7249 0.0 0.0 6180 604 ? S 14:41 0:00 \_ tee -a /var/log/maas/rackd.log
I was able to reproduce this. It seems its because MAAS leaves linguering processes that still run under the 'maas' user causing this:
Purging configuration files for libipmiconsole2 (1.4.11- 1.1ubuntu4. 1) ... beta2-7253- gbf4047776- 0ubuntu1~ 18.04.1) ... maas/rackd. log maas/rsyslog. conf -i /var/lib/ maas/rsyslog. pid maas/maas- common observe-beacons eno1 maas/beacon- monitor eno1 maas/maas- common observe-beacons usb0 maas/beacon- monitor usb0 maas/maas- common observe-arp eno1 maas/network- monitor eno1 maas/maas- common observe-arp usb0 maas/network- monitor usb0 maas/maas- common observe-mdns avahi-browse --all --resolve --no-db-lookup --parsable --no-fail maas/rackd. log
Purging configuration files for maas-common (2.5.0~
Removing user `maas' ...
Warning: group `maas' has no more members.
userdel: user maas is currently used by process 7083
/usr/sbin/deluser: `/usr/sbin/userdel maas' returned error code 8. Exiting.
/usr/sbin/delgroup: `maas' still has `maas' as their primary group!
userdel: user maas is currently used by process 7083
/usr/sbin/deluser: `/usr/sbin/userdel maas' returned error code 8. Exiting.
/usr/sbin/delgroup: `maas' still has `maas' as their primary group!
dpkg: error processing package maas-common (--purge):
installed maas-common package post-removal script subprocess returned error exit status 128
Errors were encountered while processing:
maas-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
ubuntu@maas00:~$ ps faux | grep maas
ubuntu 28095 0.0 0.0 13136 1040 pts/1 S+ 18:46 0:00 | \_ grep --color=auto maas
ubuntu 16674 0.0 0.0 6212 836 pts/3 S+ Sep19 0:04 | \_ tail -f /var/log/
maas 7083 0.0 0.0 581136 10156 ? Ssl 14:41 0:07 /usr/sbin/rsyslogd -n -f /var/lib/
maas 7246 0.0 0.0 4628 740 ? Ss 14:41 0:00 /bin/sh -c exec /usr/sbin/rackd 2>&1 | tee -a $LOGFILE
maas 7248 1.4 0.5 719460 88916 ? Sl 14:41 3:26 \_ /usr/bin/python3 /usr/sbin/rackd
maas 7537 0.1 0.3 139880 51448 ? S 14:41 0:27 | \_ /usr/bin/python3 /usr/lib/
root 7791 0.0 0.0 64104 3564 ? S 14:41 0:00 | | \_ sudo -n /usr/lib/
maas 7540 0.1 0.3 139880 51412 ? S 14:41 0:23 | \_ /usr/bin/python3 /usr/lib/
root 7793 0.0 0.0 64104 3628 ? S 14:41 0:00 | | \_ sudo -n /usr/lib/
maas 7890 0.0 0.3 139624 51440 ? S 14:41 0:03 | \_ /usr/bin/python3 /usr/lib/
root 7917 0.0 0.0 64104 3632 ? S 14:41 0:00 | | \_ sudo -n /usr/lib/
maas 7891 0.0 0.3 139624 51324 ? S 14:41 0:01 | \_ /usr/bin/python3 /usr/lib/
root 7921 0.0 0.0 64104 3568 ? S 14:41 0:00 | | \_ sudo -n /usr/lib/
maas 7892 0.0 0.3 139624 51296 ? S 14:41 0:01 | \_ /usr/bin/python3 /usr/lib/
maas 7916 0.0 0.0 35180 2952 ? S 14:41 0:00 | | \_ /usr/bin/
maas 7249 0.0 0.0 6180 604 ? S 14:41 0:00 \_ tee -a /var/log/