-
Notifications
You must be signed in to change notification settings - Fork 1
feat: major inplace upgrade, deletion protection #583
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
Conversation
deletion protection is set to false for all examples and pipeline testing, but true by default. This allows the pipelines to destroy any instances that they create without encountering an error. Since the feature MUST be overridden in order to perform a terraform destroy, it is exposed as a variable in all situations, module, sub-module and DAs. The feature was manually tested, without setting the flag to false and results in
|
/run pipeline |
Note: There is no major version upgrade test included in the pipeline tests. The main reason for mongodb is that 6.0 is EOL this month and work is already started on removing support. At this point, the feature will be untestable. Version upgrade testing has been completed manually. |
Following the deep dive: destroy processConfirmed this is a two step process, 'apply' deletion protection = false, 'destroy'. A single step update and destroy is not supported. Terraform uses the state file for a destroy, so it is necessary to apply the change first. upgrade processThe upgrade process across all plans (validated on Postgres version 15, plan standard, deletion protection true. Attempted upgrade to version 16 and 17 (unlikely to be supported) and got
So it appears to be impossible to launch a destroy and recreate Read only replicasDelete protection applies to read only replicas independently of the main instance. Delete protection must be removed from a replica before it can be destroyed. |
/run pipeline |
tags = var.resource_tags | ||
member_host_flavor = "multitenant" | ||
backup_crn = data.ibm_database_backups.backup_database.backups[0].backup_id | ||
resource_group_id = module.resource_group.resource_group_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we sync the order between all ICD repos? it will be easier for maintenance when doing diff
for example postgresql
, redis
has different as well:
resource_group_id
name
postgresql_version
region
tags
access_tags
deletion_protection
member_host_flavor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is feeling like to much change for this cycle. The backup-restore folders do not even have the same names. I agree, the backup/restore and pitr/restore examples should be closer to identical, but can this wait for a less time sensitive PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, we can address that in different PR
@@ -4,5 +4,6 @@ | |||
"resource_tags": $TAGS, | |||
"name": $PREFIX, | |||
"existing_resource_group_name": "geretain-test-mongo", | |||
"existing_kms_instance_crn": $HPCS_US_SOUTH_CRN | |||
"existing_kms_instance_crn": $HPCS_US_SOUTH_CRN, | |||
"deletion_protection": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redis
and postgresql
doesn't have deletion_protection
inside catalogvalidation, is this okey? fully-configurable
also doesn't have it. is ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes committed to all repos and both files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
/run pipeline |
/run pipeline |
🎉 This PR is included in version 3.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Description
Add support for two ICD features:
Deletion protection
This is feature flag, that when set to true provides protection from accidentally deleting the ICD instance.
Conceptually the instance is created with this flag set to true and if/when a destroy is attempted the request fails. In addition to requesting a destroy the flag must be set to false.
Note: This does not prevent the resource being destroyed outside of terraform.
In place major version upgrade
This feature allows the major version, eg. 6.0 to upgraded to 7.0 by an in-place upgrade, retaining the original instance connection endpoints. During a major version upgrade, the instance is set to read-only (setUserWriteBlock mode), upgraded and set to accept writes again. There is a service outage during this time, since the service will not accept database updates.
There is an feature flag, version_upgrade_skip_backup. It is NOT recommended to use this feature, since an upgrade failure may result in data loss. This flag avoids taking a backup whilst in read-only mode to speed the process up.
Full documentation at: https://cloud.ibm.com/docs/databases-for-mongodb?topic=databases-for-mongodb-upgrading&interface=ui
Release required?
x.x.X
)x.X.x
)X.x.x
)Release notes content
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers