ubuntu / zsys

ZSys daemon and client for zfs systems
GNU General Public License v3.0
302 stars 43 forks source link

ERROR couldn't save state for user <>: user <> doesn't exist #211

Open pjgoodall opened 3 years ago

pjgoodall commented 3 years ago

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:

  1. ubuntu-bug zsys --save=/tmp/report
  2. Copy paste below /tmp/report content:

report.txt

Screenshots If applicable, add screenshots to help explain your problem.

Installed versions:

Additional context

210

204

208

vortigont commented 2 years ago

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

TheGrave commented 3 months ago

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.