Project

General

Profile

Actions

Bug #28418

open

Subnetwork support in Google Cloud compute resource ?

Added by Adam Cécile about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - GCE
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Hello,

I cannot create any VM using Google Cloud compute resource, it ends up with:

Failed to create a compute gcloud-company-west1-b (europe-west1-b-Google) instance viola-labay.prov.company.com: invalid: Invalid value for field 'resource.networkInterfaces[0]': '{ "network": "https://www.googleapis.com/compute/v1/projects/company/global/networks/company-vpc-eur...'. Subnetwork should be specified for custom subnetmode network

From what I see this is supported in Fog:
https://github.com/fog/fog-google/issues/158

But foreman isn't asking me for this parameter, neither while creating Compute Profile nor in Virtual Machine tab when creating the VM.

I don't know how it could work without this but for us it definitely renders the whole plugin unusable.

Best regards, Adam.


Related issues 1 (1 open0 closed)

Related to Foreman - Feature #23366: Google Cloud Compute Resource does not support Shared VPCNewKavita GaikwadActions
Actions #1

Updated by Adam Cécile about 5 years ago

In the meanwhile I hardcoded correct setting in app/models/compute_resources/foreman/model/gce.rb

def create_vm(args = {})
  # TODO FIXME: Attempt to hardcode subnetwork to workaround Foreman bug
  # https://projects.theforeman.org/issues/28418
  args[:network_interfaces] = [{ :subnetwork => "regions/europe-west1/subnetworks/my-subnet-name" }]
Actions #2

Updated by Kavita Gaikwad almost 5 years ago

  • Related to Feature #23366: Google Cloud Compute Resource does not support Shared VPC added
Actions

Also available in: Atom PDF