rbd: check stdErr for does not have a parent error

actual error will be present in the stdErr not the error
when we try to add a task to flatten the rbd image. This
commits corrects the error checking when the image does
not have a parent.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-06-15 11:39:01 +05:30 committed by mergify[bot]
parent eeb2ad8fac
commit 05b8433b89

View File

@ -471,6 +471,9 @@ func addRbdManagerTask(ctx context.Context, pOpts *rbdVolume, arg []string) (boo
util.WarningLog(ctx, "uncaught error while scheduling a task (%v): %s", err, stderr) util.WarningLog(ctx, "uncaught error while scheduling a task (%v): %s", err, stderr)
} }
} }
if err != nil {
err = fmt.Errorf("%w. stdError:%s", err, stderr)
}
return supported, err return supported, err
} }