rbd: include rados-namespace when calling addRbdManagerTask()

It seems that calls to addRbdManagerTask() do not include the
rados-namespace in the image location. Functions calling
addRbdManagerTask() construct the image location themselves, but should
use rbdVolume.String() to include all the attributes.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit d534ee9ce8)
This commit is contained in:
Niels de Vos 2021-02-11 08:52:16 +01:00 committed by mergify[bot]
parent 2d5cc39e59
commit 0d635b5b99

View File

@ -488,7 +488,7 @@ func (rv *rbdVolume) flattenRbdImage(ctx context.Context, cr *util.Credentials,
} }
if forceFlatten || (depth >= hardlimit) || (depth >= softlimit) { if forceFlatten || (depth >= hardlimit) || (depth >= softlimit) {
args := []string{"flatten", rv.Pool + "/" + rv.RbdImageName, "--id", cr.ID, "--keyfile=" + cr.KeyFile, "-m", rv.Monitors} args := []string{"flatten", rv.String(), "--id", cr.ID, "--keyfile=" + cr.KeyFile, "-m", rv.Monitors}
supported, err := addRbdManagerTask(ctx, rv, args) supported, err := addRbdManagerTask(ctx, rv, args)
if supported { if supported {
if err != nil { if err != nil {