Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create Interconnect VLAN Attachments #1899

Closed
matthung0807 opened this issue Mar 10, 2023 · 3 comments
Closed

Unable to create Interconnect VLAN Attachments #1899

matthung0807 opened this issue Mar 10, 2023 · 3 comments
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@matthung0807
Copy link

Environment details

  • Programming language: Go
  • OS: macOS Ventura 13.0.1
  • Language runtime version: v1.19
  • Package version: google.golang.org/api v0.79.0

Steps to reproduce

  1. Running localhost Go application, use InterconnectAttachmentsService.Insert.Do to create a Interconnect VLAN attachment doesn't working, and it has no any response error with operation response code 200.
vlan := &compute.InterconnectAttachment{
	Name:                   param.Name,
	EdgeAvailabilityDomain: param.EdgeAvailabilityDomain,
	Router:                 param.Router,
	Type:                   "PARTNER",
}

op, cloudErr := c.InterconnectAttachments.
	Insert(projectId, region, vlan).
	RequestId(param.RequestId).
	Do()
  1. After execute above statements the VLAN attachment isn't created and it has no error response.
  2. Check on Google Cloud console's Interconnect, there is no corresponding result.
  3. Create a CloudRouter has no problem.
  4. Use gcloud cli can create VLAN Attachments successfully.
gcloud compute interconnects attachments partner create

Thanks!

@matthung0807 matthung0807 added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 10, 2023
@codyoss codyoss added type: question Request for information or clarification. Not an issue. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 10, 2023
@codyoss
Copy link
Member

codyoss commented Mar 10, 2023

That API returns an async op handler. When it returns the operation is not necessarily done. It needs to be polled for. For better ergonomics I would suggest using the newer version of this library when possible: https://pkg.go.dev/cloud.google.com/go/compute/apiv1

Hope that helps

@codyoss codyoss closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2023
@matthung0807
Copy link
Author

@codyoss Thanks for your advice!

@matthung0807
Copy link
Author

The problem is caused by passing the same requestId for creating CloudRouter, that's why I cannot create VLAN attachment without error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants