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:
Travis Nielsen authored and GitHub committed 2022-10-31 13:25:45 -06:00
commit fd397caf77
1 file changed
+2 -1
+2 -1
View File
@@ -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))
}