Unable to Run Arkenfox SaltStack State

Hi,

I am trying to create a salt configuration for setting up arkenfox.
As suggested in the qubes salt docs, I created the files arkenfox.sls and arkenfox.top in /srv/salt and ran

qubesctl top.enable arkenfox

However, after running

qubesctl state.highstate

I get the error:

local:
----------
      ID: states
      Function: no.None
      Result: False
     Comment: No Top file or master_tops data matches found. Please see master log for details.
     Changes:   

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   0.000 ms
DOM0 configuration failed, not continuing

I found this comment and
reinstalled qubes-mgmt-salt-base-topd and while it got rid of the error I had before, it did not run my state (arkenfox.sls).

What could be the issue here?
My arkenfox.top file looks like this:

base:
  arkenfox-template:
    - arkenfox
1 Like

I don’t know much about Salt; I just use it for backups, but your syntax is incorrect; you forgot a “-”.

base:
  arkenfox-template:
    - arkenfox

Perhaps it’ll work better like this :slight_smile: but some others peoples are better like me in Salt! lol

1 Like

Thanks for pointing that out; silly mistake on my part. I edited the post to reflect the change. Unfortunately, it didn’t seem to have an effect :frowning_face:.

1 Like

What’s weird is that I followed the instructions in Qubes Salt Beginner Guide (except putting everything in /srv/salt instead of /srv/user_salt) with this top file:

base:
  dom0:
    - salty

and it created the ‘salty’ qube with no issues, yet when I try to expand it to:

base:
  dom0:
    - salty
  arkenfox-template:
    - arkenfox

the arkenfox state isn’t run and there’s no indication that it’s even recognized.

1 Like

try like this
in /srv/user_salt create file arkenfox.top :

user:
  arkenfox-template:
    - arkenfox

and your arkenfox.sls in the same directory.

Disable arkenfox if you don’t do it and enable it:

qubesctl top.disable arkenfox
qubesctl top.enable arkenfox

It’s just a lead, I told you, I’m not an expert with salt, I’m just doing the bare minimum! lol
If you share your .sls file, that could also be helpful :confused:

1 Like

[quote]
I am trying to create a salt configuration for setting up arkenfox.
As suggested in the qubes salt docs, I created the files arkenfox.sls and arkenfox.top in /srv/salt and ran

qubesctl top.enable arkenfox

However, after running

qubesctl state.highstate

I get the error:

local:

I’d forgotten how brain dead discourse is in parsing quoted text.
What I included was -

qubesctl targets by default dom0, then acts on templates, then AppVMs.
You havent included any parameters to skip-dom0 or target template-arkenfox.
Look at qubesctl --help

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

2 Likes

I was able to successfully run the state by executing

qubesctl --skip-dom0 --targets arkenfox-template state.sls arkenfox

but this doesn’t use the top file in any way. I thought the top file already specifies which templates to target, so that I could just run qubesctl state.highstate and wouldn’t have to specify anything on the command line?

No, because you are explicitly running a state file, and using targets.

Unfortunately not.
The run is dom0->templates->qubes.
Top files still operate within this structure. So if you --target=test,test1,
you can use top files to apply states to test and test1 separately.
You can also use --templates, --standalones, or --app as targets -
here your use of top files allows for precise application of states.

I generally use some protective structures within state files to
ensure that there’s no inadvertent hit on dom0, but otherwise it looks
like standard salt.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

Thanks for clarifying. It seems like qubesctl --skip-dom0 --all state.highstate does exactly what I want (--skip-dom0 is only necessary when the top file doesn’t contain any states targeting dom0).