Re: Specifying proxies on the bosh-init cpi job (bosh-vsphere-cpi-release)


Allan Espinosa
 

Argh sorry. Read the cpi job spec again

Apparently I have the hash at the wrong level.

s/cpi.env.http_proxy/env.http_proxy/

-----Original Message-----
From: cf-bosh-bounces(a)lists.cloudfoundry.org [mailto:cf-bosh-
bounces(a)lists.cloudfoundry.org] On Behalf Of Espinosa, Allan | Allan | OPS
Sent: Mierkoles, Hunyo 10, 2015 10:00 AM
To: cf-bosh(a)lists.cloudfoundry.org
Subject: [cf-bosh] Specifying proxies on the bosh-init cpi job (bosh-vsphere-
cpi-release)

Hi,

We need specify https_proxy to connected to our avcenters. We're able to
do this when we deploy Bosh directors using bosh micro and multi-bosh
setups. But I cannot get it running under bosh init.

I built a dev release from the latest master of bosh-vsphere-cpi-release that
incorporates the proxy environment variables for the cpi job. However, as far
as I understand from the logs below, bosh-init doesn't actually execute the
job but the cpi binary directly:

manifest:

cloud_provider:
mbus: ...
properties:
agent: ...
blobstore: ...
cpi: &cpi
env:
http_proxy: http://myproxy.server:3182
https_proxy: myproxy.server:3182
no_proxy: 127.0.0.1
ntp: ...
vcenter: ...
template:
name: cpi
release: bosh-vsphere-cpi

properties:
...
cpi: *cpi
director:
...
env:
http_proxy: http://myproxy.server:9501
https_proxy: http://myproxy.server:9501
no_proxy: 127.0.0.1



BOSH_INIT_LOG_LEVEL=debug bosh-init deploy meta.yml

[cloud] 2015/06/10 00:50:03 DEBUG - Creating stemcell [Cmd Runner]
2015/06/10 00:50:03 DEBUG - Running command:
/home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/jobs/cpi/bin/cpi
[Cmd Runner] 2015/06/10 00:50:35 DEBUG - Stdout:
[Cmd Runner] 2015/06/10 00:50:35 DEBUG - Stderr:
/home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient/session.rb:805:in `initialize': execution expired
(HTTPClient::ConnectTimeoutError)
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient/session.rb:805:in `new'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient/session.rb:805:in `create_socket'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient/session.rb:752:in `block in connect'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient/session.rb:751:in `connect'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient/session.rb:609:in `query'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient/session.rb:164:in `query'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient.rb:1087:in `do_get_block'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient.rb:891:in `block in do_request'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9
.1/gems/httpclient-2.4.0/lib/httpclient.rb:985:in
`protect_keep_alive_disconnected'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient.rb:890:in `do_request'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient.rb:778:in `request'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/httpclie
nt-2.4.0/lib/httpclient.rb:684:in `post'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/ruby_vim_sdk/soap/stub_adapter.rb:29:in
`invoke_method'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/ruby_vim_sdk/vmodl/managed_object.rb:13:in
`invoke_method'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/ruby_vim_sdk/vmodl/managed_object.rb:45:in
`block (3 levels) in finalize'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/ruby_vim_sdk/soap/stub_adapter.rb:57:in
`invoke_property'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/ruby_vim_sdk/vmodl/managed_object.rb:17:in
`invoke_property'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/ruby_vim_sdk/vmodl/managed_object.rb:30:in
`block (3 levels) in finalize'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/cloud/vsphere/client.rb:16:in `initialize'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/cloud/vsphere/config.rb:43:in `new'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/cloud/vsphere/config.rb:43:in `client'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/cloud/vsphere/cloud.rb:18:in `initialize'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/cloud/vsphere.rb:49:in `new'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/lib/cloud/vsphere.rb:49:in `initialize'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/bin/vsphere_cpi:23:in `new'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/gem_home/ruby/1.9.1/gems/bosh_v
sphere_cpi-1.2922.0/bin/vsphere_cpi:23:in `<top (required)>'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/bin/vsphere_cpi:16:in `load'
from /home/myuser/.bosh_init/installations/3a44e2b2-9fed-40a4-457c-
8e0696b5cba8/packages/vsphere_cpi/bin/vsphere_cpi:16:in `<main> [Cmd
Runner] 2015/06/10 00:50:35 DEBUG - Successful: true (0)


--end snippet---

Am I setting the right environment variable in the right place? I get the same
problem when I tried specifying the proxy environment variables for bosh-
init itself:

https_proxy=http://myproxy:3182 http_proxy=http://myproxy:3182
BOSH_INIT_LOG_LEVEL=debug bosh-init deploy meta.yml

Thanks
Allan
_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh

Join {cf-bosh@lists.cloudfoundry.org to automatically receive all group messages.