Merge pull request #11144 from rook/mergify/bp/release-1.10/pr-10721
pool: add timeout to ceph cmd (backport #10721)
This commit is contained in:
1 file changed
+2
-1
@@ -25,6 +25,7 @@ import (
|
||||
|
||||
"github.com/coreos/pkg/capnslog"
|
||||
cephclient "github.com/rook/rook/pkg/daemon/ceph/client"
|
||||
"github.com/rook/rook/pkg/util/exec"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
@@ -389,7 +390,7 @@ func createPool(context *clusterd.Context, clusterInfo *cephclient.ClusterInfo,
|
||||
}
|
||||
logger.Infof("initializing pool %q for RBD use", p.Name)
|
||||
args := []string{"pool", "init", p.Name}
|
||||
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).Run()
|
||||
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).RunWithTimeout(exec.CephCommandsTimeout)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to initialize pool %q for RBD use. %s", p.Name, string(output))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user