Skip to content
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

setting http_proxy causes no_proxy to be ignored #156

Closed
huntertj opened this issue Jun 8, 2015 · 10 comments
Closed

setting http_proxy causes no_proxy to be ignored #156

huntertj opened this issue Jun 8, 2015 · 10 comments
Labels
Milestone

Comments

@huntertj
Copy link

huntertj commented Jun 8, 2015

Not sure how to fix this, however if I have http_proxy/https_proxy set in my environment then the driver sets

          ::Aws.config.update(
            :region => region,
            :credentials => creds,
            :http_proxy => http_proxy
          )

If i comment out the :http_proxy line then this works as I need. Setting this appears to ignore my NO_PROXY environment settings, but not setting this values my environment settings.
As a side note it would be really nice if there was a way to pass additional Aws.config values (such as :http_wire_trace) which would really aid in debugging, unless I'm missing something somewhere I can't figure how to set it.

@tyler-ball
Copy link
Contributor

@huntertj this was added in #131 and that http_proxy value defaults to ENV["HTTPS_PROXY"] || ENV["HTTP_PROXY"].

I'm not sure I understand your use case - if you have the HTTP_PROXY environment variable set why wouldn't you want the AWS SDK to use it? What does NO_PROXY set?

Are there any AWS config values you would like to specify besides :http_wire_trace? I think it would make sense to echo those out in the DEBUG output, but I think that will be a little harder than just letting users specify their own config values.

@huntertj
Copy link
Author

@tyler-ball I work in a really restricted environment, some things need the proxy (internal resources) and some do not (packages, gems, etc) NO_PROXY is used as an exception list

Good question on the http_wire_trace, let me see if I can find a good list of AWS.config settable values

@tyler-ball
Copy link
Contributor

Gotcha - leaving http://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html here for my future reference.

I don't think there is an AWS config value for no_proxy so we'll probably have to inspect the list ourselves and only apply the http_proxy variable if AWS isn't in the no_proxy list. What value are you specifying for AWS in the NO_PROXY list?

@huntertj
Copy link
Author

here is what I have
NO_PROXY=localhost,127.0.1.1,sts.amazonaws.com,ec2.us-east-1.amazonaws.com,.amazonaws.com,.rubygems.org,supermarket.chef.io,s3.amazonaws.com,192.168.59.103

@tyler-ball tyler-ball added this to the 0.10.0 milestone Jun 24, 2015
@tyler-ball
Copy link
Contributor

Hey @huntertj we decided to solve this without code. Even though you have HTTP_PROXY in your env, you can add http_proxy: nil under the driver settings of your .kitchen.yml. This should remove the proxy settings when calling AWS. Since this is our recommendation for other users who face this same issue I will update the README.

@huntertj
Copy link
Author

👍

@ghost
Copy link

ghost commented Dec 23, 2015

I am not sure if this is relevant here but setting no_proxy is a completely valid use case and here is mine.

I need to set my http_proxy & https_proxy environment variables to call out to AWS and I am setting http_proxy and https_proxy under driver_config in the .kitchen.yml configuration file. I am also setting no_proxy under driver_config in the .kitchen.yml file because I am making a call out to http://169.254.169.254/latest/meta-data/local-ipv4 in order to get the IP address of my instance. However because I cannot set the no_proxy environment variable, calling out to this URL attempts to go through my proxy and it is failing.

@briandoodyie
Copy link

I'm seeing the same issue as @st-isidore-de-seville . If you look at the command being passed in the setup phase, it passes values from the .kitchen.yml file for http_proxy and https_proxy but ignores any values in no_proxy.

@ghost
Copy link

ghost commented Jan 27, 2017

was this eventually fixed out of curiosity before its closure?

@smurawski
Copy link

@pantocrator27 @briandoodyie @st-isidore-de-seville This should be resolved in the next release of test-kitchen. The fix is in master now - test-kitchen/test-kitchen@e09c902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants