kastenhq/kubestr

kubestr making 1 Go PVC not respecting storage request

Docteur-RS opened this issue · 1 comments

Hey,

Started kubestr with -z 45 which should have created a 45 Go PVC. But instead made a 1 Go PVC.

k get pvc 
NAME                    STATUS        VOLUME                                                                   CAPACITY   ACCESS MODES   STORAGECLASS            AGE
kubestr-fio-pvc-dfjm8   Terminating   ovh-managed-kubernetes-9x77sb-pvc-7a9bc017-82dc-4580-9b7a-9921c649f633   1Gi        RWO            csi-cinder-high-speed   49s
./kubestr fio -s csi-cinder-high-speed -z 45
PVC created kubestr-fio-pvc-dfjm8
Pod created kubestr-fio-pod-stk9l
Running FIO test (default-fio) on StorageClass (csi-cinder-high-speed) with a PVC of Size (45)
Elapsed time- 2.2568953s
FIO test results:
  Failed while running FIO test.: Error running command:([fio --directory /dataset /etc/fio-config/default-fio --output-format=json]), stderr:(fio: pid=0, err=28/file:filesetup.c:240, func=write, error=No space left on device
fio: pid=0, err=28/file:filesetup.c:240, func=write, error=No space left on device
fio: io_u error on file /dataset/job2.0.0: No space left on device: write offset=1588449280, buflen=4096
[...]
fio: io_u error on file /dataset/job2.0.0: No space left on device: write offset=1073922048, buflen=4096
fio: io_u error on file /dataset/job4.0.0: No space left on device: write offset=1351221248, buflen=131072): Failed to exec command in pod: command terminated with exit code 4  -  Error
Error: Failed while running FIO test.: Error running command:([fio --directory /dataset /etc/fio-config/default-fio --output-format=json]), stderr:(fio: pid=0, err=28/file:filesetup.c:240, func=write, error=No space left on device
fio: pid=0, err=28/file:filesetup.c:240, func=write, error=No space left on device
fio: io_u error on file /dataset/job2.0.0: No space left on device: write offset=1588449280, buflen=4096
fio: io_u error on file /dataset/job2.0.0: No space left on device: write offset=1073922048, buflen=4096
[...]

fio: io_u error on file /dataset/job4.0.0: No space left on device: write offset=1021313024, buflen=131072
fio: io_u error on file /dataset/job4.0.0: No space left on device: write offset=1351221248, buflen=131072): Failed to exec command in pod: command terminated with exit code 4
```

Using:
Kubestr [v0.4.36](https://github.com/kastenhq/kubestr/releases/tag/v0.4.36)
Kubernetes 1.24.3

Am I doing something wrong ?

I finally understood.

I was using kubestr this way kubestr fio -s csi-cinder-high-speed -z 45 but it should have been used this way kubestr fio -s csi-cinder-high-speed -z 45Gi

The missing "Gi" after size fixed it.
Pretty hard to find because outputing the PVC showed "45" as request and "1" as actual given storage.
Having the 45 correctly displayed didn't help to pinpoint the isssue...

Kubestr could print an error if -z doesn't come with the right size "metadata"...
I'll let this open if someone thinks there should be a fix for this.... Or not...