cloudfoundry / bosh

Cloud Foundry BOSH is an open source tool chain for release engineering, deployment and lifecycle management of large scale distributed services.
https://bosh.io
Apache License 2.0
2.04k stars 657 forks source link

Fail to setup BOSH with vsphere with BOSH version 2830 #750

Closed fckbo closed 9 years ago

fckbo commented 9 years ago

Hello,

I'm a newbie on BOSH so sorry if this question is stupid....I've been playing with BOSH for few days now and got a old release (912) running on vsphere but when I tried with a newer version (2830) and I'm getting an error (see below).

I'm getting the stemcells & release from here: http://bosh_artifacts.cfapps.io.

the vms are created root@ubuntu1404:~/my-bosh-deployment# bosh vms Deployment `bosh2' Director task 27 Task 27 done

+-------------+---------+---------------+----------------+ | Job/index | State | Resource Pool | IPs | +-------------+---------+---------------+----------------+ | bosh_api/0 | running | default | 10.105.144.237 | | bosh_data/0 | running | default | 10.105.144.238 | +-------------+---------+---------------+----------------+ VMs total: 2

& strangely, "bosh cloudcheck bosh2" returns "No problems found" (bosh2 is the name of my instance)

Any idea about the cause of this pb ? (See below traces observed & manifest used) Thx beforehand.

1) HERE IS THE OUTPUT OF THE DEPLOY

root@ubuntu1404:~/my-bosh-deployment# bosh deployment bosh.yml Deployment set to `/root/my-bosh-deployment/bosh.yml' root@ubuntu1404:~/my-bosh-deployment# bosh deploy

Processing deployment manifest

Getting deployment properties from director... Unable to get properties list from director, trying without it... Compiling deployment manifest... Cannot get current deployment information from director, possibly a new deployment Please review all changes carefully

Deploying

Deployment name: bosh.yml' Director name:microbosh' Are you sure you want to deploy? (type 'yes' to continue): yes

Director task 25 Deprecation: Please use templates' when specifying multiple templates for a job.template' for multiple templates will soon be unsupported.

Deprecation: Please use templates' when specifying multiple templates for a job.template' for multiple templates will soon be unsupported.

Started preparing deployment Started preparing deployment > Binding deployment. Done (00:00:00) Started preparing deployment > Binding releases. Done (00:00:00) Started preparing deployment > Binding existing deployment. Done (00:00:00) Started preparing deployment > Binding resource pools. Done (00:00:00) Started preparing deployment > Binding stemcells. Done (00:00:00) Started preparing deployment > Binding templates. Done (00:00:00) Started preparing deployment > Binding properties. Done (00:00:00) Started preparing deployment > Binding unallocated VMs. Done (00:00:00) Started preparing deployment > Binding instance networks. Done (00:00:00) Done preparing deployment (00:00:00)

Started preparing package compilation > Finding packages to compile. Done (00:00:00)

Started preparing dns > Binding DNS. Done (00:00:00)

Started creating bound missing vms Started creating bound missing vms > default/0 Started creating bound missing vms > default/1 Done creating bound missing vms > default/0 (00:00:47) Done creating bound missing vms > default/1 (00:00:47) Done creating bound missing vms (00:00:47)

Started binding instance vms Started binding instance vms > bosh_api/0 Started binding instance vms > bosh_data/0 Done binding instance vms > bosh_api/0 (00:00:00) Done binding instance vms > bosh_data/0 (00:00:00) Done binding instance vms (00:00:00)

Started preparing configuration > Binding configuration. Failed: Error filling in template director.yml.erb.erb' forbosh_api/0' (line 332: undefined method `each' for nil:NilClass) (00:00:00)

Error 100: Error filling in template director.yml.erb.erb' forbosh_api/0' (line 332: undefined method `each' for nil:NilClass)

Task 25 error

For a more detailed error report, run: bosh task 25 --debug

2) HERE IS THE BEGINNING OF THE DEBUG FILE (that includes the manifest)

Director task 25 I, [2015-02-07T18:24:54.493001 #1233] [0x3f9ce1dbd324] INFO -- TaskHelper: Director Version: 1.2830.0 I, [2015-02-07T18:24:54.493073 #1233] [0x3f9ce1dbd324] INFO -- TaskHelper: Enqueuing task: 25 I, [2015-02-07 18:24:54 #5516] [] INFO -- DirectorJobRunner: Looking for task with task id 25 D, [2015-02-07 18:24:54 #5516] [] DEBUG -- DirectorJobRunner: (0.000591s) SELECT * FROM "tasks" WHERE "id" = 25 I, [2015-02-07 18:24:54 #5516] [] INFO -- DirectorJobRunner: Starting task: 25 I, [2015-02-07 18:24:54 #5516] [task:25] INFO -- DirectorJobRunner: Creating job I, [2015-02-07 18:24:54 #5516] [task:25] INFO -- DirectorJobRunner: Reading deployment manifest

D, [2015-02-07 18:24:54 #5516] [task:25] DEBUG -- DirectorJobRunner: Manifest:

name: bosh2 logging: -level: DEBUG director_uuid: 35b5ea35-213b-4494-8fb7-c1c191178824 release: name: bosh version: 139 networks:

I, [2015-02-07 18:24:54 #5516] [task:25] INFO -- DirectorJobRunner: Creating deployment plan I, [2015-02-07 18:24:54 #5516] [task:25] INFO -- DirectorJobRunner: Deployment plan options: {}

3) HERE IS THE END OF THE DEBUG FILE (that includes the error traces)

I, [2015-02-07 18:25:43 #5516] [task:25] INFO -- DirectorJobRunner: Binding configuration D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Downloading template blobstore' (5813adb9-be71-4dd6-a28b-c56d4285b6c3)... D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Templateblobstore' downloaded to /var/vcap/data/tmp/director/template-3d617414-9a8a-403f-bb51-a6aa43b1d2eb (took 0.00196793s) D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Downloading template postgres' (7c72ca1a-a125-4e34-947b-561ece179849)... D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Templatepostgres' downloaded to /var/vcap/data/tmp/director/template-5b86eed9-44fa-4e60-9590-55eb44e4c094 (took 0.001658084s) D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Downloading template redis' (0970103e-beba-4c09-8d45-7bb8d6f68e42)... D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Templateredis' downloaded to /var/vcap/data/tmp/director/template-87ad6318-893e-4c93-8ad1-508d813e48c3 (took 0.001621872s) D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: (0.000787s) SELECT * FROM "rendered_templates_archives" WHERE ("rendered_templates_archives"."instance_id" = 16) ORDER BY "created_at" DESC LIMIT 1 D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: (0.000130s) BEGIN D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: (0.000603s) INSERT INTO "rendered_templates_archives" ("blobstore_id", "sha1", "content_sha1", "created_at", "instance_id") VALUES ('ff12cbfa-5a19-412d-9d74-37b7bff4081a', 'c583ac6b01b58bb7254f62b551bf30f393f218ba', '3718c7cee2f33e333b82dd744cc7c152bbc84473', '2015-02-07 18:25:43.754353+0000', 16) RETURNING * D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: (0.000303s) COMMIT D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Downloading template nats' (13bfe8e2-9dcc-44ab-b7d0-d00f97158702)... D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Templatenats' downloaded to /var/vcap/data/tmp/director/template-9ce5dfb8-c01b-4387-9d95-38bcd4c6782c (took 0.001471583s) D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Downloading template director' (152ceb9b-df65-4e01-aef2-acd47aee5104)... D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Templatedirector' downloaded to /var/vcap/data/tmp/director/template-cc5c0bca-6f93-467d-a76c-f70efa82dea7 (took 0.001783735s) D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Downloading template health_monitor' (0ffaf10b-bbd3-4df7-9697-e7c319a06494)... D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Templatehealth_monitor' downloaded to /var/vcap/data/tmp/director/template-1e0013fc-88fa-4d55-8680-1385f7095640 (took 0.001549402s) D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Downloading template powerdns' (4207cae4-42e1-4029-ab65-4cf0c95ab54d)... D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Templatepowerdns' downloaded to /var/vcap/data/tmp/director/template-30d0e869-0f7e-4ee5-bbcc-402a7d8c65b6 (took 0.001550487s) D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: #<NoMethodError: undefined method each' for nil:NilClass> D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Error filling in templatedirector.yml.erb.erb' forbosh_api/0' (line 332: undefined methodeach' for nil:NilClass) director/director.yml.erb.erb:332:inblock (4 levels) in get_binding' director/director.yml.erb.erb:330:ineach' director/director.yml.erb.erb:330:inblock (3 levels) in get_binding' director/director.yml.erb.erb:327:ineach' director/director.yml.erb.erb:327:inblock (2 levels) in get_binding' director/director.yml.erb.erb:318:ineach' director/director.yml.erb.erb:318:inblock in get_binding' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-template-1.2830.0/lib/bosh/template/evaluation_context.rb:101:inif_p' director/director.yml.erb.erb:308:inget_binding' /var/vcap/packages/ruby/lib/ruby/2.1.0/erb.rb:850:ineval' /var/vcap/packages/ruby/lib/ruby/2.1.0/erb.rb:850:inresult' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/source_erb.rb:17:inrender' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_template_renderer.rb:25:inblock in render' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_template_renderer.rb:24:inmap' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_template_renderer.rb:24:inrender' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_instance_renderer.rb:14:inblock in render' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_instance_renderer.rb:12:inmap' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_instance_renderer.rb:12:inrender' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_renderer.rb:20:inrender_job_instance' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_renderer.rb:16:inblock in render_job_instances' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_renderer.rb:16:ineach' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_renderer.rb:16:inrender_job_instances' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/assembler.rb:324:inblock in bind_configuration' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/assembler.rb:323:ineach' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/assembler.rb:323:inbind_configuration' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/updater.rb:35:inblock in update' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/base_job.rb:48:inblock in track_and_log' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/event_log.rb:97:incall' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/event_log.rb:97:inadvance_and_track' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/event_log.rb:50:intrack' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/base_job.rb:46:intrack_and_log' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/updater.rb:34:inupdate' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/update_deployment.rb:60:inupdate' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/update_deployment.rb:87:inblock in perform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/lock_helper.rb:21:inblock in with_deployment_lock' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/lock.rb:58:inlock' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/lock_helper.rb:21:inwith_deployment_lock' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/update_deployment.rb:79:inperform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_runner.rb:108:inperform_job' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_runner.rb:31:inblock in run' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh_common-1.2830.0/lib/common/thread_formatter.rb:49:inwith_thread_name' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_runner.rb:31:inrun' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/base_job.rb:10:inperform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/job.rb:227:inperform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/worker.rb:250:inperform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/worker.rb:189:inblock in work' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/worker.rb:166:inloop' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/worker.rb:166:inwork' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/bin/bosh-director-worker:83:in<top (required)>' /var/vcap/packages/director/bin/bosh-director-worker:16:inload' /var/vcap/packages/director/bin/bosh-director-worker:16:in<main>' D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: (0.000884s) SELECT "stemcells".\* FROM "stemcells" INNER JOIN "deployments_stemcells" ON (("deployments_stemcells"."stemcell_id" = "stemcells"."id") AND ("deployments_stemcells"."deployment_id" = 6)) D, [2015-02-07 18:25:43 #5516] [] DEBUG -- DirectorJobRunner: Lock renewal thread exiting D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Deleting lock: lock:deployment:bosh2 D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: Deleted lock: lock:deployment:bosh2 I, [2015-02-07 18:25:43 #5516] [task:25] INFO -- DirectorJobRunner: sending update deployment error event D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: SENT: hm.director.alert {"id":"7d4e345b-c4e2-45d3-9b92-5ad58f5c98ff","severity":3,"title":"director - error during update deployment","summary":"Error during update deployment for bosh2 against Director 35b5ea35-213b-4494-8fb7-c1c191178824: #<RuntimeError: Error filling in templatedirector.yml.erb.erb' for bosh_api/0' (line 332: undefined methodeach' for nil:NilClass)>","created_at":1423333543} E, [2015-02-07 18:25:43 #5516] [task:25] ERROR -- DirectorJobRunner: Error filling in template director.yml.erb.erb' forbosh_api/0' (line 332: undefined method each' for nil:NilClass) /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/source_erb.rb:32:inrescue in render' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/source_erb.rb:17:in render' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_template_renderer.rb:25:inblock in render' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_template_renderer.rb:24:in map' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_template_renderer.rb:24:inrender' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_instance_renderer.rb:14:in block in render' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_instance_renderer.rb:12:inmap' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/job_instance_renderer.rb:12:in render' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_renderer.rb:20:inrender_job_instance' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_renderer.rb:16:in block in render_job_instances' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_renderer.rb:16:ineach' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_renderer.rb:16:in render_job_instances' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/assembler.rb:324:inblock in bind_configuration' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/assembler.rb:323:in each' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/assembler.rb:323:inbind_configuration' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/updater.rb:35:in block in update' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/base_job.rb:48:inblock in track_and_log' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/event_log.rb:97:in call' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/event_log.rb:97:inadvance_and_track' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/event_log.rb:50:in track' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/base_job.rb:46:intrack_and_log' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/deployment_plan/updater.rb:34:in update' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/update_deployment.rb:60:inupdate' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/update_deployment.rb:87:in block in perform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/lock_helper.rb:21:inblock in with_deployment_lock' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/lock.rb:58:in lock' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/lock_helper.rb:21:inwith_deployment_lock' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/update_deployment.rb:79:in perform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_runner.rb:108:inperform_job' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_runner.rb:31:in block in run' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh_common-1.2830.0/lib/common/thread_formatter.rb:49:inwith_thread_name' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/job_runner.rb:31:in run' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/lib/bosh/director/jobs/base_job.rb:10:inperform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/job.rb:227:in perform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/worker.rb:250:inperform' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/worker.rb:189:in block in work' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/worker.rb:166:inloop' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/resque-1.25.2/lib/resque/worker.rb:166:in work' /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-1.2830.0/bin/bosh-director-worker:83:in<top (required)>' /var/vcap/packages/director/bin/bosh-director-worker:16:in load' /var/vcap/packages/director/bin/bosh-director-worker:16:in

' D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: (0.000089s) BEGIN D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: (0.000371s) UPDATE "tasks" SET "state" = 'error', "timestamp" = '2015-02-07 18:25:43.890471+0000', "description" = 'create deployment', "result" = 'Error filling in template director.yml.erb.erb'' forbosh_api/0'' (line 332: undefined method `each'' for nil:NilClass)', "output" = '/var/vcap/store/director/tasks/25', "checkpoint_time" = '2015-02-07 18:25:26.456490+0000', "type" = 'update_deployment', "username" = 'admin' WHERE ("id" = 25) D, [2015-02-07 18:25:43 #5516] [task:25] DEBUG -- DirectorJobRunner: (0.000351s) COMMIT I, [2015-02-07 18:25:43 #5516] [] INFO -- DirectorJobRunner: Task took 49.178562133 seconds to process.

fckbo commented 9 years ago

Hi me again,

I did change my manifest file to remove the warning about the "template" statement being deprecated when having several components deployed within the same vm by replacing with a "templateS" statement (in the job section of the manifest) thinking that it might fixed the problem but unfortunately it did not & I still have the same error as before when Binding configuration takes place:

Started preparing configuration > Binding configuration. Failed: Error filling in template director.yml.erb.erb' forbosh_api/0' (line 332: undefined method `each' for nil:NilClass) (00:00:00)

Error 100: Error filling in template director.yml.erb.erb' forbosh_api/0' (line 332: undefined method `each' for nil:NilClass)

Any idea ?

SEE BELOW THE NEW MANIFEST FILE I'M USING

name: bosh2

logging: -level: DEBUG

director_uuid: 35b5ea35-213b-4494-8fb7-c1c191178824

release: {name: bosh, version: 139}

networks:

resource_pools:

compilation: reuse_compilation_vms: true workers: 3 network: default cloud_properties: ram: 512 disk: 6000 cpu: 2

update: canaries: 1 canary_watch_time: 30000-90000 update_watch_time: 30000-90000 max_in_flight: 1

jobs:

properties: env:

ntp:

bosh-ci-push-pull commented 9 years ago

The failure reported is in rendering a director job template: https://github.com/cloudfoundry/bosh/blob/master/release/jobs/director/templates/director.yml.erb.erb

It looks like you need to provide additional properties, namely vcenter.datacenters[0].clusters. Your yaml indentation might be wrong. I can't tell.

-Karl

On Sunday, February 8, 2015, fckbo <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Hi me again,

I did change my manifest file to remove the warning about the "template" statement being deprecated when having several components deployed within the same vm by replacing with a "templateS" statement (in the job section of the manifest) thinking that it might fixed the problem but unfortunately it did not & I still have the same error as before when Binding configuration takes place:

Started preparing configuration > Binding configuration. Failed: Error filling in template director.yml.erb.erb' forbosh_api/0' (line 332: undefined method `each' for nil:NilClass) (00:00:00)

Error 100: Error filling in template director.yml.erb.erb' forbosh_api/0' (line 332: undefined method `each' for nil:NilClass)

Any idea ? SEE BELOW THE NEW MANIFEST FILE I'M USING

name: bosh2

logging: -level: DEBUG

director_uuid: 35b5ea35-213b-4494-8fb7-c1c191178824

release: {name: bosh, version: 139}

networks:

  • name: default type: manual subnets:
    • range: 10.105.144.224/28 gateway: 10.105.144.225 static:
    • 10.105.144.237
    • 10.105.144.238 reserved: # .224 is special, not sure if I need to put it in the reserved range
    • 10.105.144.235 - 10.105.144.236 # .239 is special, not sure if I need to put it in the reserved range dns:
      • 10.0.80.11
      • 10.0.80.12 cloud_properties: name: Private Network - vmnic0 vmnic2

resource_pools:

  • name: default stemcell: name: bosh-vsphere-esxi-ubuntu-trusty-go_agent version: 2830 network: default size: 5 cloud_properties: cpu: 2 ram: 512 disk: 2000

compilation: reuse_compilation_vms: true workers: 3 network: default cloud_properties: ram: 512 disk: 6000 cpu: 2

update: canaries: 1 canary_watch_time: 30000-90000 update_watch_time: 30000-90000 max_in_flight: 1

jobs:

-

name: bosh_data templates:

  • name: blobstore
    • name: postgres
    • name: redis instances: 1 resource_pool: default persistent_disk: 8_000 networks:
    • name: default static_ips: [10.105.144.238]
  • name: bosh_api templates:

  • name: nats
    • name: director
    • name: health_monitor
    • name: powerdns instances: 1 resource_pool: default networks:
    • name: default static_ips: [10.105.144.237]

properties: env:

ntp:

  • servertime.service.softlayer.com

nats: user: nats password: nats-password address: 10.105.144.237 port: 4222

blobstore: address: 10.105.144.238 port: 25251 backend_port: 25552 agent: user: agent password: agent director: user: director password: director

postgres: &bosh_db user: bosh password: bosh host: 10.105.144.238 port: 5432 database: bosh

redis: password: redis address: 10.105.144.238 port: 25255

director: name: bosh2 address: 10.105.144.237 port: 25555 encryption: false

Check if the CPI for your IaaS supports snapshots, otherwise disable it.

As an example vCloud CPI 0.5.2 does not support snapshots

enable_snapshots: false max_tasks: 100 db: *bosh_db

If needed, limit the number of threads used to concurrently instantiate

new vms (32 by default)

max_threads: 1

hm: http: port: 25923 user: admin password: admin director_account: user: admin password: admin intervals: poll_director: 60 poll_grace_period: 30 log_stats: 300 analyze_agents: 60 agent_timeout: 180 rogue_agent_alert: 180 loglevel: info email_notifications: false tsdb_enabled: false cloud_watch_enabled: false resurrector_enabled: true

dns: address: 10.105.144.237 recursor: 10.0.80.11 db: *bosh_db

vcenter: address: 10.105.220.39 user: Administrator password: a5pattes datacenters:

  • name: bschmcSL1 vm_folder: mycfvm template_folder: mycftemplate disk_path: /cfdir datastore_pattern: datastore1 persistent_datastore_pattern: datastore1 allow_mixed_datastores: true clusters:
  • cfcluster:

— Reply to this email directly or view it on GitHub https://github.com/cloudfoundry/bosh/issues/750#issuecomment-73433277.

jbayer commented 9 years ago

may also want to post on bosh-users@cloudfoundry.org which has many eyeballs

fckbo commented 9 years ago

Karl,

thx a lot that was it!! Apparently I need to specify a resource pool under the cluster name.

What bugs me a bit is that: 1) As I said this manifest is working properly with release 912 (but ok things change ...) 2) but reading the documentation here http://docs.cloudfoundry.org/bosh/vsphere-cpi.html#resource-pools, it says resource pool is optional:

" clusters [Array, required]: Array of clusters to use for VM placement.

[String, required]: Cluster name. resource_pool [String, optional]: Specific vSphere resource pool to use within the cluster." I actually put the following clusters: - cfcluster: resource_pool: mycf without creating the resource_pool "mycf" on vcenter and it worked: Install succeeded, still need to check now that I can deploy new stuff (in fact a CF) on it. I've got the following questions: 1) any insights on how bosh uses resource_pool parameter ? 2) before posting this issue I had done a couple of tries to patch the bosh ruby code with additional logs/traces on the vm running the MicroBosh that is used to deploy my BOSH instance but it did take into account my changes. For example I made some changes in the following file /var/vcap/packages/director/gem_home/ruby/2.1.0/gems/bosh-director-core-1.2830.0/lib/bosh/director/core/templates/source_erb.rb but none of my new traces were taken in account. I guess it's because some compilation is taking place to generate the director on the microbosh server when its installation took place so is there anyway to re-generate on the microbosh server itself a module ? Thank again for your help.
karlkfi commented 9 years ago

It looks like the vsphere cpi is more demanding than the configuration processing in the director job templates. See the full validation here: https://github.com/cloudfoundry/bosh/blob/master/bosh_vsphere_cpi/lib/cloud/vsphere/config.rb

At some point in the near future the cpi config will go directly to the cpi, rather than going through the director. Hopefully this will make debugging CPI config simpler.

I can't validate your issue arm, but it possible that your yaml was invalid. Did you try one of these?

clusters:

clusters: [cfcluster]

clusters:

As for release changes: microbosh is deployed using a bosh release precompiled into the stemcell, which is non-trivial to modify. We're working on a new bosh-micro cli that handles release compilation itself, but it's not quite ready for public consumption.

The new docs might have more info on resource pools: http://bosh.io/docs/vsphere-cpi.html

cppforlife commented 9 years ago

@fckbo vsphere cpi options did not change. i think problem with origin manifest is ':' after your cluster name. even though it's valid yaml i think it would trip up one of the validations that vsphere cpi was doing. i definitely run few of my own env without resource pools and did not have to change that. let us know if that does not work.

fckbo commented 9 years ago

karlfi, cppforlife,

thx a lot for your answers, removing the ':' after cluster make it work without resource pool.

I didn't know anything about bosh few days ago and now go it up & running on two environments with 2 different versions so I kind of like this tool

I'm now trying to make use of it to first deploy jenkins on one environment and then cf on another environment, let see how that goes... Thx again.