Open srinat999 opened 8 years ago
Since you're using a proxy, you'll need to add an env
section with your http_proxy
settings. The referenced properties are listed on bosh.io. Something like...
cloud_provider:
properties:
openstack: *openstack
env:
http_proxy: ((...your proxy...))
And also add env
with the proxy settings to jobs[0].properties
as well if your director will need to use a proxy.
Hi,
Thanks for the response. Unfortunately it still doesn't go through. Could you confirm that this is the step where it is trying to upload the stemcell to OpenStack? If you can point me to towards the API that it is using, I can manually check if the API is working?
Thanks Sreenath
Hi @beyhan
I investigated the issue with OpenStack and it was indeed a problem with the image upload API. I fixed it and so I was able to progress further. However, in the instance creation step the process fails. This is the error that I get:
Uploading stemcell 'bosh-openstack-kvm-ubuntu-trusty-go_agent/3262.9'... Skipped [Stemcell already uploaded] (00:00:00)
Started deploying
Creating VM for instance 'bosh/0' from stemcell '313ba8c2-d86f-49f8-bf88-c037ca9e9f08'... Failed (00:02:49)
Failed deploying (00:02:49)
Stopping registry... Finished (00:00:00)
Cleaning up rendered CPI jobs... Finished (00:00:00)
Command 'deploy' failed:
Deploying:
Creating instance 'bosh/0':
Creating VM:
Creating vm with stemcell cid '313ba8c2-d86f-49f8-bf88-c037ca9e9f08':
CPI 'create_vm' method responded with error: CmdError{"type":"Bosh::Clouds::VMCreationFailed","message":"Cannot update settings for 'vm-16604189-41ce-4c22-ba7b-598fd80f4a76', got HTTP 301","ok_to_retry":false}
I also tried the api for creating an instance:
curl -v -s -X POST -H "X-Auth-Token: xxxx" https://10.10.0.10:8774/v2/466a67b24b694f36b48defabd2ebe751/servers -d '{"server": {"name": "auto-allocate-network","imageRef": "313ba8c2-d86f-49f8-bf88-c037ca9e9f08","flavorRef": "http://openstack.example.com/flavors/1","networks":[{"uuid":"99828b4e-cb2b-45bf-97e2-852388bc16c0"}]}}' -H "Content-Type: application/json"
This works and the instance is created. What do you think the problem is?
Thanks Sreenath
Hi @srinat999,
Error happens after VM creation. Bosh-init fails to update the BOSH registry with the settings of the VM which has been created. Bosh-init starts a BOSH registry on your machine where bosh-init is executed. The registry is required for the deployment and it's available on port 6901
(see here). After VM creation bosh-init executes a put request with the url http://127.0.0.1:6901/instances/<instance_id>/settings
to update the registry. In your case you are getting an http response of 301
. Is something else running on port `6901?
So I was trying to bootstrap a BOSH environment on OpenStack using the instructions given here and I got this error at the bosh-init deploy step
I'm assuming this is the step where it is trying to upload the stemcell as an image to the OpenStack and for some reason it is failing. I'm not sure whether its an error at my OpenStack side as creation of a normal Ubuntu server image from here also throws an error in OpenStack.
For reference here is my bosh.yml
I'm also under a proxy and I have added the relevant IPs to my no_proxy variable.