I receive this error after the disp-mgmt-vm starts:
ERROR (exception list index out of range)
Calling qubesctl without --pillar-root results in not finding the pillar in /var/log/qubes/mgmt-target.log:
output: - Rendering SLS 'base:user_salt.get' failed: Jinja variable 'salt.utils.context.NamespacedDictWrapper object' has no attribute 'host'
Expected behavior
Pillars are applied same way like it's done for dom0 with:
SaltRenderError: Could not find relpath for user_salt.myPersonalTopFile.top
Traceback (most recent call last):
File "/bin/qubesctl", line 110, in <module>
salt_call()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 391, in salt_call
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/call.py", line 58, in run
caller.run()
[setup.zip](https://github.com/QubesOS/qubes-issues/files/5213887/setup.zip)
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 134, in run
ret = self.call()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 204, in call
ret['return'] = func(*args, **kwargs)
File "/var/cache/salt/minion/extmods/modules/topd.py", line 74, in enable
return TopUtils(__opts__, **kwargs).enable(paths, saltenv)
File "/var/cache/salt/minion/extmods/utils/toputils.py", line 600, in enable
toppaths, unseen = self.prepare_paths(paths)
File "/var/cache/salt/minion/extmods/utils/toputils.py", line 453, in prepare_paths
toppath = self.toppath(path)
File "/var/cache/salt/minion/extmods/utils/toputils.py", line 332, in toppath
saltenv = saltenv or self.saltenv(path, saltenv)
File "/var/cache/salt/minion/extmods/utils/pathutils.py", line 128, in saltenv
relpath = self.relpath(path)
File "/var/cache/salt/minion/extmods/utils/pathutils.py", line 486, in relpath
return self.path(path, saltenv)
File "/var/cache/salt/minion/extmods/utils/toputils.py", line 269, in path
return super(TopUtils, self).path(path, saltenv, path_type=path_type)
File "/var/cache/salt/minion/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 user_salt.myPersonalTopFile.top
DOM0 configuration failed, not continuing
This issue can be closed. unman pointed me into the right direction. In the upper solution I'm trying to use:
/srv/salt/user_salt
instead of the correct directory:
/srv/user_salt
Qubes OS version Qubes release 4.0 (R4.0)
Affected component(s) or functionality user defined pillars in saltstack
Brief summary Using user defined pillars leads to an exception if tageting any other vm than dom0
To Reproduce setup.zip
/srv/salt/user_pillar/top.sls: user: 'target':
/srv/salt/user_pillar/get.sls: host: www.qubes-os.org
/srv/salt/user_salt/get.top base: target:
/srv/salt/user_salt/get.sls: get file: cmd.run:
To enable them during a qubesctl execution, I'm running:
This works quite well when running this for dom0, but when I'm running it towards a target:
I receive this error after the disp-mgmt-vm starts: ERROR (exception list index out of range)
Calling qubesctl without --pillar-root results in not finding the pillar in /var/log/qubes/mgmt-target.log: output: - Rendering SLS 'base:user_salt.get' failed: Jinja variable 'salt.utils.context.NamespacedDictWrapper object' has no attribute 'host'
Expected behavior Pillars are applied same way like it's done for dom0 with:
Actual behavior I receive this error after the disp-mgmt-vm starts:
Solutions you've tried
this leads to this error:
With the stack trace:
Relevant documentation you've consulted https://www.qubes-os.org/doc/salt/ https://github.com/QubesOS/qubes-mgmt-salt https://docs.saltstack.com/en/getstarted/config/pillar.html