tmatilai / vagrant-proxyconf

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

New release? #123

Closed achingbrain closed 9 years ago

achingbrain commented 9 years ago

I just installed this plugin using vagrant plugin install vagrant-proxyconf to use it with CoreOS but the version vagrant installed doesn't have this change so the vm fails to come up complaining about the undeclared tmp variable:

/Users/me/.vagrant.d/gems/gems/vagrant-proxyconf-1.5.0/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb:24:in `block in docker_proxy_conf': undefined local variable or method `tmp' for VagrantPlugins::ProxyConf::Cap::CoreOS::DockerProxyConf:Module (NameError)
    from /Users/me/.vagrant.d/gems/gems/vagrant-proxyconf-1.5.0/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb:13:in `tap'
    from /Users/me/.vagrant.d/gems/gems/vagrant-proxyconf-1.5.0/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb:13:in `docker_proxy_conf'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/capability_host.rb:111:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/capability_host.rb:111:in `capability'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/guest.rb:43:in `capability'
    from /Users/me/.vagrant.d/gems/gems/vagrant-proxyconf-1.5.0/lib/vagrant-proxyconf/action/base.rb:121:in `supported?'
    from /Users/me/.vagrant.d/gems/gems/vagrant-proxyconf-1.5.0/lib/vagrant-proxyconf/action/base.rb:19:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/me/.vagrant.d/gems/gems/vagrant-proxyconf-1.5.0/lib/vagrant-proxyconf/action/configure_chef_proxy.rb:29:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/me/.vagrant.d/gems/gems/vagrant-proxyconf-1.5.0/lib/vagrant-proxyconf/action/base.rb:26:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
...

Is there any chance of a new release that has the most recent code?

otahi commented 9 years ago

@achingbrain Thank you for your reporting. @tmatilai Do you have time to release 1.5.1?

tmatilai commented 9 years ago

Oh, yeah... Would love to spend some time with this project again. But not sure when. The release should be easy though.

ch33hau commented 9 years ago

Hi, I'm facing the same issue as well.

While waiting for release 1.5.1, the workaround would be manually update the invalid local variable in this file: /Users/me/.vagrant.d/gems/gems/vagrant-proxyconf-1.5.0/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb

At line 24, update the tmp to tmp_file and it will looks like:

comm.sudo("rm -f #{tmp_file}")

Or you can also refer to https://github.com/tmatilai/vagrant-proxyconf/blob/master/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb

oveits commented 9 years ago

@ch33hau: thanks a lot for your workaround. It has worked for me quite well. @tmatilai: this is a very nice plugin; thanks a lot for it. With the workaround of ch33hau, it works like a charm. Is there still a plan to correct the issue?

tmatilai commented 9 years ago

I'm very sorry for the delay. This was so tiny change it should have been released long time ago.

But v1.5.1 is finally released now. Thanks for the pings.

otahi commented 9 years ago

@tmatilai Thank you for the release!

oveits commented 9 years ago

@tmatilai: Thanks for resolving the issue. This helps me keeping the documentation of my mini-project simpler (a fork of coreos-vagrant that automates the distribution of private SSH keys and helps with HTTP proxy settings).

P.S.: I hope it is O.K. to pose this question here: the proxy settings are kind of statically provisioned (e.g. if the proxy environment changes, which happens twice a day on my notebook, the CoreOS cluster needs to be reloaded in order for the started services like fleet to work correctly again). Is there a way to tell Linux to try to connect to the Internet directly in runtime, if the HTTP proxy is not responsive?