-
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
salt-ssh uses sudo to create cache dir, later fails to access it #38458
Comments
Having the same issue after an upgrade (from a much older version though).
|
Thanks for reporting this, I am able to reproduce the issue, we will get it fixed. Thanks, |
Is there a schedule for this, or a workaround? I think that this breaks salt-ssh for anyone using sudo. |
Let me ask and see if we have dev time to fix this in 2016.11.3 |
It looks like we are going to be getting in all the 2016.11.3 blockers in this week, so we aren't going to be able to get this one in. It will be a blocker for 2016.11.4, so it will be in that next release. Thanks, |
I think I ran across this bug, but there also seems to be a twist with trying to run without sudo on the master (where you run salt-ssh from). It seems to be trying to create file cache directories on the salt master but using the So with this roster:
I get:
I added some debug to see that it's trying to operate on this as
Since none of this exists on the master, it fails at the first path component. On the minion itself, |
For the benefit of random users who might be reading this dazed and confused at why salt:// file URIs with |
This appears to have been introduced here, 71e0bd0 |
We do not need to specify the entire path here. _cache_loc in salt.fileclient will do that for us. If we specify cachedir here, it will use the /var/tmp/*/running_data/var/cache path which we do not want to use when on the master. This is intelligent enough to use the /var/tmp path on the minion and a /var/cache/salt/master type path on the master. Fixes saltstack#38458
Yes this definitely causes the same failure when executing the same state on localhost or a remote minion.
EDIT: I just tested it with the test state I set out in the initial report too, same results. EDIT: Here is a self-contained reproduction: https://github.com/duk3luk3/salt-ssh-minimal/tree/salt-38458. It reproduces both from my arch linux workstation using salt-ssh 2016.11.3 as well as from my normal salt master machine using 2016.11.2. EDIT: Your PR seems to fix it though! 👍 |
It actually will work if you remove The problem was the commit I linked, accidentally moved the file cache on the master for salt:// links from /var/cache/salt/master/ to |
The above commit has been merged, I am closing this issue Thanks! |
Confirming that gtmanfred@2f0e2ed on top of 2016.11.3 fixes the problem, thanks! |
It will be in 2016.11.4 . https://github.com/saltstack/salt/issues?q=is%3Aopen+is%3Aissue+label%3A2016.11.4+label%3ABlocker |
Description of Issue/Question
Any states using the file cache fail in salt-ssh 2016.11.1 due to permission problems. Apparently the file is created as root but later accessed with user rights.
Setup
Steps to Reproduce Issue
See above
Versions Report
Happens also with repository version of salt -
EDIT: Does not happen with
v2016.9
tag (f76dc0f) from repoThe text was updated successfully, but these errors were encountered: