Skip to content

Commit b0f468c

Browse files
remove -p from non redis-cli command
1 parent 4731615 commit b0f468c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/controller/distributedrediscluster/sync_handler.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package distributedrediscluster
22

33
import (
44
"fmt"
5-
"strconv"
65
"time"
76

87
"github.com/go-logr/logr"
@@ -356,7 +355,7 @@ func (r *ReconcileDistributedRedisCluster) resetClusterPassword(ctx *syncContext
356355
// Update the password recorded in the file /data/redis_password, redis pod preStop hook
357356
// need /data/redis_password do CLUSTER FAILOVER
358357
cmd := fmt.Sprintf("echo %s > /data/redis_password", newPassword)
359-
if err := r.execer.ExecCommandInPodSet(podSet, "/bin/sh", "-c", "-p", strconv.Itoa(ctx.cluster.Spec.ClientPort), cmd); err != nil {
358+
if err := r.execer.ExecCommandInPodSet(podSet, "/bin/sh", "-c", cmd); err != nil {
360359
return err
361360
}
362361

0 commit comments

Comments
 (0)