tmatilai / vagrant-proxyconf

Vagrant plugin that configures the virtual machine to use proxies
MIT License
531 stars 74 forks source link

Proxy fails with ppa: URIs #88

Closed chimericdream closed 5 years ago

chimericdream commented 10 years ago

When switching back and forth between environments with and without a proxy (e.g. work and home), the proxy settings for apt repositories using PPA URIs become invalid.

I can reproduce this by doing the following:

The last step fails with an error similar to the one below:

==> default: ================================================================================
==> default: Error executing action `add` on resource 'apt_repository[php5-5.6]'
==> default: ================================================================================
==> default: RuntimeError
==> default: ------------
==> default:
==> default: Non-HTTP proxy URI:
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/apt/providers/repository.rb:109:in `get_ppa_key'
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/apt/providers/repository.rb:134:in `get_ppa_url'
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/apt/providers/repository.rb:166:in `block in class_from_file'
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/quasarvm/recipes/default.rb
==> default:
==> default:   5: apt_repository 'php5-5.6' do
==> default:   6:   uri          'ppa:ondrej/php5-5.6'
==> default:   7:   distribution node['lsb']['codename']
==> default:   8: end
==> default:   9:

I originally came across this issue when testing possible configuration issues (on my end) related to issue #87.

otahi commented 10 years ago

@chimericdream Can you give us a small set of Vagrantfile and related items which can produce this.

I think you use cookbook for apt, but it is difficult to understand without Vagrantfile. If I can reproduce this phenomenon, it could be easy to understand for me.

Thank you.

chimericdream commented 10 years ago

Certainly. I'll try to pare down the machine I'm working with to the minimum set of cookbooks that can reproduce the issue and post a link as soon as I can.

tmatilai commented 9 years ago

@chimericdream sorry, I don't seem to be able to reproduce this myself. If you can't provide a repro setup, could you at least set chef.log_level = :debug, run vagrant provision --debug, and gist all the huge amount of output?

The error seems to come from OpenURI/Net::HTTP, so this might Ruby version specific issue too. Or Chef version specific, the latest releases handle proxies better than the earlier ones.

codylane commented 5 years ago

Closing issue, no further information received.