Description of problem:
Can't provision a Filesystem PVC whose size is not aligned with 512. No human-readable error and instruction how to fix.
Version-Release number of selected component (if applicable):
4.15
How reproducible:
Always
Steps to Reproduce:
1. Create a PVC with Filesystem volume mode, and size not aligned to 512 (and a first consumer pod)
2. See PVC is Pending $ oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE simple-pvc Pending lvms-vg1 136m
3. Describe PVC trying to see what's wrong: $ oc describe pvc simple-pvc Name: simple-pvc Namespace: default StorageClass: lvms-vg1 Status: Pending Volume: Labels: <none> Annotations: volume.beta.kubernetes.io/storage-provisioner: topolvm.io volume.kubernetes.io/selected-node: cnv-qe-infra-24.<server_domain_replaced_by_the_bug_reporter> volume.kubernetes.io/storage-provisioner: topolvm.io Finalizers: [kubernetes.io/pvc-protection] Capacity: Access Modes: VolumeMode: Filesystem Used By: test Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal WaitForFirstConsumer 132m persistentvolume-controller waiting for first consumer to be created before binding Warning ProvisioningFailed 109m (x14 over 132m) topolvm.io_topolvm-controller-765c99856c-f29sv_5ca94247-2137-4766-95d5-df99f8fb9191 failed to provision volume with StorageClass "lvms-vg1": rpc error: code = Internal desc = exit status 3 Normal Provisioning 4m36s (x42 over 132m) topolvm.io_topolvm-controller-765c99856c-f29sv_5ca94247-2137-4766-95d5-df99f8fb9191 External provisioner is provisioning volume for claim "default/simple-pvc" Normal ExternalProvisioning 2m25s (x535 over 132m) persistentvolume-controller Waiting for a volume to be created either by the external provisioner 'topolvm.io' or manually by the system administrator. If volume creation is delayed, please verify that the provisioner is running and correctly registered.
akalenyu found in the topolvm-node-gdwpq pod log:
{"level":"info","ts":"2024-02-26T15:28:36Z","msg":"invoking LVM command","controller":"logicalvolume","controllerGroup":"topolvm.io","controllerKind":"LogicalVolume","LogicalVolume":{"name":"pvc-fae3db4d-fb3b-4214-88db-d36924414fcd"},"namespace":"","name":"pvc-fae3db4d-fb3b-4214-88db-d36924414fcd","reconcileID":"ecea6f2b-8b3f-4c74-aeb3-9e054f10dcbe","args":["lvcreate","-T","vg1/thin-pool-1","-n","59066c8f-4a6b-4349-813f-ff6264789788","-V","221920847b","-W","y","-y"]} Size is not a multiple of 512. Try using 221920768 or 221921280. Invalid argument for --virtualsize: 221920847b Error during parsing of command line.
Actual results:
PVC is Pending, error is not clear
Expected results:
PVC is Bound, provisioner took care about the alignment
Additional info:
Reproducer:
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: simple-pvc spec: storageClassName: lvms-vg1 accessModes: - ReadWriteOnce resources: requests: storage: 221920847 --- apiVersion: v1 kind: Pod metadata: creationTimestamp: null labels: run: test name: test spec: securityContext: seccompProfile: type: RuntimeDefault runAsNonRoot: true runAsUser: 10001 runAsGroup: 10001 fsGroup: 10001 containers: - args: ["tail", "-f", "/dev/null"] image: busybox name: test resources: {} securityContext: allowPrivilegeEscalation: false capabilities: drop: ["ALL"] volumeMounts: - name: mypvc mountPath: /disk volumes: - name: mypvc persistentVolumeClaim: claimName: simple-pvc
- blocks
-
CNV-38692 LVMS on SNO: can't import a DV with contentType: archive
- Closed
- is depended on by
-
OCPBUGS-30298 [release-4.15] LVMS: can't provision a Filesystem PVC when byte-level precision resources.requests.storage is not a multiple of 512
- Closed
- links to
-
RHBA-2024:129552 LVMS 4.16 Bug Fix and Enhancement update