cloudfoundry-community / bosh-cloudstack-cpi-release

a bosh external CPI Provider for CloudStack Iaas
Apache License 2.0
5 stars 7 forks source link

Unability to use bosh create-env with cpi #58

Open ArthurHlt opened 6 years ago

ArthurHlt commented 6 years ago

When I try to run:

bosh-cli create-env /Users/arthurhalet/support/dev/bosh-deployment/bosh.yml \
    --state=state.json \
    --vars-store=creds.yml \
    -o /path/to/cpi.yml \
    -v director_name=bosh-1 \
    -v internal_cidr=10.0.0.0/24 \
    -v internal_gw=10.0.0.1 \
    -v internal_ip=10.0.0.6 \
    -v network_name="VM Network"

after using https://github.com/orange-cloudfoundry/bosh-deployment/tree/add-cloudstack to add cloudstack manifest i'm getting this error:

creating stemcell (bosh-cloudstack-xen-ubuntu-trusty-go_agent 3421.19):
  Executing external CPI command: '/Users/arthurhalet/.bosh/installations/2a3e5d29-0417-45e7-79df-f7f5ebe55657/jobs/cloudstack_cpi/bin/cpi':
    Running command: '/Users/arthurhalet/.bosh/installations/2a3e5d29-0417-45e7-79df-f7f5ebe55657/jobs/cloudstack_cpi/bin/cpi', stdout: '', stderr: '':
      exit status 7

Exit code 1

Indeed, this cpi need to be ran in java first to start the server and the binary cpi is only a curl command hitting the webserver. (exit status 7 mean in curl Failed to connect() to host or proxy.)

This behaviour is due to the fact that other cpi are rpc binary which can be ran as it is and are not web server with an api. Java could be also tricky to run as rpc as it could take time to be launch.

This can be reproduce by everyone without setting an cloud stack environment as it failed before sending any command to cloudstack.