Open chrispetsos opened 5 years ago
@chrispetsos Thanks for the report.
my two cents: are you able to download the package manually from the minion?
Yes, I can successfully download the package manually using e.g. wget
.
If you run salt someminion cp.cache_file https://pkg.osquery.io/rpm/osquery-2.10.2-1.linux.x86_64.rpm
, do you get the same error?
Obviously, replace someminion
with the minion ID of that same box behind the proxy.
Sorry for the late response... yes, I get the same error with the cp.cache_file
invocation too.
OK, and how is the proxy configured in Salt? Did you configure proxy_host
, proxy_port
, and optionally proxy_username
and proxy_password
?
https://docs.saltstack.com/en/latest/ref/configuration/minion.html#proxy-host
This is a CentOS 6.10 minion I am talking about. What we've been doing so far and has worked for everything else except the pkg.installed
states that define sources
is:
1) Create a file in /etc/profile.d/
file which exports the http_proxy
, https_proxy
env variables to the correct host/port. It also exports the no_proxy
env variable for targets which the minion doesn't need a proxy to connect to.
2) Configure the salt minion to use the requests
backend.
3) Some yum-related setup for proxies in /etc/yum.conf
.
Apart from this, setting the proxy_host
, proxy_port
in /etc/salt/minion
doesn't seem to solve the problem. Invoking the cp.cache_file
line you mentioned earlier, I receive the same error.
I'm facing the same issue on CentOS 7. I've configured http_proxy on /etc/yum.conf, /etc/environment, and proxy_host on /etc/salt/minion, but pkg.installed still ignores all proxy configuration when I pass "sources" arg.
I found I had to explicitly set http_proxy and https_proxy environment variables for the salt-minion services in the respective service files of the service manager since salt does not read any host environment files.
I just ran into this as well.
Description of Issue/Question
When a minion runs behind a proxy, all
pkg.installed
states succeed, except those that definesources
.Setup
Steps to Reproduce Issue
Invoke the above state on the minion behind the proxy,
Logs:
Versions Report
I export the
https_proxy
,http_proxy
andno_proxy
env vars in file/etc/profile.d/proxy.sh
. Also, using therequests
backend. Observing the logs of our proxy server, other requests that are going out to the internet appear normally. The above, problematic request never reaches our proxy server.