ODF-4.14 | Customizing timeouts for Reclaim Space Operation - Developer Preview

Updated

Important: A developer preview feature is subject to Developer preview support limitations. Developer preview features are not intended to be run in production environments. The clusters deployed with the developer preview features are considered to be development clusters and are not supported through the Red Hat Customer Portal case management system. Development Preview features are meant for customers who are willing to evaluate new products or releases of products in an early stage of product development. If you need assistance with developer preview features, reach out to the ocs-devpreview@redhat.com mailing list and a member of the Red Hat Development Team will assist you as quickly as possible based on availability and work schedules. To know more about the support scope refer to the This content is not included.KCS

Why custom timeouts are required for Reclaim Space Operation

Depending on the RBD volume size and its data pattern, Reclaim Space Operation may fail with the context deadline exceeded error. You can avoid this by increasing the timeout value.

The following example shows the failed status which you can obtain by inspecting -o yaml of the corresponding ReclaimSpaceJob:

Status:
  Completion Time:  2023-03-08T18:56:18Z
  Conditions:
    Last Transition Time:  2023-03-08T18:56:18Z
    Message:               Failed to make controller request: context deadline exceeded
    Observed Generation:   1
    Reason:                failed
    Status:                True
    Type:                  Failed
  Message:                 Maximum retry limit reached
  Result:                  Failed
  Retries:                 6
  Start Time:              2023-03-08T18:33:55Z

Setting custom timeouts at global level

  • Create the following configmap to set the global timeout.
apiVersion: v1
kind: ConfigMap
metadata:
  name: csi-addons-config
  namespace: openshift-storage
data:
  "reclaim-space-timeout": "6m"
  • Restart the csi-addons operator pod.
oc delete po -n openshift-storage -l "app.kubernetes.io/name=csi-addons"

All Reclaim Space Operations started after the above configmap creation use the customized timeout.

Setting custom timeouts at RelaimSpaceJob or ReclaimSpaceCronJob level

  • Set spec.timeout in ReclaimSpaceJob CR as follows:
apiVersion: csiaddons.openshift.io/v1alpha1
kind: ReclaimSpaceJob
metadata:
  name: sample-1
spec:
  target:
    persistentVolumeClaim: pvc-sample
  timeout: 360

The timeout parameter specifies the timeout in seconds for the grpc request sent to the CSI driver. If the timeout value is not specified, it defaults to the value of global reclaimspace timeout. Minimum allowed value for timeout is 60.

  • Set spec.jobTemplate.timeout in ReclaimSpaceCronJob CR as shown below:
apiVersion: csiaddons.openshift.io/v1alpha1
kind: ReclaimSpaceCronJob
metadata:
  name: reclaimspacecronjob-sample
spec:
  jobTemplate:
    spec:
      target:
        persistentVolumeClaim: pvc-sample
      timeout: 600
  schedule: '@weekly'
SBR
Category
Article Type