The Wayback Machine - https://web.archive.org/web/20201004012036/https://github.com/GoogleCloudPlatform/magic-modules/pull/3938
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

Fix behavior of maxUtilization in BackendService #3938

Open
wants to merge 2 commits into
base: master
from

Conversation

@hyww
Copy link

@hyww hyww commented Sep 1, 2020

fixes hashicorp/terraform-provider-google#7169

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)


@google-cla google-cla bot added the cla: yes label Sep 1, 2020
@hyww
Copy link
Author

@hyww hyww commented Sep 1, 2020

I am not sure if removing default value is going to be a breaking change. It seems that GCP behaves like maxUtilization 0.8 when no maxUtilization is specified in UTILIZATION balancing mode.

@modular-magician
Copy link
Collaborator

@modular-magician modular-magician commented Sep 1, 2020

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@danawillow, please review this PR or find an appropriate assignee.

@modular-magician modular-magician requested a review from danawillow Sep 1, 2020
@modular-magician
Copy link
Collaborator

@modular-magician modular-magician commented Sep 1, 2020

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 13 insertions(+), 6 deletions(-))
Terraform Beta: Diff ( 2 files changed, 13 insertions(+), 6 deletions(-))
Ansible: Diff ( 2 files changed, 4 insertions(+), 5 deletions(-))
TF Conversion: Diff ( 1 file changed, 11 insertions(+), 1 deletion(-))
Inspec: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

@modular-magician modular-magician commented Sep 1, 2020

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@danawillow
Copy link
Member

@danawillow danawillow commented Sep 3, 2020

I'm not totally sure I understand the purpose of this change. It looks like you don't believe the default for this field should be 0.8, but should instead be 0. Why is that? My impression is that 0.8 is the server-side default, so we set it as the default in the provider so that it shows up in terraform plan output. At the moment, setting the field to 0 will allow you to set the value to 0 if that's what you're looking for.

@hyww
Copy link
Author

@hyww hyww commented Sep 3, 2020

When I create a backend service with balancing mode RATE from web console, I get a backend service with no max_utilization field instead of one with value 0.8. I have no idea if this affects actual behavior, but maybe we should make it behaves like official client?

This is an optional parameter if the backend's balancingMode is UTILIZATION.
https://cloud.google.com/compute/docs/reference/rest/v1/backendServices

p.s. the provider doesn't set default max_utilization value for region backend service currently.

p.p.s. We ran into some backend utilization web UI bug recently and I doubt that it might affect backend service in RATE mode if max_utilization is set.

@hyww
Copy link
Author

@hyww hyww commented Sep 3, 2020

Another part of this PR is fixing the hash function. I can separate it into another PR if you think that would be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.