-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
sysctl change does not actually get applied #18208
sysctl change does not actually get applied #18208
Comments
As I understand your issue is that after creating the resource
And the unique step to reproduce this issue is to run a Finally please send us the complete LOG.DEBUG output and the terraform.tfstate result after the resource creation to confirm what is happening in your environment. |
Yes, that is correct. |
I added a Github gist with files that show the output of terraform apply with debug logging turned on, together with the Terraform state. https://gist.github.com/christhegrand/8e1bf8de6e842298a762ca71c4ae1462 |
Possible bug in update, it looks like |
Instead of using
You can try with
I tried apply these setting with terraform and it works. |
Adde some reference for this. In https://registry.terraform.io/providers/hashicorp/google/5.32.0/docs/resources/container_cluster#argument-reference Recommended to create with a separately managed node pool (recommended) |
Thanks. We are trying to add node config defaults to autoprovisioned node pools. Is it not possible to do that using Terraform? |
Maybe you can try first enable node auto-provisioning on the cluster with Terraform , then specify which node pools are auto-provisioned: |
As mentioned in terraform-google-modules/terraform-google-kubernetes-engine#15 the default nodepool causes trouble with managing the cluster. Personally I always delete the default nodepool and create additional nodepools and manage their lifecycle outside the lifecycle of the cluster resource. @christhegrand can you update your cluster provisioning script to create additional nodepool resources and delete the default nodepool? |
I did delete the default node pool:
That's interesting. I didn't realize I could create a node pool and then enable auto-provisioning on it. |
@christhegrand Are you able to make changes to the additional node pools (not using the cluster level node_config field)? |
@christhegrand I have created a bug internally for GKE to deprecate the cluster level field |
Sure. Thank you! |
If I'm not mistaken, this may get fixed via the fix for #19225 (GoogleCloudPlatform/magic-modules#12014) Note that if you define the node pool via @lornaluo I think |
I tried applying this sysctl config with version 6.12.0 of the Google provider, and it's still not working. I see the same behavior as before - I can run |
@christhegrand just want to confirm after rereading the comments above - is this on a cluster with the default pool removed and node pool autoprovisioning, or are you seeing the issue on the default node pool? for the autoprovisioned node pools, I think you may need |
It's for an autoprovisioned node pool with the default pool removed. Let me try node_pool_auto_config. |
Hm, how would I specify sysctl information in that block? I don't see a way to do that in the documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#nested_node_pool_auto_config |
Is it possible to configure Linux sysctls on a cluster with nodepool autoscaling via the console / CLI? Looking at the API docs, I think that setting is output only, and not seeing it available in Either way, I could be wrong, but as I think was said above, I think setting |
Community Note
Terraform Version & Provider Version(s)
Terraform v1.8.2
on darwin_arm64
Your version of Terraform is out of date! The latest version
is 1.8.3. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
google_container_cluster
Terraform Configuration
Debug Output
Expected Behavior
When I run terraform apply with this change, Terraform reports that the change has been applied successfully. When I run terraform apply again, I should see that there are no more changes to apply.
Actual Behavior
When I run terraform apply with this change, Terraform reports that the change has been applied successfully. But when I run terraform apply again, I see the sysctl change show up as an unapplied change. Basically, Terraform thinks the change has been applied successfully, but it does not seem like it is actually persisting.
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
b/342657392
b/343052499
The text was updated successfully, but these errors were encountered: