Collect Cluster Logs¶
Overview¶
The Utils collect workflow gathers troubleshooting logs from Kubernetes,
Slurm, login, and login-compiler nodes listed in collect_pxe.yml. It creates
dynamic Ansible groups, fetches the configured log sources, and writes a
timestamped archive and metadata.json under the active Utils project output.
Missing log sources and unreachable nodes are recorded as warnings so that
collection can continue for the remaining nodes. An unreachable node also
receives an SSH_COLLECTION_FAILED.txt marker in the collected workspace
before the archive is created.
Prerequisites¶
- Initialize the Utils module so that
collect_pxe.ymlis staged under$OMNIA_DATA_PATH/utils/input/$OMNIA_PROJECT_NAME/. - Ensure the OIM can reach and authenticate to every administrative IP listed
in
collect_pxe.ymlthrough SSH. - Ensure the Utils output directory is writable and has enough space for the collected logs.
- Add only the functional groups supported by the source input template.
Procedure¶
-
Initialize the Utils domain so that its inputs and dependencies are staged:
Run from: <omnia-repository>/src/main./omnia.sh -i utils -
Edit the staged inventory:
Run on: OIMvi "$OMNIA_DATA_PATH/utils/input/$OMNIA_PROJECT_NAME/collect_pxe.yml" -
Add administrative IP addresses under the applicable functional groups:
collect_pxe.ymlservice_kube_control_plane_rhel_10_0_x86_64: - 192.0.2.10 service_kube_node_rhel_10_0_x86_64: - 192.0.2.20 slurm_control_node_rhel_10_0_x86_64: - 192.0.2.30 slurm_node_rhel_10_0_x86_64: - 192.0.2.40 slurm_node_rhel_10_0_aarch64: - 192.0.2.41 login_node_rhel_10_0_x86_64: - 192.0.2.50 login_compiler_node_rhel_10_0_aarch64: - 192.0.2.60Remove the example addresses and enter only nodes in the active cluster.
-
Run the log-collection workflow through the OIM domain launcher:
Run on: OIM hostcd <OMNIA_SOURCE_PATH>/src/main ./omnia.sh --run utils --tags collectRun on: OIM hostsource /opt/omnia/activate-omnia.sh cd <OMNIA_SOURCE_PATH>/src/utils/playbooks export ANSIBLE_CONFIG=../ansible.cfg ansible-playbook utils.yml --tags collect
The workflow collects the source-defined Kubernetes or Slurm log paths for
each node type. It combines slurm_node_rhel_10_0_x86_64 and slurm_node_rhel_10_0_aarch64 into
one collection group.
Verification¶
The completion summary prints the archive path, metadata path, SHA-256 checksum, collection mode, and warning count. Inspect the generated files:
find "$OMNIA_DATA_PATH/utils/output/$OMNIA_PROJECT_NAME/collect" \
-maxdepth 2 -type f \( -name 'omnia_logs_*.tar.gz' -o -name metadata.json \)
cat "$OMNIA_DATA_PATH/utils/output/$OMNIA_PROJECT_NAME/utils_status.yml"
Each run uses this layout:
$OMNIA_DATA_PATH/utils/output/$OMNIA_PROJECT_NAME/collect/
└── omnia_logs_<timestamp>/
├── omnia_logs_<timestamp>.tar.gz
└── metadata.json
metadata.json records the archive name and checksum, generation times,
triggering user, OIM operating system, collection mode, exclusions, and any
warnings.
Next steps¶
- Provide the archive and its
metadata.jsonto the support workflow that requested the diagnostic data. - Run the collection again after correcting any unreachable-node or missing-source warnings.
-
To clean the collection workspace, run:
Run on: OIM hostcd <OMNIA_SOURCE_PATH>/src/main ./omnia.sh --run utils --tags cleanup_logsRun on: OIM hostsource /opt/omnia/activate-omnia.sh cd <OMNIA_SOURCE_PATH>/src/utils/playbooks export ANSIBLE_CONFIG=../ansible.cfg ansible-playbook utils.yml --tags cleanup_logsThe cleanup flow first deletes tar.gz archives older than seven days, then removes all
omnia_logs_*run directories regardless of age. Because each archive and its metadata are stored inside a run directory, copy any files that must be retained before running cleanup.
Troubleshooting¶
collect_pxe.ymlis missing: Run./omnia.sh -i utilsfromsrc/mainand edit the staged file in the active project input directory.- A node is marked unreachable: Verify its administrative IP and SSH access from the OIM. Collection continues for other nodes and records the failure in the archive metadata.
- A log path is missing: Review the warning in
metadata.json. Missing source files and directories do not stop collection for other sources. - No archive is created: Confirm that
$OMNIA_DATA_PATH/utils/output/$OMNIA_PROJECT_NAME/collectis writable and review/var/log/omnia/utils/utils.log.