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

Create snapshot defaulting to multi-region #393

Open
bgp-sz opened this issue May 16, 2023 · 0 comments
Open

Create snapshot defaulting to multi-region #393

bgp-sz opened this issue May 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@bgp-sz
Copy link

bgp-sz commented May 16, 2023

Jenkins and plugins versions report

Environment
Jenkins: 2.387.2
OS: Linux - 5.14.0-162.18.1.el9_1.cloud.x86_64
Java: 11.0.19 - Red Hat, Inc. (OpenJDK 64-Bit Server VM)
...
google-compute-engine:4.3.14
google-metadata-plugin:0.4
google-oauth-plugin:1.0.8
google-storage-plugin:1.5.8

What Operating System are you using (both controller, and any agents involved in the problem)?

Linux jenkins 5.14.0-162.18.1.el9_1.cloud.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Mar 1 19:45:58 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Reproduction steps

Configure google-cloud vm with

  1. One-Shot enabled
  2. Create snapshot enabled
  3. Location "europe-west3"
  4. Zone "europe-west3-a"

Corresponding google project configured with "constraints/gcp.resourceLocations" set to
europe-west3-b
europe-west3-a
europe-west3
europe-west3-locations
europe-west3-c

Run a failing jenkins job e.g. "Simple Shell" with just "exit 1"

Expected Results

Snapshot being created in the same region as the VM was running.

Actual Results

Snapshot creation fails due to multi-region "EU" being used.

2023-05-16 12:10:19.214+0000 [id=11927] INFO    c.g.j.p.c.ComputeEngineInstance#_terminate: Creating snapshot for node ... docker-test-4xdjzm
2023-05-16 12:10:19.403+0000 [id=11927] WARNING c.g.c.g.p.p.client.ComputeClient#lambda$createSnapshotSync$10: Error in creati
ng snapshot.
com.google.api.client.googleapis.json.GoogleJsonResponseException: 412 Precondition Failed
POST https://compute.googleapis.com/compute/v1/projects/..../createSnapshot
{
  "code" : 412,
  "errors" : [ {
    "domain" : "global",
    "location" : "If-Match",
    "locationType" : "header",
    "message" : "Location EU violates constraint constraints/gcp.resourceLocations on the resource projects/.....",
    "reason" : "conditionNotMet"
  } ],
  "message" : "Location EU violates constraint constraints/gcp.resourceLocations on the resource projects/....."
}

Anything else?

No response

@bgp-sz bgp-sz added the bug Something isn't working label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant