bosh icon indicating copy to clipboard operation
bosh copied to clipboard

Failed to deploy cloud foundry into two clusters

Open yyl8815 opened this issue 11 years ago • 14 comments

I am trying to deploy my cloud foundry to two clusters in one datacenter.

  • cluster cf_z1 contains two hosts. And I will put Ha_proxy and AZ1 in this cluster
  • cluster cf_z2 contains one host. And I will put AZ2 in this cluster.

In cluster cf_z1, the two hosts can access IP of 10.62.90.x which is defined in my manifest as network cf1. In cluster cf_z2, the host can access 10.62.54.x which is defined in my manifest as network cf2. The two IP range can access each other. And they are both in vsphere vSwitch named "VM Network"

In my manifest(which can be found here, also I put my manifest of bosh here. I create bosh with bosh-init), I set in the resource_pools section that all "_z2" resource pool will be created in cluster cf_z2 with network cf2 and all _z1 resource pool will be created in cluster _z1 with network cf1.

So the expected result is:

  • All modules except ha_proxy have copy in both cluster cf_z1 and cf_z2
  • VMs in cf_z1 are with IP of 10.62.90.X and VMs in cf_z1 are with IP of 10.62.54.X

However, the results are not as expected and the issues are:

  • Not all z1 VMs defined in manifest are created in cluster cf_z1.
  • Not all z2 VMs defined in manifest are created in cluster cf_z2
  • Some VMs are with unexpected IP of 10.62.48.X. I don't know why this happen.
  • The deployment will fail in creating VMs complaining that cannot communicate with some machines and error code as below.
  Started creating bound missing vms
  Started creating bound missing vms > small_z2/0
  Started creating bound missing vms > small_z2/2
  Started creating bound missing vms > medium_z2/0
  Started creating bound missing vms > small_z2/1
  Started creating bound missing vms > medium_z2/1
  Started creating bound missing vms > medium_z2/2
  Started creating bound missing vms > medium_z2/3
  Started creating bound missing vms > medium_z2/4
  Started creating bound missing vms > large_z2/0
  Started creating bound missing vms > runner_z2/0
  Started creating bound missing vms > router_z1/0
  Started creating bound missing vms > router_z1/1
  Started creating bound missing vms > router_z2/0
     Done creating bound missing vms > medium_z2/0 (00:01:09)
     Done creating bound missing vms > small_z2/2 (00:01:10)
     Done creating bound missing vms > medium_z2/1 (00:01:19)
     Done creating bound missing vms > router_z1/1 (00:01:20)
   Failed creating bound missing vms > medium_z2/3: Timed out pinging to 1ab463ae-5687-4ce3-bed3-0d2f9fb73c13 after 600 seconds (00:10:44)
   Failed creating bound missing vms > small_z2/1: Timed out pinging to 8100ee0d-c0d9-4c4c-bf05-f2f1d10f9658 after 600 seconds (00:10:45)
   Failed creating bound missing vms > medium_z2/4: Timed out pinging to 151095cb-5da2-44d8-98b1-d8ce9146fb29 after 600 seconds (00:10:48)
   Failed creating bound missing vms > large_z2/0: Timed out pinging to b50923fb-5dd4-4e6c-8277-58bdd69571ce after 600 seconds (00:10:48)
   Failed creating bound missing vms > medium_z2/2: Timed out pinging to f44ea45e-4f25-4753-aea8-6eac253a534b after 600 seconds (00:10:48)
   Failed creating bound missing vms > runner_z2/0: Timed out pinging to c4e9862b-3592-4f80-a192-df6607524892 after 600 seconds (00:10:50)
   Failed creating bound missing vms > small_z2/0: Timed out pinging to 069a2074-2923-4978-b02b-0fa10b629b5a after 600 seconds (00:10:50)
   Failed creating bound missing vms > router_z2/0: Timed out pinging to 0af46cfd-adff-440f-b167-ca947ea71b30 after 600 seconds (00:10:51)
   Failed creating bound missing vms > router_z1/0: Timed out pinging to 32e122ef-94af-49a8-b28b-827a32c9a4e4 after 600 seconds (00:10:52)
   Failed creating bound missing vms (00:10:52)

Error 450002: Timed out pinging to 1ab463ae-5687-4ce3-bed3-0d2f9fb73c13 after 600 seconds

Task 19 error

For a more detailed error report, run: bosh task 19 --debug
root@boshcli:~/stable-manifest#

yyl8815 avatar Dec 02 '15 13:12 yyl8815

I then set all the the _z2 jobs to 0 instance.

However, I still get two VMs placed in cf_z2 cluster

yyl8815 avatar Dec 02 '15 14:12 yyl8815

Hi experts,

Could anyone kindly help me ?

Thank you in advance

yyl8815 avatar Dec 02 '15 14:12 yyl8815

Hello, you probably should give more context to your issue (which iaas, version of cloudfoundry, do you generate your manifest with the generate_manifest spiff script ?). Your question seem more related to cloudfoundry than bosh. Maybe u could use gist to show your manifest and ask help on the mailing list ? Best regards

poblin-orange avatar Dec 02 '15 14:12 poblin-orange

Hi @poblin-orange

I am using deploying cf-223 to vcenter. And it's true that I use the generate_manifest script to generate the manifest.

Actually I have added link to my manifest in my first comment

  • cloud foundry manifest: https://gist.github.com/yyl8815/169db3d06daca748773e
  • bosh manifest: https://gist.github.com/yyl8815/bd3f3833d4b69b0238b4

It's more likely to be a bosh issue rather than a cf issue.

yyl8815 avatar Dec 02 '15 14:12 yyl8815

@yyl8815 See http://bosh.io/docs/tips.html#unreachable-agent for more details.

cppforlife avatar Dec 02 '15 17:12 cppforlife

Hi @cppforlife

I am aware of the doc you provided. Thank you all the same.

The timeout is due the the mis-configuration of the IP address of the mis-placed VMs which I mentioned above in the third item which I also copied here:

  • Some VMs are with unexpected IP of 10.62.48.X. I don't know why this happen.

###What I want to understand and need favor from you experts are:

  • Why the VMs are not placed as I configured in the manifest.
  • Why some VMs are configured with unexpected and undefined IP addresses.

Thank you

yyl8815 avatar Dec 03 '15 01:12 yyl8815

Oops. Misread. Looking at your cf manifest I've noticed you have placed datacenters key in each resource pool outside of cloud_properties key. datacenters is an IaaS specific key (in this case vsphere) so it should go under each cloud_properties section. See first example in http://bosh.io/docs/vsphere-cpi.html#resource-pools.

cppforlife avatar Dec 03 '15 01:12 cppforlife

OK.

I will have a try.

I saw below part before. Is this a must?

properties:
  vsphere:
    host: 172.16.68.3
    user: root
    password: vmware
    datacenters:
    - name: BOSH_DC
      vm_folder: prod-vms
      template_folder: prod-templates
      disk_path: prod-disks
      datastore_pattern: '\Aprod-ds\z'
      persistent_datastore_pattern: '\Aprod-ds\z'
      clusters:
      - BOSH_CL: {resource_pool: BOSH_RP}

yyl8815 avatar Dec 03 '15 01:12 yyl8815

I was referring to the following datacenters key. Global configuration under vsphere key is fine.

resource_pools:
- cloud_properties:
    cpu: 1
    disk: 4096
    ram: 1024
    datacenters: #<---- should be under cloud_properties 
    - name: cf
      clusters:
      - cf_z1
  name: small_z1
  network: cf1
  stemcell:
    name: bosh-vsphere-esxi-ubuntu-trusty-go_agent
    version: latest

cppforlife avatar Dec 03 '15 01:12 cppforlife

Sure. I know you are referring to the resource_pools section.

I am asking that if the vsphere section in the global properties section necessary. In the original manifest generated by spiff, there is no such section and I manually added that later. I wonder if I can remove the vsphere section in the global properites section

yyl8815 avatar Dec 03 '15 01:12 yyl8815

vsphere section is only necessary in the bosh manifest.

cppforlife avatar Dec 03 '15 01:12 cppforlife

OK

Thank you very much, @cppforlife

yyl8815 avatar Dec 03 '15 01:12 yyl8815

HI @cppforlife ,

I got below error, any thoughts?

   Failed creating bound missing vms > large_z2/0: Unknown CPI error 'Unknown' w                                                    ith message 'undefined method `keys' for "cf_z2":String' (00:00:27)

Error 100: Unknown CPI error 'Unknown' with message 'undefined method `keys' for                                                     "cf_z1":String'

My manifest:

- cloud_properties:
    cpu: 1
    disk: 4096
    ram: 1024
    datacenters:
    - {name: cf, clusters: [cf_z2]}
  env:
    bosh:
      password: $6$4gDD3aV0rdqlrKC$2axHCxGKIObs6tAmMTqYCspcdvQXh3JJcvWOY2WGb4SrdXtnCyNaWlrf3WEqvYR2MYizEGp3kMmbpwBC6jsHt0
  name: small_z2
  network: cf2
  stemcell:
    name: bosh-vsphere-esxi-ubuntu-trusty-go_agent
    version: latest

yyl8815 avatar Dec 03 '15 01:12 yyl8815

Looks like docs were incorrect. It's actually something like this: https://github.com/cloudfoundry/docs-bosh/commit/90361f33ab299e0759cedd5179eec28f197ce483. Will be updated on bosh.io next push.

cppforlife avatar Dec 04 '15 05:12 cppforlife