-
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
Prevent reuse of file client if cachedir does not match #62631
Conversation
@marmarek Thanks for the PR! This change will require a test case and a changelog detailing the changes. Thanks! |
4b9f426
to
57be89d
Compare
Hi! I'm your friendly PR bot!You might be wondering what I'm doing commenting here on your PR. Yes, as a matter of fact, I am... I'm just here to help us improve the documentation. I can't respond to Okay... so what do you do? I detect modules that are missing docstrings or "CLI Example" on existing docstrings! So what does that have to do with my PR? I noticed that in this PR there are some files changed that have some of these Okay, what are they? Well, my favorite, is that since you were making changes here I'm hoping that If I can, then what? Well, you can either add them to this PR or add them to another PR. Either way is fine! Well... what if I can't, or don't want to? That's also fine! We appreciate all contributions to the Salt Project. If you Whatever approach you decide to take, just drop a comment here letting us know! Detected Issues (click me)Check Known Missing Docstrings...........................................Failed - hook id: invoke - exit code: 1 Thanks again! |
1 similar comment
Hi! I'm your friendly PR bot!You might be wondering what I'm doing commenting here on your PR. Yes, as a matter of fact, I am... I'm just here to help us improve the documentation. I can't respond to Okay... so what do you do? I detect modules that are missing docstrings or "CLI Example" on existing docstrings! So what does that have to do with my PR? I noticed that in this PR there are some files changed that have some of these Okay, what are they? Well, my favorite, is that since you were making changes here I'm hoping that If I can, then what? Well, you can either add them to this PR or add them to another PR. Either way is fine! Well... what if I can't, or don't want to? That's also fine! We appreciate all contributions to the Salt Project. If you Whatever approach you decide to take, just drop a comment here letting us know! Detected Issues (click me)Check Known Missing Docstrings...........................................Failed - hook id: invoke - exit code: 1 Thanks again! |
Changelog pushed, but for the test I'll need some help. There is a test that (I think) already test this thing here: https://github.com/saltstack/salt/blob/master/tests/pytests/integration/ssh/test_state.py#L40-L68. But currently it passes because it ssh to localhost, so using paths from remote system locally works because they are the same system... I think using a fixture from |
1e4664d
to
a1d7a26
Compare
Which job is supposed to run tests marked as "slow_test"? |
a1d7a26
to
1d41fe9
Compare
@marmarek I'm looking at the changes for this PR and I only see the change to the test file? Were there additional changes? |
The "[DO NOT MERGE]" commit reverts the fix, to see if the test is effective. But it seems all "slow tests" are skipped in CI (or I can't find where it runs)". Any idea? The test makes sense only if it's going to be called... |
8c4d057
to
7aedeb3
Compare
salt-ssh constructs file client with cachedir set to /var/tmp/... already (as it would be on the minion side). Make sure it isn't used when looking for files on the master (with cachedir /var/cache/salt or similar), as it wouldn't find them. related to saltstack#60003
This makes it detect cases where remote/local paths gets confused (like in saltstack#60003 or saltstack#62043). Without using a container, remote paths works locally too, so tests do not detect an issue. Rename test_ssh_setup.py to test_ssh_setup_and_state.py to match its new content. pytest.mark.skip_on_windows is dropped as test_ssh_setup.py already has necessary mark (dockerd present).
7aedeb3
to
1247f3a
Compare
I think the centos-7 failure is unrelated to the changes in this PR. |
@marmarek My fix here #63184 is still a work in progress, but can you give it a try? I'm worried with this fix it will lead to slow down to re-generate the fileclient. This should resolve the |
Closing in favor of #63184 |
What does this PR do?
Complementary change to #62043, fixing final corner case in salt-ssh (using fileclient with mismatching cachedir)
What issues does this PR fix or reference?
Fixes: #60003
Previous Behavior
salt-ssh was looking for jinja includes in cache in /var/tmp/... on the master node.
New Behavior
salt-ssh is looking for jinja includes in cache in /var/cache/salt (or wherever salt is configured for salt-ssh).
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.