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(rdb): allow updates from bssd to lssd if new node type has enough space #2461

Merged
merged 2 commits into from Mar 21, 2024

Conversation

Mia-Cross
Copy link
Contributor

I noticed a case that did not occur in the tests but there was a bug when changing the volume type from bssd to lssd as the volume_size_in_gb attribute goes from the given value to 0 (the volume size depends on the node type). And since we carry out the upgrades starting from the volume and ending with the node type, that resulted in the API rejecting the update of the volume_type because the node_type should be updated first.

To fix the issue, this PR adds the comparing of the actual and the wanted storage capacities to see if the node_type has to be updated first.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 51.72414% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 73.03%. Comparing base (46d62b5) to head (b88254f).

Files Patch % Lines
scaleway/resource_rdb_instance.go 51.72% 24 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2461      +/-   ##
==========================================
+ Coverage   73.01%   73.03%   +0.01%     
==========================================
  Files         242      242              
  Lines       35350    35373      +23     
==========================================
+ Hits        25810    25833      +23     
+ Misses       7316     7313       -3     
- Partials     2224     2227       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

scaleway/resource_rdb_instance.go Outdated Show resolved Hide resolved
scaleway/resource_rdb_instance.go Outdated Show resolved Hide resolved
@Codelax Codelax added this pull request to the merge queue Mar 21, 2024
Merged via the queue into scaleway:master with commit ba2827f Mar 21, 2024
34 checks passed
@Mia-Cross Mia-Cross deleted the rdb_reorder_storage_updates branch March 21, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants