{"action":"created","issue":{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/821","labels_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/821/labels{/name}","comments_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/821/comments","events_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/821/events","html_url":"https://github.com/test-kitchen/test-kitchen/issues/821","id":103073827,"number":821,"title":"No Proxy Settings in Setup Phase","user":{"login":"LevonBecker","id":5041204,"avatar_url":"https://avatars.githubusercontent.com/u/5041204?v=3","gravatar_id":"","url":"https://api.github.com/users/LevonBecker","html_url":"https://github.com/LevonBecker","followers_url":"https://api.github.com/users/LevonBecker/followers","following_url":"https://api.github.com/users/LevonBecker/following{/other_user}","gists_url":"https://api.github.com/users/LevonBecker/gists{/gist_id}","starred_url":"https://api.github.com/users/LevonBecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LevonBecker/subscriptions","organizations_url":"https://api.github.com/users/LevonBecker/orgs","repos_url":"https://api.github.com/users/LevonBecker/repos","events_url":"https://api.github.com/users/LevonBecker/events{/privacy}","received_events_url":"https://api.github.com/users/LevonBecker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/labels/Waiting","name":"Waiting","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-25T17:10:17Z","updated_at":"2015-11-14T14:24:34Z","closed_at":null,"body":"So the client I'm currently working for has an obnoxious proxy that requires creds etc.\r\n\r\n## Environment\r\n\r\n* Mac OS X Yosemite\r\n* ChefDK 0.7.0\r\n  * Kitchen 1.4.2\r\n  * kitchen-vagrant 0.18.0\r\n* VirtualBox 5.0.0\r\n* Vagrant 1.7.4\r\n* Charles Proxy 3.10.2\r\n* CentOS 6.6/7.1 Guest\r\n\r\n## Kitchen Config (.kitchen.yml)\r\n```yaml\r\nprovisioner:\r\n  name: chef_zero\r\n  require_chef_omnibus: 12.3.0\r\n  http_proxy: http://10.0.2.2:8888\r\n  https_proxy: http://10.0.2.2:8888\r\n  no_proxy: 'localhost,127.0.0.1,10.0.2.,33.33.33.,.customerdomain.com'\r\n```\r\n\r\n## Proxy Settings Not Included in Setup/Verfy Stage\r\nAdding the above to the .kitchen.yml fixes everything up to the phase where it needs to download Gems for ServerSpec. It seems the proxy is not set during the ***setup*** stage.\r\n\r\nAs a test I added the following to the vagrant user ***~/.bashrc*** and it ***Fixes*** the problem.\r\n\r\n```bash\r\nexport http_proxy=http://10.0.2.2:8888\r\nexport https_proxy=https://10.0.2.2:8888\r\nexport no_proxy=localhost,127.0.0.1,10.0.2.,33.33.33.,.customerdomain.com\r\n```\r\n\r\n**Charles Proxy is basically a application that runs your own local proxy that you point all you Dev tools to and it saves your creds securely and in one spot (Easier for when changing password). So from a Vagrant guest to get to the hosted system it's IP 10.0.2.2 blah, and whatever port you tell Charles Proxy to listen on 8888 blah.**\r\n\r\nBam, that fixes the issue.  Which proves that the proxy is not getting set by the Kitchen code during the ***setup*** stage.\r\n\r\nI have not had time to dig into the Kitchen code to find exactly where the problem is... If I have time I will.\r\n\r\n## Errror\r\n```bash\r\n-----> Starting Kitchen (v1.4.2)\r\n-----> Setting up <base-rh-centos-66>...\r\n       Finished setting up <base-rh-centos-66> (0m0.00s).\r\n-----> Verifying <base-rh-centos-66>...\r\n       Preparing files for transfer\r\n-----> Installing Busser (busser)\r\n       ERROR:  Could not find a valid gem 'busser' (>= 0), here is why:\r\n          Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/specs.4.8.gz)\r\n       sh: line 23: /tmp/verifier/gems/bin/busser: No such file or directory\r\n       Installing Busser plugins: busser-serverspec\r\n       sudo: /tmp/verifier/bin/busser: command not found\r\n>>>>>> Verify failed on instance <base-rh-centos-66>.\r\n>>>>>> Please see .kitchen/logs/base-rh-centos-66.log for more details\r\n>>>>>> ------Exception-------\r\n>>>>>> Class: Kitchen::ActionFailed\r\n>>>>>> Message: SSH exited (1) for command: [sh -c '\r\n\r\nBUSSER_ROOT=\"/tmp/verifier\"; export BUSSER_ROOT\r\nGEM_HOME=\"/tmp/verifier/gems\"; export GEM_HOME\r\nGEM_PATH=\"/tmp/verifier/gems\"; export GEM_PATH\r\nGEM_CACHE=\"/tmp/verifier/gems/cache\"; export GEM_CACHE\r\nruby=\"/opt/chef/embedded/bin/ruby\"\r\ngem=\"/opt/chef/embedded/bin/gem\"\r\nversion=\"busser\"\r\ngem_install_args=\"busser --no-rdoc --no-ri\"\r\nbusser=\"sudo -E /tmp/verifier/bin/busser\"\r\nplugins=\"busser-serverspec\"\r\n\r\n$gem list busser -i 2>&1 >/dev/null\r\nif test $? -ne 0; then\r\n  echo \"-----> Installing Busser ($version)\"\r\n  $gem install $gem_install_args\r\nelse\r\n  echo \"-----> Busser installation detected ($version)\"\r\nfi\r\n\r\nif test ! -f \"$BUSSER_ROOT/bin/busser\"; then\r\n  gem_bindir=`$ruby -rrubygems -e \"puts Gem.bindir\"`\r\n  $gem_bindir/busser setup\r\nfi\r\n\r\necho \"       Installing Busser plugins: $plugins\"\r\n$busser plugin install $plugins\r\n']\r\n>>>>>> ----------------------\r\nzlib(finalizer): the stream was freed prematurely.\r\n```\r\n\r\nThanks in advance for any help!\r\n\r\n-=Levon"},"comment":{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/comments/156702977","html_url":"https://github.com/test-kitchen/test-kitchen/issues/821#issuecomment-156702977","issue_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/821","id":156702977,"user":{"login":"eriepasquare","id":12872578,"avatar_url":"https://avatars.githubusercontent.com/u/12872578?v=3","gravatar_id":"","url":"https://api.github.com/users/eriepasquare","html_url":"https://github.com/eriepasquare","followers_url":"https://api.github.com/users/eriepasquare/followers","following_url":"https://api.github.com/users/eriepasquare/following{/other_user}","gists_url":"https://api.github.com/users/eriepasquare/gists{/gist_id}","starred_url":"https://api.github.com/users/eriepasquare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eriepasquare/subscriptions","organizations_url":"https://api.github.com/users/eriepasquare/orgs","repos_url":"https://api.github.com/users/eriepasquare/repos","events_url":"https://api.github.com/users/eriepasquare/events{/privacy}","received_events_url":"https://api.github.com/users/eriepasquare/received_events","type":"User","site_admin":false},"created_at":"2015-11-14T14:24:34Z","updated_at":"2015-11-14T14:24:34Z","body":"+1"}}