Check the cluster version

更新时间:
复制 MD 格式

Use the pdbcli version command to check the cluster version.

Run the following command to check the version of the cluster installed in the current directory:

pdbcli version

Sample output:

Using config file: ./config.yaml
Client Version: cmd.Version{Version:"v0.2.0", GitCommit:"5e5e0d0da55ce9298d8f5c1fda59e0aa5ef39c83", BuildDate:"2020-09-09T02:39:11Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}

To see the help information, run pdbcli help version or pdbcli version --help:

Using config file: ./config.yaml
Print the version information for the current context

Usage:
 pdbcli version [flags]

Flags:
 -h, --help  help for version

Global Flags:
   --config string  Specify Config file. (default "./config.yaml")
   --debug      Enable additional output for debugging.

To check the versions of cluster components, add the -a parameter:

pdbcli version -a
Note

The version information for each component is available only when the high availability (HA) component, Cluster_Manager, is running.

Sample output:

Using config file: polardb2.yaml
{
        "backup_agent": [
                {
                        "endpoint": "10.x.x.x:817",
                        "version": "v2.2.2-20220224142036-xxxxxxxx"
                },
                {
                        "endpoint": "10.x.x.x:817",
                        "version": "v2.2.2-20220224142036-xxxxxxxx"
                },
                {
                        "endpoint": "10.x.x.x:817",
                        "version": "v2.2.2-20220224142036-xxxxxxxx"
                },
                {
                        "endpoint": "10.x.x.x:817",
                        "version": "v2.2.2-20220224142036-xxxxxxxx"
                }
        ],
        "node_driver": [
                {
                        "endpoint": "10.x.x.x:12355",
                        "version": "v2.2.1-20211207054315-xxxxxxxx"
                },
                {
                        "endpoint": "10.x.x.x:12355",
                        "version": "v2.2.1-20211207054315-xxxxxxxx"
                },
                {
                        "endpoint": "10.x.x.x:12355",
                        "version": "v2.2.1-20211207054315-xxxxxxxx"
                },
                {
                        "endpoint": "10.x.x.x:12355",
                        "version": "v2.2.1-20211207054315-xxxxxxxx"
                }
        ],
        "pdbcli": {
                "name": "pdbcli",
                "version": "v2.2.2.2-20220420105840-xxxxxxxx"
        },
        "plugins": [
                {
                        "name": "golang-manager",
                        "version": "v2.2.0-20220420183810-xxxxxxxx"
                }
        ],
        "universe_explorer": [
                {
                        "endpoint": "10.x.x.x:819",
                        "version": "map[Buildtime:2021-12-15T07:51:11Z GitBranch:POLARDB_O_GAWR_POLARFLEX_2_2_0_RELEASE GitCommitID:xxxxxxxx RpmName:t-polardb-o-universe-polarflex RpmRelease:20211215155054.alios7 RpmVersion:1.0.0]"
                },
                {
                        "endpoint": "10.x.x.x:819",
                        "version": "map[Buildtime:2021-12-15T07:51:11Z GitBranch:POLARDB_O_GAWR_POLARFLEX_2_2_0_RELEASE GitCommitID:xxxxxxxxRpmName:t-polardb-o-universe-polarflex RpmRelease:20211215155054.alios7 RpmVersion:1.0.0]"
                },
                {
                        "endpoint": "10.x.x.x:819",
                        "version": "map[Buildtime:2021-12-15T07:51:11Z GitBranch:POLARDB_O_GAWR_POLARFLEX_2_2_0_RELEASE GitCommitID:xxxxxxxx RpmName:t-polardb-o-universe-polarflex RpmRelease:20211215155054.alios7 RpmVersion:1.0.0]"
                },
                {
                        "endpoint": "10.x.x.x:819",
                        "version": "map[Buildtime:2021-12-15T07:51:11Z GitBranch:POLARDB_O_GAWR_POLARFLEX_2_2_0_RELEASE GitCommitID:xxxxxxxx RpmName:t-polardb-o-universe-polarflex RpmRelease:20211215155054.alios7 RpmVersion:1.0.0]"
                }
        ],
        "version": "v2.2.0-20220420183810-xxxxxxxx"
}