fix rbd info when return warning information

This commit is contained in:
smileusd 2019-09-18 16:50:01 +08:00
parent 57d87502ba
commit e5304209ed

View File

@ -708,7 +708,7 @@ func (util *RBDUtil) rbdInfo(b *rbdMounter) (int, error) {
//
klog.V(4).Infof("rbd: info %s using mon %s, pool %s id %s key %s", b.Image, mon, b.Pool, id, secret)
output, err = b.exec.Run("rbd",
"info", b.Image, "--pool", b.Pool, "-m", mon, "--id", id, "--key="+secret, "--format=json")
"info", b.Image, "--pool", b.Pool, "-m", mon, "--id", id, "--key="+secret, "-k=/dev/null", "--format=json")
if err, ok := err.(*exec.Error); ok {
if err.Err == exec.ErrNotFound {