Feature gap: add gracefulShutdown field for beta#12963
Feature gap: add gracefulShutdown field for beta#12963trodge merged 2 commits intoGoogleCloudPlatform:mainfrom
gracefulShutdown field for beta#12963Conversation
Signed-off-by: Cezary Sobczak <Cezary.Sobczak@infogain.com>
|
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @trodge, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
scheduling {
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
maintenance_interval = # value needed
}
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
scheduling {
availability_domain = # value needed
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
maintenance_interval = # value needed
min_node_cpus = # value needed
preemptible = # value needed
}
}
Resource: resource "google_compute_instance_from_template" "primary" {
scheduling {
availability_domain = # value needed
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
maintenance_interval = # value needed
min_node_cpus = # value needed
on_host_maintenance = # value needed
preemptible = # value needed
}
}
Resource: resource "google_compute_instance_template" "primary" {
scheduling {
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
}
}
Resource: resource "google_compute_region_instance_template" "primary" {
scheduling {
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
}
}
|
Tests analyticsTotal tests: 1105 Click here to see the affected service packages
Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Signed-off-by: Cezary Sobczak <Cezary.Sobczak@infogain.com>
|
@trodge This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_instance" "primary" {
scheduling {
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
maintenance_interval = # value needed
}
}
Resource: resource "google_compute_instance_from_machine_image" "primary" {
scheduling {
availability_domain = # value needed
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
maintenance_interval = # value needed
min_node_cpus = # value needed
preemptible = # value needed
}
}
Resource: resource "google_compute_instance_from_template" "primary" {
scheduling {
availability_domain = # value needed
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
maintenance_interval = # value needed
min_node_cpus = # value needed
on_host_maintenance = # value needed
preemptible = # value needed
}
}
Resource: resource "google_compute_instance_template" "primary" {
scheduling {
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
}
}
Resource: resource "google_compute_region_instance_template" "primary" {
scheduling {
graceful_shutdown {
enabled = # value needed
max_duration {
nanos = # value needed
seconds = # value needed
}
}
}
}
|
Tests analyticsTotal tests: 1105 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
…rm#12963) Signed-off-by: Cezary Sobczak <Cezary.Sobczak@infogain.com>
…rm#12963) Signed-off-by: Cezary Sobczak <Cezary.Sobczak@infogain.com>
This patch adds
graceful_shutdownfield toresource_compute_instance,resource_compute_instance_templateandresource_compute_region_instance_template. This fields is a configuration setting for a compute instance that allows it to perform a graceful shutdown. The graceful_shutdown field is responsible for:Gracefull shutdown overview.
Related issue here.
This PR provides a workaround for
max_duration.0.nanosdue to an issue with the API. Please find the details below:secondsfield is set (1–3600 s) and thenanosfield is also set, the value is passed in the request body but is not updated in the cloud, as observed in theGETresponse.nanosis read from the resource state to avoid not updated tfstate (constant diff between setup and state).POST REQUEST:
Request body:
{ "automaticRestart": true, "gracefulShutdown": { "enabled": true, "maxDuration": { "nanos": 1000, "seconds": "1" } }, "hostErrorTimeoutSeconds": null, "instanceTerminationAction": "", "nodeAffinities": [ null ], "onHostMaintenance": "MIGRATE", "preemptible": false, "provisioningModel": "STANDARD" }GET REQUEST RESPONSE
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.