-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] file_roots to relative path seems broken #66588
Comments
I have the same issue, all my scripts are broken now after update. I also have downgraded to previous version. |
b0e7c62 by @hurzhurz is what caused this regression. @s0undt3ch |
This is crazy, it makes 3007.1 unusable. Could this be fixed please? |
@dtzampanakis Can you tell a bit more about how you run the master with this example config? I wanted to try it, but I can't get it working, even with 3006.8. I made a file structure like this in a test VM:
And I started the master like this: The master actually uses the file structure in /root/master-test/ for minion keys, cache, etc. It looks like the master worker threads have / as CWD. So with "./states" they actually look in "/states". Am I missing a step? Or do you use anything special to run the master, like docker or so? |
@hurzhurz this is about |
@hartwork Thanks for the hint! I somehow overlooked and also didn't expect that... |
@hurzhurz Assigned this to you assuming you are up for the task. :) |
No, it is NOT about I have the same issue using a masterless minion. After updating to 3007.1, For instance, this is my directory structure:
And this is the content of the
This was working just fine when running
I can confirm that the changes from #66690 fix the issue. I have manually modified the
3006.9 includes the fix, but 3007.1 is still broken. I hope a new point release for the 3007 branch gets published soon. |
Same issue here using 3007.1 release. When do you think a new point release will be published? |
I'm still getting the same "not found in saltenv 'base'" even with 3006.9 including the patch. |
@hartwork If you still have the issue with 3006.9, there might be something special about your setup. So maybe you can provide some details? |
Hi @hurzhurz there is no salt master for me, it's only salt-ssh here, the My setup is simple (and super close to what I described in https://blog.hartwork.org/posts/replacing-ansible-with-salt-ssh-for-speed-and-for-good/ in 2020): # cat Saltfile
salt-ssh:
roster_file: ./roster
config_dir: .
ssh_log_file: ./log.txt
# cat master
root_dir: .
cachedir: ./cachedir
file_roots:
base:
- ./salt
pillar_roots:
base:
- ./pillar
state_output_diff: True
# cat pillar/top.sls
base:
'*':
- data The files that stopped being found are all in I would go back further in time trying to find the last version of salt that worked but the target host has Python 3.13 by now and so e.g. 3005.5 is crashing from |
@hartwork I have just tested it with your config and 3006.9. Seems to work so far. Well, maybe you could also try to wipe the temporary salt files on the target system. |
Hi @hurzhurz, thanks for your reply and the hint about I have re-installed 3006.9 now and applied match_hostname.patch on top so that 3006.9 doesn't crash any more. I then checked # salt-ssh -w -t 'docker*' cp.list_master
docker2:
- files/authorized-keys-root.txt
[..]
- files/restart-as-needed.sh
[..] …which looks healthy to me to then find, that Salt can still not find those exact files in practice: # salt-ssh -w -t 'docker*' state.apply setup
docker2:
----------
ID: ssh-daemon
Function: ssh_auth.present
Result: False
Comment: Failed to add the ssh key. Source file salt://files/authorized-keys-root.txt is missing
Started: 18:17:48.051438
Duration: 8.851 ms
Changes:
----------
[..]
----------
ID: restart-as-needed-sh
Function: file.managed
Name: /usr/local/bin/restart-as-needed.sh
Result: False
Comment: Source file salt://files/restart-as-needed.sh not found in saltenv 'base'
Started: 18:17:57.696776
Duration: 5.563 ms
Changes:
----------
[..] What do you think? |
@hartwork ok, so I have tested a state with a file.managed and in worked in my test setup. So I have no real clue what's wrong at your setup. Well, maybe another test you could do is: |
@hurzhurz that worked, I get output… # salt-ssh -w -t 'docker*' cp.get_file salt://files/restart-as-needed.sh /tmp/
docker2:
True
docker1:
True …and file |
For anyone coming here to find a working solution based on Salt 3007.1: it took these two pull requests on top for me: |
Is there any ETA for Salt 3007.2 with these patchs included? |
Description
Upgrading from salt-ssh version 3007.0 (Chlorine)
to 3007.1 (Chlorine), seems to broke the file_roots that i use in my master file.
Pillars are working, but when i try to state.apply i am unable to apply any state with
Working only if i change the file_roots with an absolute path.
I installed 3006.8(Sulfur) to make it work again with relative path since i am unable to go back to 3007.0.
The text was updated successfully, but these errors were encountered: