KaaSCephOperationRequest OSD removal specification

This section describes the KaaSCephOperationRequest CR specification used to automatically create a CephOsdRemoveRequest request. For the procedure workflow, see Creating a Ceph OSD removal request.


KaaSCephOperationRequest high-level parameters spec

Parameter

Description

osdRemove

Describes the definition for the CephOsdRemoveRequest spec. For details on the osdRemove parameters, see the tables below.

kaasCephCluster

Defines KaaSCephCluster on which the KaaSCephOperationRequest depends on. Use the kaasCephCluster parameter if the name or project of the corresponding Container Cloud cluster differs from the default one:

spec:
  kaasCephCluster:
    name: kaas-mgmt
    namespace: default
KaaSCephOperationRequest ‘osdRemove’ parameters spec

Parameter

Description

nodes

Map of Kubernetes nodes that specifies how to remove Ceph OSDs: by host-devices or OSD IDs. For details, see KaaSCephOperationRequest ‘nodes’ parameters spec.

approve

Flag that indicates whether a request is ready to execute removal. Can only be manually enabled by the Operator. For example:

spec:
  osdRemove:
    approve: true

keepOnFail

Flag used to keep requests in handling and not to proceed to the next request if the Validating or Processing phases failed. The request will remain in the InputWaiting state until the flag or the request itself is removed or the request spec is updated.

If the Validation phase fails, you can update the spec.osdRemove.nodes section in KaaSCephCluster to avoid issues and re-run the validation. If the Processing phase fails, you can resolve issues without resuming the Ceph Controller reconciliation and proceeding to the next request and apply the required actions to keep cluster data.

For example:

spec:
  osdRemove:
    keepOnFail: true

resolved

Optional. Flag that marks a finished request, even if it failed, to keep it in history. It allows resuming the Ceph Controller reconciliation without removing the failed request. The flag is used only by Ceph Controller and has no effect on request processing. Can only be manually specified. For example:

spec:
  osdRemove:
    resolved: true

resumeFailed

Optional. Flag used to resume a failed request and proceed with Ceph OSD removal if the KeepOnFail is set and the request status is InputWaiting. For example:

spec:
  osdRemove:
    resumeFailed: true
KaaSCephOperationRequest ‘nodes’ parameters spec

Parameter

Description

completeCleanUp

Flag used to clean up an entire node and drop it from the CRUSH map. Mutually exclusive with cleanupByDevice and cleanupByOsdId.

cleanupByDevice

List that describes devices to clean up by name or device path as they were specified in KaaSCephCluster. Mutually exclusive with completeCleanUp and cleanupByOsdId. Includes the following parameters:

  • name - name of the device to remove from the Ceph cluster. Mutually exclusive with path.

  • path - by-path of the device to remove from the Ceph cluster. Mutually exclusive with name. Supports device removal with by-id.

Warning

Since Container Cloud 2.25.0, Mirantis does not recommend setting device name or device by-path symlink in the cleanupByDevice field as these identifiers are not persistent and can change at node boot. Remove Ceph OSDs with by-id symlinks specified in the path field or use cleanupByOsdId instead.

For details, see Addressing storage devices.

cleanupByOsdId

List of Ceph OSD IDs to remove. Mutually exclusive with completeCleanUp and cleanupByDevice.

Example of KaaSCephOperationRequest with spec.osdRemove.nodes
apiVersion: kaas.mirantis.com/v1alpha1
kind: KaaSCephOperationRequest
metadata:
  name: remove-osd-request
  namespace: default
spec:
  kaasCephCluster:
    name: kaas-mgmt
    namespace: default
  osdRemove:
    nodes:
      "node-a":
        completeCleanUp: true
      "node-b":
        cleanupByOsdId: [1, 15, 25]
      "node-c":
        cleanupByDevice:
        - name: "sdb"
        - path: "/dev/disk/by-path/pci-0000:00:1c.5"
        - path: "/dev/disk/by-id/scsi-SATA_HGST_HUS724040AL_PN1334PEHN18ZS"

The example above includes the following actions:

  • For node-a, full cleanup, including all OSDs on the node, node drop from the CRUSH map, and cleanup of all disks used for Ceph OSDs on this node.

  • For node-b, cleanup of Ceph OSDs with IDs 1, 15, and 25 along with the related disk information.

  • For node-c, cleanup of the device with name sdb, the device with path ID /dev/disk/by-path/pci-0000:00:1c.5, and the device with by-id /dev/disk/by-id/scsi-SATA_HGST_HUS724040AL_PN1334PEHN18ZS, dropping of OSDs running on these devices.