using string instead of byte

Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
This commit is contained in:
zouyee 2019-12-24 09:23:02 +08:00
parent 5e31799701
commit bae72ee8d2

View File

@ -487,7 +487,7 @@ func (util *RBDUtil) DetachDisk(plugin *rbdPlugin, deviceMountPath string, devic
// rbd unmap
output, err := exec.Command(rbdCmd, "unmap", device).CombinedOutput()
if err != nil {
return rbdErrors(err, fmt.Errorf("rbd: failed to unmap device %s, error %v, rbd output: %v", device, err, output))
return rbdErrors(err, fmt.Errorf("rbd: failed to unmap device %s, error %v, rbd output: %s", device, err, string(output)))
}
klog.V(3).Infof("rbd: successfully unmap device %s", device)