After reading the official doc of qubes os & gonzalo’s notes, I figure out the 1st step is to create the user directories for salt:
# Run in dom0
sudo dnf install qubes-mgmt-salt-base-config
# Enable the top (qubes.users-drs) that creates the users dirs
sudo qubesctl top.enable qubes.users-dirs
I first notice that the dom0 already have the qubes-mgmt-salt-base-config package. That is fine.
However, the 2nd command gives a bunch of errors:
$ sudo qubesctl top.enable qubes.users-dirs
[ERROR ] An un-handled exception was caught by salt's global exception handler:
SaltRenderError: Could not find relpath for qubes.users-dirs.top
traceback of the error
<py_dir>=/usr/lib/python2.7/site-packages/salt
<extmods>=/var/cache/salt/minion/extmods
SaltRenderError: Could not find relpath for qubes.users-dirs.top
Traceback (most recent call last):
File "/bin/qubesctl", line 110, in <module>
salt_call()
File "<py_dir>/scripts.py", line 391, in salt_call
client.run()
File "<py_dir>/cli/call.py", line 58, in run
caller.run()
File "<py_dir>/cli/caller.py", line 134, in run
ret = self.call()
File "<py_dir>/cli/caller.py", line 204, in call
ret['return'] = func(*args, **kwargs)
File "<extmods>/modules/topd.py", line 74, in enable
return TopUtils(__opts__, **kwargs).enable(paths, saltenv)
File "<extmods>/utils/toputils.py", line 600, in enable
toppaths, unseen = self.prepare_paths(paths)
File "<extmods>/utils/toputils.py", line 453, in prepare_paths
toppath = self.toppath(path)
File "<extmods>/utils/toputils.py", line 332, in toppath
saltenv = saltenv or self.saltenv(path, saltenv)
File "<extmods>/utils/pathutils.py", line 128, in saltenv
relpath = self.relpath(path)
File "<extmods>/utils/pathutils.py", line 486, in relpath
return self.path(path, saltenv)
File "<extmods>/utils/toputils.py", line 269, in path
return super(TopUtils, self).path(path, saltenv, path_type=path_type)
File "<extmods>/utils/pathutils.py", line 445, in path
raise SaltRenderError('Could not find relpath for {0}'.format(path))
SaltRenderError: Could not find relpath for qubes.users-dirs.top
Traceback (most recent call last):
File "/bin/qubesctl", line 110, in <module>
salt_call()
File "<py_dir>/scripts.py", line 391, in salt_call
client.run()
File "<py_dir>/cli/call.py", line 58, in run
caller.run()
File "<py_dir>/cli/caller.py", line 134, in run
ret = self.call()
File "<py_dir>/cli/caller.py", line 204, in call
ret['return'] = func(*args, **kwargs)
File "<extmods>/modules/topd.py", line 74, in enable
return TopUtils(__opts__, **kwargs).enable(paths, saltenv)
File "<extmods>/utils/toputils.py", line 600, in enable
toppaths, unseen = self.prepare_paths(paths)
File "<extmods>/utils/toputils.py", line 453, in prepare_paths
toppath = self.toppath(path)
File "<extmods>/utils/toputils.py", line 332, in toppath
saltenv = saltenv or self.saltenv(path, saltenv)
File "<extmods>/utils/pathutils.py", line 128, in saltenv
relpath = self.relpath(path)
File "<extmods>/utils/pathutils.py", line 486, in relpath
return self.path(path, saltenv)
File "<extmods>/utils/toputils.py", line 269, in path
return super(TopUtils, self).path(path, saltenv, path_type=path_type)
File "<extmods>/utils/pathutils.py", line 445, in path
raise SaltRenderError('Could not find relpath for {0}'.format(path))
salt.exceptions.SaltRenderError: Could not find relpath for qubes.users-dirs.top
DOM0 configuration failed, not continuing
What did I miss?