ERROR couldn't save state for user <>: user <> doesn't exist
pjgoodall opened this issue · 2 comments
Describe the bug
I tried save system state using documented command, error results
To Reproduce
% whoami
peterg
% zsysctl state save -vv
DEBUG /zsys.Zsys/SaveUserState() call logged as [efa327c7:194e653b]
DEBUG Check if grpc request peer is authorized
DEBUG Polkit call result, authorized: true
INFO Requesting to save state for user "peterg"
DEBUG ZFS: ending transaction
DEBUG ZFS: transaction done
ERROR couldn't save state for user "peterg": user "peterg" doesn't exist
Expected behavior
system state should be saved as described in https://manpages.ubuntu.com/manpages/focal/man1/zsysctl-save.1.html
For ubuntu users, please run and copy the following:
ubuntu-bug zsys --save=/tmp/report
- Copy paste below
/tmp/report
content:
Screenshots
If applicable, add screenshots to help explain your problem.
Installed versions:
- OS: (
/etc/os-release
)
% cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
- Zsysd running version: (
zsysctl version
output)
% zsysctl version
zsysctl 0.4.8
zsysd 0.4.8
Additional context
maybe too old, but for whoever hits this again the solution was
check the value of zfs get com.ubuntu.zsys:bootfs-datasets rpool/USERDATA/<user>_xxxxx
it may be empty or contain some invalid value.
Fix it with setting proper system root dataset for the user. i.e.
zfs set com.ubuntu.zsys:bootfs-datasets=rpool/ROOT/ubuntu_xyzxyz rpool/USERDATA/youruser_x42x42
maybe too old, but for whoever hits this again the solution was check the value of
zfs get com.ubuntu.zsys:bootfs-datasets rpool/USERDATA/<user>_xxxxx
it may be empty or contain some invalid value. Fix it with setting proper system root dataset for the user. i.e.zfs set com.ubuntu.zsys:bootfs-datasets=rpool/ROOT/ubuntu_xyzxyz rpool/USERDATA/youruser_x42x42
Tried this but it doesn't work. Had to re-install zsys instead.