Cloud Foundry bosh错误100:找不到网络

时间:2016-01-05 23:48:12

标签: postgresql cloudfoundry pivotal-cloud-foundry vsphere cf-bosh

我正在尝试设置服务代理以将postgres添加到我们的Cloud Foundry安装中。我们在vmWare上运行我们的系统。我正在使用此版本:

cf-services-contrib-release

我需要在清单中设置网络:部分,我在那里设置的内容不起作用。

这就是我的网络在vmWare vCenter UI中的样子:

vmWare vCenter networks

这就是我的群集和资源池在vCenter UI中的样子:

vmWare Vcenter clusters and resource pools

我在网络的“名称”周围尝试使用和不使用引号。但我现在收到一个错误,说波什无法找到网络:

 Failed compiling packages > rootfs_lucid64/9b3f611b46e076b94b37645c98f9100e7bcef5dd: Can't find network: VLAN1130_LB_100.114.130.0 (00:00:01)
   Failed compiling packages > postgresql93/06163819b694f8d9836586d024f64c11efe30180: Can't find network: VLAN1130_LB_100.114.130.0 (00:00:01)
   Failed compiling packages > postgresql92/2867893e714aae6e6b76bd06e7aa30d47023c46e: Can't find network: VLAN1130_LB_100.114.130.0 (00:00:01)

Error 100: Can't find network: VLAN1130_LB_100.114.130.0

Task 2430 error

这是我最新的配置尝试:

networks:
- name: default
  type: manual
  subnets:
  - range: 100.114.130.0/24
    gateway: 100.114.130.1
    cloud_properties:
      name: VLAN1130_LB_100.114.130.0

我也尝试过如下单引号。但是我得到了与上面相同的错误!

networks:
- name: default
  type: manual
  subnets:
  - range: 100.114.130.0/24
    gateway: 100.114.130.1
    cloud_properties:
      name: 'VLAN1130_LB_100.114.130.0'

我们的网络就是这个:100.114.130.0/24

因此在配置中选择VLAN1130_LB_100.114.130.0是有意义的。

我已经尝试在yaml文件中设置所有这些选项而没有引号。而且它们似乎都不起作用!

<ul>
<li>USH_UCS_CLOUD_FOUNDRY: <a href="https://gist.github.com/bluethundr/18ac490e96a5e02fad65">postgres_2432_debug.txt</li>
<li>USH_UCS_CLOUD_FOUNDRY_DVS: <a href="https://gist.github.com/bluethundr/4b02c7359b6415bde97f">postgres_2433_debug.txt</a></li>
<li>USH_UCS_CLOUD_FO-DVUplinks-435272: <a href="https://gist.github.com/bluethundr/e357ad872a40ac85b9ca">postgres_2434_debug.txt</a> </li>
  <li>VLAN1129_LB_100.114.129.0: <a href="https://gist.github.com/bluethundr/ebd88c27cab3cd2b6804">postgres_2435_debug.txt</a></li> 
<li>VLAN1130_LB_100.114.130.0: <a href="https://gist.github.com/bluethundr/b7eeb43e3d96f1a85578">postgres_2436_debug.txt</a></li> 
<li>VLAN14-ESXI_MGMT-3.156.14.0: <a href="https://gist.github.com/bluethundr/dbde624e63842721a133">postgres_2437_debug.txt</li>
 </ul>

我不希望VLAN1129_LB_100.114.129.0正常工作,但无论如何我都试过了,只是为了完成。

我在上面提到的每个设置旁边都提供了每个失败尝试的调试转储。当然其中一个必须工作!但是你可以看到他们都没有。

这是我使用'bosh deploy'命令部署的完整yaml文件:

name: cf-22b9f4d62bb6f0563b71 
director_uuid: fd713790-b1bc-401a-8ea1-b8209f1cc90c 

releases:
  - name: cf-services-contrib
    version: 6 

compilation:
  workers: 3
  network: default
  reuse_compilation_vms: true
  cloud_properties:
    ram: 5120 
    disk: 10240 
    cpu: 2

update:
  canaries: 1
  canary_watch_time: 30000-60000
  update_watch_time: 30000-60000
  max_in_flight: 4

networks:
- name: default
  type: manual 
  subnets:
  - range: 100.114.130.0/24
    gateway: 100.114.130.1
    cloud_properties:
      name: VLAN1130_LB_100.114.130.0 

resource_pools:
- name: 'USH_UCS_CLOUD_FOUNDRY_NONPROD_01_RP' 
  network: default
  stemcell:
    name: bosh-vsphere-esxi-ubuntu-trusty-go_agent
    version: '2865.1' 
  cloud_properties:
    cpu: 2
    ram: 4096 
    disk: 10240
    datacenters:
    - name: 'Universal City' 
      clusters:
      - USH_UCS_CLOUD_FOUNDRY_NONPROD_01: {resource_pool: 'USH_UCS_CLOUD_FOUNDRY_NONPROD_01_RP'}

jobs:
  - name: gateways
    release: cf-services-contrib
    templates:
    - name: postgresql_gateway_ng
    instances: 1
    resource_pool: 'USH_UCS_CLOUD_FOUNDRY_NONPROD_01_RP' 
    networks:
      - name: default
        default: [dns, gateway]
    properties:
      # Service credentials
      uaa_client_id: "cf"
      uaa_endpoint: http://uaa.devcloudwest.example.com
      uaa_client_auth_credentials:
        username: admin
        password: secret 


  - name: postgresql_service_node
    release: cf-services-contrib
    template: postgresql_node_ng
    instances: 1
    resource_pool: 'USH_UCS_CLOUD_FOUNDRY_NONPROD_01_RP' 
    persistent_disk: 10000
    properties:
      postgresql_node:
        plan: default
    networks:
      - name: default
        default: [dns, gateway]

properties:
  networks:
    apps: default
    management: default

  cc:
    srv_api_uri: http://api.devcloudwest.example.com

  nats:
    address: 100.114.130.11 
    port: 25555 
    user: nats #CHANGE
    password: secret 
    authorization_timeout: 5

  service_plans:
    postgresql:
      default:
        description: "Developer, 250MB storage, 10 connections"
        free: true
        job_management:
          high_water: 230
          low_water: 20
        configuration:
          capacity: 125
          max_clients: 10
          quota_files: 4
          quota_data_size: 240
          enable_journaling: true
          backup:
            enable: false
          lifecycle:
            enable: false
            serialization: enable
            snapshot:
              quota: 1

  postgresql_gateway:
    token: f75df200-4daf-45b5-b92a-cb7fa1a25660
    default_plan: default
    supported_versions: ["9.3"]
    version_aliases:
      current: "9.3"
    cc_api_version: v2
  postgresql_node:
    supported_versions: ["9.3"]
    default_version: "9.3"
    max_tmp: 900
    password: secret 

我们如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

来自Amit's comment

Cloud Properties中使用的名称必须包含任何嵌套的子文件夹。在提供的配置中,网络嵌套在USH_UCS_CLOUD_FOUNDRY下,因此name的值应该反映出来,即USH_UCS_CLOUD_FOUNDRY/VLAN1130_LB_100.114.130.0不需要引号。

networks:
- name: default
  type: manual
  subnets:
  - range: 100.114.130.0/24
    gateway: 100.114.130.1
    cloud_properties:
      name: USH_UCS_CLOUD_FOUNDRY/VLAN1130_LB_100.114.130.0