Skip to content

Commit

Permalink
fix: mogdb role probe (apecloud#6846)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuriwuyun authored Mar 19, 2024
1 parent 01f0cd4 commit da34739
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/lorry/engines/custom/get_replica_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"io"
"net/http"
"net/url"
"os"
"regexp"
"strings"

Expand Down Expand Up @@ -64,11 +65,11 @@ func (mgr *Manager) GetReplicaRoleThroughCommands(ctx context.Context, cluster *
roleProbeCmd = append([]string{"sh", "-c"}, strings.Join(roleProbeCmd, " "))
}

envs, err := util.GetGlobalSharedEnvs()
if err != nil {
return "", err
}
return util.ExecCommand(ctx, roleProbeCmd, envs)
// envs, err := util.GetGlobalSharedEnvs()
// if err != nil {
// return "", err
// }
return util.ExecCommand(ctx, roleProbeCmd, os.Environ())
}

func (mgr *Manager) GetReplicaRoleThroughASMAction(ctx context.Context, cluster *dcs.Cluster) (string, error) {
Expand Down

0 comments on commit da34739

Please sign in to comment.