No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

HUAWEI CLOUD Stack 6.5.0 Troubleshooting Guide 02

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Database System Troubleshooting

Database System Troubleshooting

Database system faults are caused by the exceptions of the database HA function. You can restore this function so that it can trigger database self-recovery.

The Slave Database Fails to Switch to Master

Symptom

The master database is faulty and cannot respond to service requests, but the slave database cannot switch to master.

Possible Causes

Particular faults have occurred on the master database node, causing the slave database failing to switch to master. For example, the floating IP address cannot be unbound from the master database. As a result, it cannot be assigned to the slave database so that the slave database fails to switch to master.

Troubleshooting Method

Forcibly restart the VM on which the master database is deployed to release the floating IP address.

Procedure
  1. Run the following command to log in to a FusionSphere OpenStack controller node:

    ssh Username@IP address of a FusionSphere OpenStack controller node

    The default user name is fsp. The default password is Huawei@CLOUD8.

  2. Run the following command and enter the password of the root user as prompted to switch to the root user (the default password is Huawei@CLOUD8!):

    su - root

  3. Run the following command to import environment variables:

    source set_env

    Information similar to the following is displayed:

    please choose environment variable which you want to import: 
    (1) openstack environment variable (keystone v3) 
    (2) cps environment variable 
    (3) openstack environment variable legacy (keystone v2) 
    (4) openstack environment variable of cloud_admin (keystone v3) 
    please choose:[1|2|3|4]      

  4. Select an authentication mode.

    To enable the built-in DC administrator's Keystone V3 authentication, enter 1, press Enter, and enter the password of account OS_USERNAME as instructed.

    Default password: FusionSphere123

    The environment variables are successfully imported if the command outputs of cps host-list and nova list are automatically displayed. After the environment variables are successfully imported, the system uses the Keystone V3 authentication with the built-in DC administrator, CPS and OpenStack commands can be executed.

    In the Mitaka release of OpenStack, Keystone command line interfaces (CLIs) are normalized and encrypted as OpenStack commands. When the Identity service is registered with Keystone, Keystone V3 is automatically used, but compatibility issues may occur when you run original Keystone commands related to tenants, roles, and services. Preferentially use the Keystone V3 authentication and OpenStack commands related to tenants, roles, and services.

  5. Run the following command to query the UUID of the VM on which the master database is deployed:

    nova list --all-|grep 'IP address of the VM on which the master database is deployed'

    Figure 21-1 VM UUID

    The string in the red box is the VM UUID.

  6. Run the following command to forcibly restart the master database VM:

    nova reboot VM UUID –hard

    Replace the italic part with the actual VM UUID obtained in 5.

  7. Wait for 3 to 5 minutes, and log in to the slave database. Run the following commands to check whether the slave database is switched to master:

    source /etc/profile

    service gaussdb query

    Figure 21-2 Database status
    • If the command output is similar to the preceding figure, the slave database is successfully switched to master.
    • If the command output is different from the preceding figure, contact technical support to rectify the fault.

The Slave Database Cannot Be Started

Symptom

The slave database is faulty and cannot automatically restore.

Possible Causes

In normal cases, when the slave database is abnormal, it automatically synchronizes data from the master database for restoration. However, if the fault persists after two restorations due to network problems, the slave database needs to be manually restored.

Troubleshooting Method

Manually synchronize data from the master database to the slave database.

Procedure
  1. Log in to the PUB-DB01 node using PuTTY.

    The default account is gaussdb. The default password is Huawei@123.

  2. Run the following command and enter the password of the root user as prompted to switch to the root user (the default password is Huawei@CLOUD8!):

    su - root

  3. Run the following command to view the database status and check whether the currently logged-in node is the standby one:

    service had query

    Information similar to that shown in Figure 21-3 is displayed, the node whose ROLE is active is the master database node. Otherwise, the node is the slave one.

    Figure 21-3 Database status

  4. Check whether the currently logged-in node is the slave database node based on the command output in 3.

    • If yes, go to 5.
    • If no, repeat 1 to 2 to log in to the PUB-DB02 node and go to 5.

  5. Run the following command to switch to the dbadmin user:

    su dbadmin

  6. Run the following command to synchronize data from the master database:

    gs_ctl build

    Figure 21-4 Synchronizing data from the master database
    • If the command output is similar to the preceding figure, the slave database is successfully restored.
    • If the command output is different from the preceding figure, contact technical support to rectify the fault.

Translation
Download
Updated: 2019-06-01

Document ID: EDOC1100062375

Views: 2079

Downloads: 12

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next