| Summary: |
[4.8.z] Disk is not usable due to incorrect size for proper alignment |
| Product: |
Container Native Virtualization (CNV)
|
Reporter: |
Adam Litke <alitke> |
| Component: |
Storage | Assignee: |
Alexander Wels <awels> |
| Status: |
CLOSED
CURRENTRELEASE
|
QA Contact: |
Kevin Alon Goldblatt <kgoldbla> |
| Severity: |
high
|
Docs Contact: |
|
| Priority: |
unspecified
|
|
|
| Version: |
2.6.5 | CC: |
awels, cnv-qe-bugs, gveitmic, kgoldbla, mrashish, nrevo, tmicheli, yadu, ycui
|
| Target Milestone: |
--- | |
|
| Target Release: |
4.8.1 | |
|
| Hardware: |
x86_64 | |
|
| OS: |
Linux | |
|
| Whiteboard: |
|
|
Fixed In Version:
|
v4.8.1-16
|
Doc Type:
|
If docs needed, set a value
|
|
Doc Text:
|
|
Story Points:
|
---
|
|
Clone Of:
|
1976730
|
Environment:
|
|
|
Last Closed:
|
2021-09-06 10:57:11 UTC
|
Type:
|
---
|
|
Regression:
|
---
|
Mount Type:
|
---
|
|
Documentation:
|
---
|
CRM:
|
|
|
Verified Versions:
|
|
Category:
|
---
|
|
oVirt Team:
|
---
|
RHEL 7.3 requirements from Atomic Host:
|
|
|
Cloudforms Team:
|
---
|
Target Upstream Version:
|
|
|
Embargoed:
|
|
| |
| Bug Depends On: |
1976730, 1990560
|
|
|
| Bug Blocks: |
|
|
|
Verified with the following code: --------------------------------------------- oc version Client Version: 4.8.0-202108120034.p0.git.0d10c3f.assembly.stream-0d10c3f Server Version: 4.8.6 Kubernetes Version: v1.21.1+9807387 oc get csv -n openshift-cnv NAME DISPLAY VERSION REPLACES PHASE kubevirt-hyperconverged-operator.v4.8.1 OpenShift Virtualization 4.8.1 kubevirt-hyperconverged-operator.v4.8.0 Succeeded Verified with the following scenario: --------------------------------------------- 1. Connect to a host on the cluster: oc debug node/stg10-kevin-jdtkw-worker-0-7f69w sh-4.4# chroot /host/ 2. Prepare 4K aligned fake block storage fallocate -l 10GiB /var/iscsi losetup -f -b 4096 /var/iscsi losetup -l NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC /dev/loop1 0 0 0 0 /var/iscsi 0 4096 3. Install the filesystem and mount the device: mkfs.ext4 -b 4096 /var/iscsi mkdir /var/hpvolumes/4k mount /dev/loop1 /var/hpvolumes/4k/ 4. Label the device: ls -ltrZ /var/hpvolumes/4k total 16 drwx------. 2 root root system_u:object_r:unlabeled_t:s0 16384 Aug 19 15:30 lost+found sudo chcon -t container_file_t -R /var/hpvolumes/4k ls -ltrZ /var/hpvolumes/4k total 16 drwx------. 2 root root system_u:object_r:container_file_t:s0 16384 Aug 19 15:30 lost+found 5. Create a special pv pointing to the loopback device created: (see yaml below) 6. Create a storageclass on the new PV (see yaml below) 7. Create the vm using the new storageclass: (see yaml below) oc create -f cirros-vm.yaml virtualmachine.kubevirt.io/vm-cirros-dv-2 created 8. oc get dv -w NAME PHASE PROGRESS RESTARTS AGE cirros-dv-2 Succeeded 100.0% 9s 9. Start vm: oc get vm NAME AGE STATUS READY vm-cirros-dv-2 28s Stopped False virtctl start vm-cirros-dv-2 VM vm-cirros-dv-2 was scheduled to start oc get vmi NAME AGE PHASE IP NODENAME READY vm-cirros-dv-2 17s Running 10.128.2.178 stg10-kevin-jdtkw-worker-0-7f69w True [cnv-qe-jenkins@stg10-kevin-jdtkw-executor kev]$ virtctl console vm-cirros-dv-2 Successfully connected to vm-cirros-dv-2 console. The escape sequence is ^] >>>>> VMI is running and vm can be accessed Moving to verified! Additional information: --------------------------------------------------------------------------------- special pv yaml: apiVersion: v1 kind: PersistentVolume metadata: name: test-pv-volume labels: type: local spec: nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - stg10-kevin-jdtkw-worker-0-7f69w storageClassName: test-sc capacity: storage: 10Gi accessModes: - ReadWriteOnce hostPath: path: "/var/hpvolumes/4k" StorageClass yaml: cat sc.yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: test-sc provisioner: kubernetes.io/no-provisioner reclaimPolicy: Delete volumeBindingMode: Immediate vm yaml: apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachine metadata: labels: kubevirt.io/vm: vm-cirros-dv-2 name: vm-cirros-dv-2 spec: dataVolumeTemplates: - metadata: name: cirros-dv-2 spec: pvc: accessModes: - ReadWriteOnce resources: requests: storage: 100M storageClassName: test-sc source: http: url: "http://xxx/xxx/xxx/cirros-0.4.0-x86_64-disk.qcow2" running: false template: metadata: labels: kubevirt.io/vm: vm-datavolume spec: domain: devices: disks: - disk: bus: virtio name: datavolumevolume machine: type: "" resources: requests: memory: 64M terminationGracePeriodSeconds: 0 volumes: - dataVolume: name: cirros-dv-2 name: datavolumevolume