【问题标题】:Spinnaker bakery error: Subnetwork should be specified for custom subnetmode network, invalidSpinnaker bakery 错误:应为自定义子网模式网络指定子网,无效
【发布时间】:2019-08-02 18:37:31
【问题描述】:

我在 GCP 虚拟机上从头开始安装 Spinnaker 版本:1.14.11(本地)并进行了 hal 配置。 Spinnaker 能够看到项目中的计算实例和网络。 Spinnaker 也可以很好地创建服务器组/LB 和防火墙。但是一旦我设置管道进行烘焙和部署,它就会失败并出现以下错误。

==> googlecompute: Checking image does not exist...
==> googlecompute: Creating temporary SSH key for instance...
==> googlecompute: Using image: ubuntu-1604-xenial-v20190628
==> googlecompute: Creating instance...
    googlecompute: Loading zone: us-east1-b
    googlecompute: Loading machine type: n1-standard-1
    googlecompute: Requesting instance creation...
==> googlecompute: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0]': '{  "network": "projects/pg-us-p-app-xxxx/global/networks/devops",  "accessConfig": [{    "type": "...'. Subnetwork should be specified for custom subnetmode network, invalid
Build 'googlecompute' errored: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0]': '{  "network": "projects/pg-us-p-app-xxxx/global/networks/devops",  "accessConfig": [{    "type": "...'. Subnetwork should be specified for custom subnetmode network, invalid

==> Some builds didn't complete successfully and had errors:
--> googlecompute: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0]': '{  "network": "projects/pg-us-p-app-xxxx/global/networks/devops",  "accessConfig": [{    "type": "...'. Subnetwork should be specified for custom subnetmode network, invalid

==> Builds finished but no artifacts were created.


gcloud compute networks list  | grep devops
devops                       CUSTOM       REGIONAL

HAL 配置:


google:
      enabled: true
      accounts:
      - name: my-gce-account
        requiredGroupMembership: []
        providerVersion: V1
        permissions: {}
        project: pg-us-p-app-xxxx
        jsonPath: /home/spinnaker/.gcp/gce.json
        alphaListed: false
        imageProjects: []
        consul:
          enabled: false
          agentEndpoint: localhost
          agentPort: 8500
          datacenters: []
      primaryAccount: my-gce-account
      bakeryDefaults:
        templateFile: gce.json
        baseImages: []
        zone: us-east1-b
        network: "devops"
        useInternalIp: true

devops 是自定义 VPC 网络,我应该在哪里提供子网?或者如何解决这个错误?

请指教。

【问题讨论】:

    标签: google-cloud-platform spinnaker spinnaker-halyard


    【解决方案1】:

    通过在管道中的“烘焙配置”下将“gce_subnetwork”作为“扩展属性”传递来解决此问题。

    希望这可能会有所帮助。

    【讨论】:

      【解决方案2】:

      我在尝试使用 gcloud compute CLI 命令创建计算实例时遇到此错误。

      解决方案

      我的解决方案是添加--subnet 标志和--zone 标志,其区域值对应于子网的区域:

      示例命令

      gcloud compute instances import kbull-instance2022 \
        --os=debian-9 \
        --network=bull \
        --subnet=pen \
        --zone=us-east1-a \
        --source-uri=gs://bull-pen-image/bull-image-virtualbox.ova \
        --custom-cpu=2 \
        --custom-memory=2048MB
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-05-01
        • 2017-10-15
        • 2018-02-13
        • 2013-02-07
        • 2017-04-04
        • 2017-10-28
        • 2018-06-06
        • 2016-09-24
        相关资源
        最近更新 更多