rook / rook

Storage Orchestration for Kubernetes
https://rook.io
Apache License 2.0
11.98k stars 2.64k forks source link

osd: limit storageClassDeviceSets to 63 chars #14134

Closed subhamkrai closed 2 weeks ago

subhamkrai commented 2 weeks ago

there are some cases where storageClassDeviceSets length are more 63 chars and osd provisioned failed due to this. with error

 failed to run osd provisioning job for PVC "ocs-deviceset-*-local-volume-storageclass-0-data-*": Job.batch "rook-ceph-osd-prepare-*" is invalid: [spec.template.spec.volumes[10].name: Invalid value: "ocs-deviceset-*-local-volume-storageclass-0-data-*": must be no more than 63 characters, spec.template.spec.containers[0].volumeMounts[9].name: Not found: "ocs-deviceset-*-local-volume-storageclass-0-data-*",

Using x-validator to limit the maxLength to 63 chars.

Checklist:

subhamkrai commented 2 weeks ago

testing result

ka cluster-on-pvc.yaml 
The CephCluster "rook-ceph" is invalid: 
* spec.storage.storageClassDeviceSets[0].name: Too long: may not be longer than 63
* <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation
anthonyeleven commented 1 week ago

Is a "deviceset" a Rook-internal thing?

subhamkrai commented 1 week ago

Is a "deviceset" a Rook-internal thing?

@anthonyeleven yess

travisn commented 1 week ago

@anthonyeleven For an example of the storageClassDeviceSets, see the PVC-based clusters.