mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 09:58:16 +00:00
Merge pull request #798 from percona/PT-2217_pt-mongodb-summary_gives_error_with_psmdb6.0
PT-2217 - pt-mongodb-summary gives error with psmdb6.0
This commit is contained in:
@@ -186,7 +186,7 @@ services:
|
||||
image: ${TEST_MONGODB_IMAGE:-mongo:4.2}
|
||||
ports:
|
||||
- "${TEST_MONGODB_STANDALONE_PORT:-27017}:27017"
|
||||
command: mongod --replSet rs1 --shardsvr --port 27017 --oplogSize 16
|
||||
command: mongod --port 27017 --oplogSize 16
|
||||
postgres9:
|
||||
image: ${POSTGRE_IMAGE:-postgres:9.6}
|
||||
container_name: go_postgres9_1
|
||||
|
@@ -374,14 +374,14 @@ func getHostInfo(ctx context.Context, client *mongo.Client) (*hostInfo, error) {
|
||||
}
|
||||
|
||||
cmdOpts := proto.CommandLineOptions{}
|
||||
query := primitive.D{{Key: "getCmdLineOpts", Value: 1}, {Key: "recordStats", Value: 1}}
|
||||
query := primitive.D{{Key: "getCmdLineOpts", Value: 1}}
|
||||
err := client.Database("admin").RunCommand(ctx, query).Decode(&cmdOpts)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "cannot get command line options")
|
||||
}
|
||||
|
||||
ss := proto.ServerStatus{}
|
||||
query = primitive.D{{Key: "serverStatus", Value: 1}, {Key: "recordStats", Value: 1}}
|
||||
query = primitive.D{{Key: "serverStatus", Value: 1}}
|
||||
if err := client.Database("admin").RunCommand(ctx, query).Decode(&ss); err != nil {
|
||||
return nil, errors.Wrap(err, "GetHostInfo.serverStatus")
|
||||
}
|
||||
@@ -528,7 +528,6 @@ func getSecuritySettings(ctx context.Context, client *mongo.Client, ver string)
|
||||
cmdOpts := proto.CommandLineOptions{}
|
||||
err = client.Database("admin").RunCommand(ctx, primitive.D{
|
||||
{Key: "getCmdLineOpts", Value: 1},
|
||||
{Key: "recordStats", Value: 1},
|
||||
}).Decode(&cmdOpts)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "cannot get command line options")
|
||||
@@ -633,7 +632,6 @@ func getOpCountersStats(ctx context.Context, client *mongo.Client, count int,
|
||||
|
||||
err := client.Database("admin").RunCommand(ctx, primitive.D{
|
||||
{Key: "serverStatus", Value: 1},
|
||||
{Key: "recordStats", Value: 1},
|
||||
}).Decode(&ss)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user