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

s3_file fails to load instance profile when ENV['http_proxy'] is set. #49

Closed
grosendorf opened this issue May 8, 2015 · 3 comments
Closed

Comments

@grosendorf
Copy link

When http_proxy is set in a node's client.rb, the s3_file provider fails to load the instance profile. It instead loads the proxy's instance profile (if it exists), otherwise is raises the following ArgumentError
No credentials provided and no instance profile on this machine.

@vigith
Copy link

vigith commented Jul 8, 2015

looks like it doesn't respond no_proxy

I made the following change in s3_file/libraries/s3_file.rb

@@ -140,6 +140,8 @@
   def self.client
     require 'rest-client'
     RestClient.proxy = ENV['http_proxy']
+    RestClient.proxy = ENV['https_proxy']
+    RestClient.proxy = ENV['no_proxy']
     RestClient
   end

@joekiller
Copy link
Collaborator

thanks for reporting this

@joekiller
Copy link
Collaborator

fix is live

dldinternet pushed a commit to dldinternet/s3_file that referenced this issue Dec 14, 2015
* master:
  Respect https_proxy and no_proxy fix adamsb6#49
  v2.6.3
  Add compile_time false to suppress warning
  Detect a dot and, if present, use "path style" S3 URL
  v2.6.2
  use markdown to close adamsb6#55
  Remove deprecation warning when accessing headers.
  Don't retry if error in s3_file is no invalid response.
  Support redirects when fetching S3 files.
  Add SigV4 support to s3_file cookbook.
  Add some Test Kitchen Integration tests.
  update changelog
  s3_file v2.5.4
  Adds version constraint on rest-client
  s3_file version 2.5.3
  update changelog
  Added end line
  Move chef_gem install to a recipe, so it is only called once.

# Conflicts:
#	.gitignore
#	libraries/s3_file.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants