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>
(cherry picked from commit 05b8433b89)
This commit is contained in:
Madhu Rajanna 2021-06-15 11:39:01 +05:30 committed by mergify[bot]
parent d4b1e09815
commit 9fc0999a82

View File

@ -469,6 +469,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
} }