From 3bbc46543dd7fb6b0ea0aede1fe2c853d80e41a4 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 17 Mar 2023 11:11:52 +0300 Subject: [PATCH] Fix vitastor-cli create syntax --- csi/src/controllerserver.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/csi/src/controllerserver.go b/csi/src/controllerserver.go index ea869cac..f80ee05b 100644 --- a/csi/src/controllerserver.go +++ b/csi/src/controllerserver.go @@ -6,6 +6,7 @@ package vitastor import ( "context" "encoding/json" + "fmt" "strings" "bytes" "strconv" @@ -178,7 +179,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol } // Create image using vitastor-cli - _, err := invokeCLI(ctxVars, []string{ "create", volName, "-s", string(volSize), "--pool", string(poolId) }) + _, err := invokeCLI(ctxVars, []string{ "create", volName, "-s", fmt.Sprintf("%v", volSize), "--pool", fmt.Sprintf("%v", poolId) }) if (err != nil) { if (strings.Index(err.Error(), "already exists") > 0)