Collect deleted users
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
shadow (Ubuntu) |
Fix Released
|
Medium
|
Didier Roche-Tolomelli | ||
Focal |
Fix Released
|
Medium
|
Didier Roche-Tolomelli | ||
zsys (Ubuntu) |
Fix Released
|
Medium
|
Didier Roche-Tolomelli | ||
Focal |
Fix Released
|
Medium
|
Didier Roche-Tolomelli |
Bug Description
[Impact]
* Deleting users were preserving corresponding ZFS user datasets, without marking them for cleanup.
* This is covered by dedicated use cases.
[Test Case]
1. Ensure you have a foo user:
2. Run userdel --remove foo
3. Check that rpool/USERDATA/
4. zfs get com.ubuntu.
---
Other use case:
1.Ensure you have a foo user:
2. Run userdel foo
3. Check that rpool/USERDATA/
4. zfs get com.ubuntu.
---
On a non ZFS installation :
1. Ensure you have a foo user:
2. Run userdel --remove foo
3. The user is deleted, no error occured.
---
On a non ZFS installation with ZSys installed :
1. Ensure you have a foo user:
2. Run userdel --remove foo
3. The user is deleted, no error occured.
[Regression Potential]
* A new hidden command is added, triggered by userdel.
* Tests are covering this new command and GRPC request.
* The methodology is similar to useradd and usermod. The dependency between shadow and zsys is weak on purpose:
- the ZSys hidden command is available and is a no-op if not called
- if calling the command failed on userdel, nothing is done on ZSys side, but the code path is similar to ZSys not being installed or running on a non ZFS system.
----
Ideally, we would untag them as part of GC so that we can clean them up later. However, those can be linked to states on other pools with same pool name than targetted one, and it will be hard to match them.
Give a command for users to see them in status and then manually remove suspicious datasets ?
description: | updated |
description: | updated |
Changed in zsys (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
summary: |
- Collect unmatched bootfs-datasets on all userdata + Collect deleted users |
Changed in shadow (Ubuntu): | |
importance: | Undecided → Medium |
assignee: | nobody → Didier Roche (didrocks) |
Changed in zsys (Ubuntu): | |
assignee: | nobody → Didier Roche (didrocks) |
Changed in shadow (Ubuntu Focal): | |
assignee: | nobody → Didier Roche (didrocks) |
importance: | Undecided → Medium |
Changed in zsys (Ubuntu Focal): | |
assignee: | nobody → Didier Roche (didrocks) |
importance: | Undecided → Medium |
Changed in shadow (Ubuntu): | |
status: | New → Fix Released |
description: | updated |
This bug was fixed in the package zsys - 0.5.0
---------------
zsys (0.5.0) groovy; urgency=medium
[ Jean-Baptiste Lallement ]
[ Didier Roche ]
* Fix infinite GC loop (LP: #1870461)
* Enhance timeout handling to avoid error rpc error: code = DeadlineExceeded
desc = context deadline exceeded while the daemon is doing work
(LP: #1875564)
* Stop taking automated or manual snapshot when there is less than 20% of
free disk space (LP: #1876334)
* Enable trim support for upgrading users (LP: #1881540)
* Only clean up previously linked user datasets when unlinked under USERDATA
(LP: #1881538)
* Strategy for deleted user datasets via a new hidden command called by
userdel (LP: #1870058)
* Get better auto snapshots message when integrated to apt (LP: #1875420)
* Update LastUsed on shutdown via a new hidden command service call
(LP: #1881536)
* Prevent segfault immediately after install when zfs kernel module isn't
loaded (LP: #1881541)
* Don’t try to autosave gdm user (and in general non system user), even if
systemd --user is started for them. (LP: #1881539)
* Prevent apt printing errors when zsys is removed without purge
(LP: #1881535)
* Some tests enhancements:
- new tests for all the above
- allow setting a different local socket for debugging/tests purposes only
- ascii order datasets in golden files
* Typos and messages fixes. Direct prints are not prefixed with INFO
anymore.
* Refreshed po and readme with the above.
-- Didier Roche <email address hidden> Mon, 01 Jun 2020 09:26:52 +0200