Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Version Upgrade/ Upgrading the Kernel Version of a DB Instance

Upgrading the Kernel Version of a DB Instance

Updated on 2024-11-15 GMT+08:00

Function

This API is used to upgrade kernel version of a DB instance. There are three upgrade types: in-place upgrade, gray upgrade, and hot patch update.

  • In-place upgrade

    Services are interrupted for about 30 minutes during the in-place upgrade. All nodes in a DB instance are upgraded at a time and you need to stop all services during the upgrade.

  • Gray upgrade
    Services are interrupted for 10s during the upgrade of each primary DN or CN. The management plane is upgraded first, and then the data plane from the standby nodes to the primary nodes. You can select auto-commit after the upgrade or perform a rolling upgrade.
    • Auto-commit: All nodes are upgraded at the same time. Services are interrupted for about 10s during the upgrade.
    • Rolling upgrade: You can observe service status before committing the upgrade. There are upgrade and commit phases.
      • In the upgrade phase, DB instances can be upgraded by shard or AZ based on the deployment model.
        • Distributed instances are upgraded by shard.
        • Primary/standby instances are upgraded by AZ.
      • In the commit phase, you can test services on your instance after the upgrade is complete, and then either commit or roll back the upgrade based on test results.
        • Commit: After the upgrade is complete and services are normal, commit the upgrade.
        • Rollback: When the upgrade is complete and enters the commit phase, you can roll back the instance to the source version as required.
  • Hot patch update
    • Auto-commit: Hot patches are automatically updated and committed without downtime.
    • Rollback: Services are not interrupted when the hot patches are rolled back.

URI

PUT https://{Endpoint}/v3.1/{project_id}/instances/{instance_id}/db-upgrade

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region.

For details about how to obtain the value, see Obtaining a Project ID.

Restrictions:

None

Value range:

The value can contain 32 characters. Only letters and digits are allowed.

Default value:

None

instance_id

Yes

String

Instance ID, which is compliant with the UUID format.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

upgrade_type

Yes

String

Instance upgrade type. The value is case-sensitive.

  • inplace: In-place upgrade
  • grey: Gray upgrade
  • hotfix: Hot patch update

upgrade_action

No

String

Instance upgrade action. The value is case-sensitive.

For the in-place upgrade, this parameter is optional.

For the gray upgrade, this parameter can be set to upgradeAutoCommit, upgrade, commit, or rollback.

For the hot patch update, this parameter can be set to upgradeAutoCommit or rollback.

  • upgradeAutoCommit: Auto-commit
  • upgrade: Rolling upgrade
  • commit: Commit
  • rollback: Rollback

target_version

No

String

Target version that the instance will be upgraded to.

  • In a hot patch update, multiple hot patch versions can be configured.

upgrade_shard_num

No

Integer

Number of shards to be upgraded in a gray upgrade for a distributed instance. This parameter is mandatory when upgrade action is set to upgrade (rolling upgrade). The value cannot be greater than the number of shards that have not been upgraded.

upgrade_az

No

String

AZ to be upgraded in a gray upgrade. This parameter is mandatory when upgrade action is set to upgrade (rolling upgrade). Multiple AZs can be upgraded at the same time. Use commas (,) to separate AZs. You cannot enter an AZ that does not belong to the instance.

Response Parameters

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

Task ID. For pay-per-use instances, only the task ID is returned.

order_id

String

Order ID. This parameter is returned only when your instance is billed at a yearly/monthly basis.

Example Request

  • In-place upgrade
    PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade
    { 
        "upgrade_type" : "inplace",
        "target_version": "xxx"
    }
  • Hot patch update
    • Updating hot patches
      PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade
      {
          "upgrade_type" : "hotfix",
          "target_version" : "xxxx,xxxx,xxxx",
          "upgrade_action" : "upgradeAutoCommit"
      }
    • Rolling back hot patches
      PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade
      {
          "upgrade_type": "hotfix",
          "target_version": "xxxx,xxxx,xxxx",
          "upgrade_action": "rollback"
      }
  • Gray upgrade
    • Setting upgrade_action to upgradeAutoCommit
      PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade
      { 
          "upgrade_type" : "grey",
          "target_version": "xxx",
          "upgrade_action" : "upgradeAutoCommit" 
      }
    • Setting upgrade_action to upgrade
      PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade
      { 
          "upgrade_type" : "grey",
          "target_version": "xxx",
          "upgrade_action" : "upgrade", 
          "upgrade_shard_num" : 1, 
      }
    • Rolling back the upgrade when the instance is in the rolling upgrade phase (All upgraded shards will be rolled back. After the instance becomes available, the rollback is successful.)
      PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade
      { 
          "upgrade_type" : "grey",
          "target_version": "xxx",
          "upgrade_action" : "rollback"
      }
    • Committing the upgrade when the instance is in the rolling upgrade phase (After all upgraded shards are upgraded, you can commit the upgrade.) (After the instance is available, the upgrade is complete.)
      PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade
      { 
          "upgrade_type" : "grey",
          "target_version": "xxx",
          "upgrade_action" : "commit"
      }
  • Upgrading a primary/standby instance in the gray method (upgrade action is rolling upgrade)
    PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade
    { 
        "upgrade_type" : "grey", 
        "upgrade_action" : "upgrade", 
        "target_version": "xxx",
        "upgrade_az" : "az1,az2" 
    }

Example Response

{ 
  "job_id" : "2b414788a6004883a02390e2eb0ea227" 
}

Status Code

Error Code

For details, see Error Codes.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback