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.managed doesn't download redirected urls when behind a proxy #63212
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
It does follow redirects, but you are not being given one. Salt is receiving a 599, with a report that a proxy has returned a 400. There's no 302 in any of that. Check the proxy settings that you're giving to Salt, as that's probably where the issue is. |
The 302 i get when i run pycurl was built by pip, so I did not set any special configuration for it. I also tried it with https://dl.k8s.io/release/v1.24.4/bin/linux/amd64/kubelet so I don't think azure is the issue here. |
I did a tcpdump of both the curl command line and the salt run. In both i get the 302 redirect:
salt
But the next request fails with salt.
Redirected salt
It looks like something is wrong with the The response is then the 400
In the salt-minion log file i see the following errors:
|
Ok, so it did follow the redirect, so that's not the problem. It appears something has inserted a NUL byte into the headers of Salt's request to your proxy, which would correctly result in a 400 error. |
Since |
The same version of pycurl, but not necessarily built with the same version or configuration of libcurl and its other dependencies. |
Ok, I see. So I guess I have to wait for #62949 to be fixed? |
Or details of what your proxy is and how it's configured so it might be possible to reproduce. |
The version we are using is squid 4.12. |
SafeLogic modules' paths are configured by properties to not expose their URLs. These modules had to be installed with a custom script because salt's file.present could not follow the redirects. Related issue: saltstack/salt#63212
SafeLogic modules' paths are configured by properties to not expose their URLs. These modules had to be installed with a custom script because salt's file.present could not follow the redirects. Related issue: saltstack/salt#63212
SafeLogic modules' paths are configured by properties to not expose their URLs. These modules had to be installed with a custom script because salt's file.present could not follow the redirects. Related issue: saltstack/salt#63212
SafeLogic modules' paths are configured by properties to not expose their URLs. These modules had to be installed with a custom script because salt's file.present could not follow the redirects. Related issue: saltstack/salt#63212
SafeLogic modules' paths are configured by properties to not expose their URLs. These modules had to be installed with a custom script because salt's file.present could not follow the redirects. Related issue: saltstack/salt#63212
SafeLogic modules' paths are configured by properties to not expose their URLs. These modules had to be installed with a custom script because salt's file.present could not follow the redirects. Related issue: saltstack/salt#63212
We also experience this, any news on possible fix? |
Description
As a workaround for #62949 I created the wheel file for pycurl and installed it via salt-pip. But when I try to download a file, e.g. https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.25.0/crictl-v1.25.0-linux-amd64.tar.gz i get
Error: HTTP 599: Received HTTP code 400 from proxy after CONNECT reading /kubernetes-sigs/cri-tools/releases/download/v1.25.0/crictl-v1.25.0-linux-amd64.tar.gz
This link accessed via curl gives a 302 redirect. For some reason, the redirect is not being followed. On previous version 3004.2 (non-onedir) this worked.
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
I use Almalinux 9, master is 3004.2 and minion is 3005.1
In the state file i then try to download the file:
Expected behavior
The file is downloaded.
Versions Report
The text was updated successfully, but these errors were encountered: