Skip to content

Clean Up Orchestrator

Overview

Orchestrator provides a full cleanup workflow and a standalone component-cleanup playbook. Full cleanup removes every enabled Orchestrator component, including the encrypted credential file and Vault key by default.

Component cleanup can remove OpenCHAMI, OpenLDAP, Slurm, Kubernetes, storage mounts, or generated Orchestrator artifacts independently. Slurm and Kubernetes cleanup deletes or preserves the selected shared data first and then unmounts the corresponding storage and removes its /etc/fstab entries.

Danger

Cleanup is destructive. Slurm and Kubernetes cleanup can permanently delete data from mounted shared NFS storage. Back up required data and review the selected components before confirming the operation. OpenCHAMI cleanup also permanently deletes the boot-service-data, metadata-service-data, and postgres-data Podman volumes.

Credential retention

Full cleanup removes the Orchestrator credential file and Vault key by default. To retain them, add -e cleanup_credentials=false to the full cleanup command. The standalone component-cleanup playbook removes credentials only when its selected scope includes cleanup_credentials.

Prerequisites

  • Run cleanup from the OIM with the same OMNIA_DATA_PATH and OMNIA_PROJECT_NAME values used for deployment. Orchestrator uses <OMNIA_DATA_PATH>/orchestrator as its data root.
  • Stop cluster workloads that use the selected services or shared storage.
  • Back up configuration, application, project, scratch, and other required data stored in directories managed through the selected mounts.
  • Run omnia.sh commands from src/main and direct domain commands from src/orchestrator. Run the standalone component playbook only from src/orchestrator.

Procedure

Preview full cleanup

Set DRY_RUN=true to display the cleanup plan and execute the component tasks in Ansible check mode:

Run on: OIM
cd <OMNIA_SOURCE_PATH>/src/main
DRY_RUN=true ./omnia.sh --run orchestrator --tags cleanup
Run on: OIM
source /opt/omnia/activate-omnia.sh
cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks
DRY_RUN=true ansible-playbook orchestrator.yml --tags cleanup

Review the displayed component order and every shared-storage path before continuing.

Clean all enabled components

Run the full cleanup workflow:

Run on: OIM
cd <OMNIA_SOURCE_PATH>/src/main
./omnia.sh --run orchestrator --tags cleanup
Run on: OIM
source /opt/omnia/activate-omnia.sh
cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks
ansible-playbook orchestrator.yml --tags cleanup

Full cleanup prompts independently before deleting Slurm and Kubernetes shared data. For each prompt, type exactly yes to delete that component's shared data. Any other response preserves the shared data; cleanup continues and still unmounts that component's storage.

Use cleanup_slurm and cleanup_k8s to make these decisions non-interactively:

Value Behavior
true Delete the component's shared data without prompting, then unmount its storage.
false Preserve the component's shared data without prompting, then unmount its storage.
Omitted Prompt independently for that component.

For example:

Run on: OIM
cd <OMNIA_SOURCE_PATH>/src/main
./omnia.sh --run orchestrator --tags cleanup \
  -e cleanup_slurm=true -e cleanup_k8s=false
Run on: OIM
source /opt/omnia/activate-omnia.sh
cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks
ansible-playbook orchestrator.yml --tags cleanup \
  -e cleanup_slurm=true -e cleanup_k8s=false

This deletes Slurm shared data, preserves Kubernetes shared data, and unmounts both storage domains. Full cleanup also removes orchestrator_credentials.yml and .orchestrator_credentials_key by default. To preserve both files while cleaning the other enabled components, run:

Run on: OIM
./omnia.sh --run orchestrator --tags cleanup \
  -e cleanup_credentials=false

The value must be true or false. An invalid value stops cleanup before component removal begins. An explicit cleanup_credentials tag still removes the credential files and takes precedence over this full-cleanup opt-out.

For an approved non-interactive operation, set SKIP_APPROVAL=true:

Run on: OIM
cd <OMNIA_SOURCE_PATH>/src/main
SKIP_APPROVAL=true ./omnia.sh --run orchestrator --tags cleanup
Run on: OIM
source /opt/omnia/activate-omnia.sh
cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks
SKIP_APPROVAL=true ansible-playbook orchestrator.yml --tags cleanup

When cleanup_slurm or cleanup_k8s is omitted, SKIP_APPROVAL=true approves deletion of that component's shared data. The command above also removes Orchestrator credentials because credential cleanup is enabled by default.

Clean credentials

Remove only the Orchestrator credential file and Vault key:

Run on: OIM
cd <OMNIA_SOURCE_PATH>/src/main
./omnia.sh --run orchestrator --tags cleanup_credentials
Run on: OIM
source /opt/omnia/activate-omnia.sh
cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks
ansible-playbook orchestrator.yml --tags cleanup_credentials

Remove all enabled components and credentials in one supported operation:

Run on: OIM
cd <OMNIA_SOURCE_PATH>/src/main
./omnia.sh --run orchestrator --tags cleanup,cleanup_credentials
Run on: OIM
source /opt/omnia/activate-omnia.sh
cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks
ansible-playbook orchestrator.yml --tags cleanup,cleanup_credentials

Clean selected components

Component tags are intentionally rejected by the top-level Orchestrator playbook. Run the standalone cleanup playbook directly from src/orchestrator:

Run on: OIM
cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks/cleanup
ansible-playbook cleanup_orchestrator.yml --tags <component>

Supported component tags are:

Tag Scope
openchami OpenCHAMI services, containers, configuration, artifacts, the openchami and ochami RPMs, and the persistent boot-service-data, metadata-service-data, and postgres-data Podman volumes.
openldap OpenLDAP container, Quadlet configuration, and data.
slurm Slurm configuration and managed shared-storage directories. It deletes or preserves shared data before scoped storage cleanup.
k8s Kubernetes configuration and managed shared-storage directories. It deletes or preserves shared data before scoped storage cleanup.
storage_mounts Configured NFS unmount and /etc/fstab cleanup.
artifacts Generated Orchestrator artifacts and state files.
cleanup_credentials Encrypted credential file and Vault key.

Use DRY_RUN=true or SKIP_APPROVAL=true with the standalone command when the same preview or explicitly approved non-interactive behavior is required. Running the standalone playbook without tags selects all enabled components and removes Orchestrator credentials. To preserve them, select each required component explicitly and omit cleanup_credentials; do not run the standalone playbook without tags.

Verification

  • Confirm that the play recap contains no failed tasks and that the completion message lists the intended number of components.
  • For a component cleanup, verify only the selected service, configuration, mounts, and artifacts were removed.
  • When OpenCHAMI cleanup was selected, confirm its three managed persistent Podman volumes and the openchami and ochami RPMs are absent, and confirm the data-volume systemd units are inactive.
  • When credentials were intentionally omitted from component cleanup, confirm both credential files remain in the project input directory.
  • When full cleanup used cleanup_credentials=false, confirm both credential files remain in the project input directory.
  • When cleanup_credentials was selected, confirm both credential files were removed.

Next steps

  • Run ./omnia.sh --setup-venv again only when project inputs need to be restaged.
  • Follow Deploy OpenCHAMI or Provision Nodes to redeploy the required components.

Troubleshooting

  • Explicit component cleanup aborts: Run it interactively and type exactly yes, or set SKIP_APPROVAL=true only after reviewing the destructive scope.
  • Shared-data cleanup fails: Confirm the expected share is mounted on the OIM or is a local NFS export. When deletion was selected, cleanup fails if the server-side data is inaccessible.
  • A component tag is rejected: Run component tags against playbooks/cleanup/cleanup_orchestrator.yml, not the top-level playbooks/orchestrator.yml.
  • A mount remains active: Stop processes using the mount, verify the relevant storage_config.yml entry, and rerun the storage_mounts component cleanup.