-
Notifications
You must be signed in to change notification settings - Fork 680
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
DBaaS State File Stores/Provisions Incorrect CPU Core Count #539
Comments
It appears that the cpu core count is no longer being used and is instead calculated based on the shape. So cpu count for a 2 node DB is 8 when using shape VM.Instance1.4. Perhaps the fix would be to make the field not required and not force new resource as mentioned in the other issue: |
This is only true for Database Systems with a VM node. CPU Core Count is used for Database Systems running on Baremetal shapes. |
From the documentation:
To solve your issue we will make cpu_core_count Optional rather than Required so that you can avoid specifying it when using VM shapes. While we work on this fix you can change your config to match the value in the statefile (the value returned by the service). This will avoid unnecessary diffs on subsequent applies. |
The issue we had where OCI would not set it to the calculated value (node count * cpu per node) is now resolved. We are able to spin up db systems by using the calculated value. (e.g. in the example above we can now put in shape 1.4 and node count 2 with cpu core count 8). |
Hello, this has been addressed in release 2.1.13 |
Terraform Version 0.11.7
OCI Provider Version
$ /terraform-provider-oci_v2.1.10
Description
Summary
OCI Provider stores incorrect value in state file or provisions with an incorrect value for cpu count.
Details
Validation on OCI has been updated to check if the cpu count is outside the limits for the requested shape. https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm
Because of this, we are passing in cpu count as 4 and the shape as VM.Instance1.4.
However, the provider stores the cpu count as 8. As a result, any following runs will force a new resource, forcing the process to destroy any configured db and delay builds by the OCI DBaaS Provisioning time (~90 mins).
Steps to reproduce
Build DB by running terraform apply
Check state file to compare input and saved values for oci_database_db_system.database.*.cpu_core_count.
Terraform Plan
Database Resource and Outputs
Plan
terraform plan log
Apply log
terraform apply log
2nd apply (to show force new resource)
terraform 2nd apply log
The text was updated successfully, but these errors were encountered: