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): add missing transient status on snapshots, read replicas #2589

Merged
merged 1 commit into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Upgrade your current `node_type` or enable high availability on your standalone database instance.
Upgrade your current instance specifications like node type, high availability, volume, or db engine version.

USAGE:
scw rdb instance upgrade <instance-id ...> [arg=value ...]

ARGS:
instance-id UUID of the instance you want to upgrade
[node-type] Node type of the instance you want to upgrade to (DB-DEV-S | DB-DEV-M | DB-DEV-L | DB-DEV-XL | DB-GP-XS | DB-GP-S | DB-GP-M | DB-GP-L | DB-GP-XL)
[enable-ha] Set to true to enable high availability on your instance
[volume-size] Increase your block storage volume size
[volume-type] Change your instance storage type (lssd | bssd)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
instance-id UUID of the instance you want to upgrade
[node-type] Node type of the instance you want to upgrade to (DB-DEV-S | DB-DEV-M | DB-DEV-L | DB-DEV-XL | DB-GP-XS | DB-GP-S | DB-GP-M | DB-GP-L | DB-GP-XL)
[enable-ha] Set to true to enable high availability on your instance
[volume-size] Increase your block storage volume size
[volume-type] Change your instance storage type (lssd | bssd)
[upgradable-version-id] Update your instance database engine to a newer version
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for upgrade
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AVAILABLE COMMANDS:
renew-certificate Renew the TLS certificate of an instance
restart Restart an instance
update Update an instance
upgrade Upgrade an instance to an higher instance type
upgrade Upgrade an instance
wait Wait for an instance to reach a stable state

FLAGS:
Expand Down
7 changes: 4 additions & 3 deletions docs/commands/rdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Database RDB API
- [Renew the TLS certificate of an instance](#renew-the-tls-certificate-of-an-instance)
- [Restart an instance](#restart-an-instance)
- [Update an instance](#update-an-instance)
- [Upgrade an instance to an higher instance type](#upgrade-an-instance-to-an-higher-instance-type)
- [Upgrade an instance](#upgrade-an-instance)
- [Wait for an instance to reach a stable state](#wait-for-an-instance-to-reach-a-stable-state)
- [Instance logs management commands](#instance-logs-management-commands)
- [Get specific logs of a given instance](#get-specific-logs-of-a-given-instance)
Expand Down Expand Up @@ -713,9 +713,9 @@ scw rdb instance update 11111111-1111-1111-1111-111111111111 settings.0.name=tim



### Upgrade an instance to an higher instance type
### Upgrade an instance

Upgrade your current `node_type` or enable high availability on your standalone database instance.
Upgrade your current instance specifications like node type, high availability, volume, or db engine version.

**Usage:**

Expand All @@ -733,6 +733,7 @@ scw rdb instance upgrade <instance-id ...> [arg=value ...]
| enable-ha | | Set to true to enable high availability on your instance |
| volume-size | | Increase your block storage volume size |
| volume-type | One of: `lssd`, `bssd` | Change your instance storage type |
| upgradable-version-id | | Update your instance database engine to a newer version |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.16
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221028135716-52f31ff92d45
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221110140415-da7aef73c340
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221028135716-52f31ff92d45 h1:nmTv5yXEYMxlGi5keSEh2J324bKQidqUae4XcmzmPPA=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221028135716-52f31ff92d45/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221110140415-da7aef73c340 h1:tH8BcYA7PG4ayD9AEiskZJEgzx6y0SyJ46DDK03XA48=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221110140415-da7aef73c340/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
Expand Down
11 changes: 9 additions & 2 deletions internal/namespaces/rdb/v1/rdb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ func rdbBackupExport() *core.Command {

func rdbInstanceUpgrade() *core.Command {
return &core.Command{
Short: `Upgrade an instance to an higher instance type`,
Long: `Upgrade your current ` + "`" + `node_type` + "`" + ` or enable high availability on your standalone database instance.`,
Short: `Upgrade an instance`,
Long: `Upgrade your current instance specifications like node type, high availability, volume, or db engine version.`,
Namespace: "rdb",
Resource: "instance",
Verb: "upgrade",
Expand Down Expand Up @@ -617,6 +617,13 @@ func rdbInstanceUpgrade() *core.Command {
Positional: false,
EnumValues: []string{"lssd", "bssd"},
},
{
Name: "upgradable-version-id",
Short: `Update your instance database engine to a newer version`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ max_parallel_workers_per_gather 0
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "389a42f1-9e27-49f6-8a54-73ffa3a80f03",
"ip": "51.159.112.132",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ max_parallel_workers_per_gather 0
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "a1800b6a-5a91-4bf4-8b62-0de378bfcfe0",
"ip": "51.159.112.132",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ max_parallel_workers_per_gather 0
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "ab0013b4-223a-4079-9a75-1e1308ab3b9d",
"ip": "51.159.112.132",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "400a5d57-8c91-4cfe-bfed-b9748d24d8ac",
"ip": "51.158.59.143",
Expand Down Expand Up @@ -98,6 +99,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "dc3e0459-77a1-4953-a43e-05f88f468857",
"ip": "51.158.56.215",
Expand Down Expand Up @@ -170,6 +172,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "ac701eae-3bc0-4d36-a0e5-5a54e030c1df",
"ip": "51.159.24.228",
Expand Down Expand Up @@ -242,6 +245,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "453374d4-2ed4-4a54-b142-01365a746c02",
"ip": "195.154.69.177",
Expand Down Expand Up @@ -314,6 +318,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "f21b6d40-f053-4384-9b6c-5b8ed6d3cd25",
"ip": "195.154.71.177",
Expand Down Expand Up @@ -386,6 +391,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "initializing",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "63a508a6-9d76-4656-a420-320e21ab1ece",
"ip": "195.154.70.113",
Expand Down Expand Up @@ -458,6 +464,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "deleting",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "ab0013b4-223a-4079-9a75-1e1308ab3b9d",
"ip": "51.159.112.132",
Expand Down Expand Up @@ -530,6 +537,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "backuping",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "fb0f23b8-8c13-4748-b1ab-11b160ddf0ab",
"ip": "195.154.69.50",
Expand Down Expand Up @@ -602,6 +610,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "e3eb041d-2b02-41b0-a879-dad257ae1830",
"ip": "195.154.69.50",
Expand Down Expand Up @@ -674,6 +683,7 @@ b51d2372-01a1-4249-9ce3-0e47600033ae cli-test db-
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "provisioning",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"tags": [],
"settings": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ max_parallel_workers_per_gather 0
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "2c007a6d-0c52-4910-bd40-836fcca1bf49",
"ip": "195.154.69.50",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ max_parallel_workers_per_gather 0
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "6cdc0ed1-1537-4a63-ae89-79efd830cf59",
"ip": "195.154.69.50",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ timezone UTC
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "b7508d38-4562-4d27-8be0-4181fccae679",
"ip": "51.158.57.216",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ max_parallel_workers_per_gather 0
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "a1eba0cc-1b0a-41c7-9478-5ce4a7af84ed",
"ip": "51.158.57.216",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ max_parallel_workers_per_gather 0
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "6fb9996f-3e7d-4077-855d-0bf7e4ca866e",
"ip": "51.158.57.216",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ max_parallel_workers_per_gather 0
"project_id": "951df375-e094-4d26-97c1-ba548eeb9c42",
"status": "ready",
"engine": "PostgreSQL-12",
"upgradable_version": null,
"endpoint": {
"id": "63a508a6-9d76-4656-a420-320e21ab1ece",
"ip": "195.154.70.113",
Expand Down