Enabling skip snapshot directories feature on Red Hat® OpenShift®

The following procedure helps you set the configuration for skipping snapshot directories by using NFS_SKIP_SNAPSHOT_DIRS and INCLUDE_SCALE_SNAPSHOTS variable.

Before you begin

Add the following variables as needed to the configmap and set the value to 'True'.
  • NFS_SKIP_SNAPSHOT_DIRS
  • INCLUDE_SCALE_SNAPSHOTS

Procedure

  1. Issue the following command to change the current project:
    oc project ${PROJECT_NAME}
  2. Issue the following command to edit the configmap:
    oc edit configmap connmgr
    After you run the preceding command, the output looks similar to the following as shown here. You can modify the following file and add or update the variables and its value in the data section.
    # Please edit the object below. Lines beginning with a '#' will be ignored,
    # and an empty file will abort the edit. If an error occurs while saving this file will be
    # reopened with the relevant failures.
    #
    apiVersion: v1
    data:
      CONNMGR_ENDPOINT: /connmgr/v1/
      CONNMGR_PROTOCOL: http
      NFS_SKIP_SNAPSHOT_DIRS: "True"
    kind: ConfigMap
    metadata:
      creationTimestamp: "2022-08-26T19:55:39Z"
      name: connmgr
      namespace: spectrum-discover
      ownerReferences:
      - apiVersion: spectrum-discover.ibm.com/v1alpha1
        kind: SpectrumDiscover
        name: spectrumdiscover
        uid: 001fb331-c2ef-4b28-8827-5c7d6a702904
      resourceVersion: "13761646"
      uid: bf621847-4c00-44c9-a7f2-4d3430ede67b
  3. Save the preceding updated object and issue the following command to verify that data is updated.
    oc get configmap connmgr -o yaml 
    After you run the preceding command, the output looks similar to the following as shown here:
    apiVersion: v1
    data:
      CONNMGR_ENDPOINT: /connmgr/v1/
      CONNMGR_PROTOCOL: http
      NFS_SKIP_SNAPSHOT_DIRS: "True"
    kind: ConfigMap
    metadata:
      creationTimestamp: "2022-08-23T11:33:40Z"
      name: connmgr
      namespace: spectrum-discover
      ownerReferences:
      - apiVersion: spectrum-discover.ibm.com/v1alpha1
        kind: SpectrumDiscover
        name: spectrumdiscover
        uid: 64aa30c1-d621-47f5-9ee8-763ee9386bbd
      resourceVersion: "293269249"
      uid: e54ebffa-be11-4d05-82e4-03bc94edbce6
  4. Issue the following commands to verify that the update is made in the connection manager pod. First, the deployment must be scaled to 0 and then rescaled to 1:

    Deployment is scaled to 0.

    oc scale -n spectrum-discover deployment/spectrum-discover-connmgr --replicas 0

    Deployment is rescaled to 1.

    oc scale -n spectrum-discover deployment/spectrum-discover-connmgr --replicas 1