From 17956612821c92e31c86909323982c86a16bbaca Mon Sep 17 00:00:00 2001 From: Benny Zlotnik Date: Mon, 11 Mar 2024 18:10:23 +0200 Subject: [PATCH] ovirt,openstack: divide pvc size by 100 Signed-off-by: Benny Zlotnik --- pkg/controller/plan/adapter/openstack/builder.go | 2 +- pkg/controller/plan/adapter/ovirt/builder.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/plan/adapter/openstack/builder.go b/pkg/controller/plan/adapter/openstack/builder.go index b86abaf9d..3361713ae 100644 --- a/pkg/controller/plan/adapter/openstack/builder.go +++ b/pkg/controller/plan/adapter/openstack/builder.go @@ -1236,7 +1236,7 @@ func (r *Builder) PopulatorTransferredBytes(persistentVolumeClaim *core.Persiste } pvcSize := persistentVolumeClaim.Spec.Resources.Requests["storage"] - transferredBytes = progressPercentage * pvcSize.Value() + transferredBytes = (progressPercentage * pvcSize.Value()) / 100 return } diff --git a/pkg/controller/plan/adapter/ovirt/builder.go b/pkg/controller/plan/adapter/ovirt/builder.go index 5eaf135f7..57d4f9c41 100644 --- a/pkg/controller/plan/adapter/ovirt/builder.go +++ b/pkg/controller/plan/adapter/ovirt/builder.go @@ -877,7 +877,7 @@ func (r *Builder) PopulatorTransferredBytes(pvc *core.PersistentVolumeClaim) (tr } pvcSize := pvc.Spec.Resources.Requests["storage"] - transferredBytes = progressPercentage * pvcSize.Value() + transferredBytes = (progressPercentage * pvcSize.Value()) / 100 return }