Skip to content

Add OME location-based XNAME mapping and orchestrator hint support - #5957

Draft
SujalS27 wants to merge 9 commits into
dell:mainfrom
SujalS27:main
Draft

SujalS27 wants to merge 9 commits into
dell:mainfrom
SujalS27:main

Conversation

@SujalS27

Copy link
Copy Markdown
Collaborator

PR Title

Description of the Solution

Related Issue

  • Fixes #

Changes

Component (path/to/files)

  • Change description

Files Changed

File Change Type Description
path/to/file Added / Modified / Deleted Brief description

Testing

  • Test or verification result

Backward Compatibility

  • Compatibility notes

Security Review

  • Input Validation: External input (CSV, YAML, CLI, API) validated with strict allowlists?
  • Secret Management: No hardcoded secrets, Vault/tmpfs decrypt, credential files mode 0600? (SEC-01, SEC-08)
  • Path Security: File paths validated, symlinks rejected, containment enforced? (SEC-15)
  • Command Injection: No shell string interpolation, argv or | quote used? (SEC-04, SEC-05, SEC-09)
  • Template Injection: No include_vars on operator-edited files, no unsafe Jinja lookups? (SEC-06)
  • Network / TLS: TLS verification and SSH host-key checking enabled, no 0.0.0.0 without docs? (SEC-02, SEC-03, SEC-20)
  • Container / K8s: SecurityContext set, no privileged/hostNetwork, images pinned by digest? (SEC-17, SEC-19)
  • Logging: Secrets masked, no_log on credential tasks, exceptions logged not swallowed? (SEC-10, SEC-11, SEC-12)
  • Crypto / Tokens: Approved algorithms, secrets for randomness, token TTL set? (SEC-21)
  • Dependencies: Python packages pinned to exact versions? (SEC-18)
  • Permissions / Temp files: No world-writable modes, secure temp files? (SEC-13, SEC-14)
  • Testing: Security tests and negative/edge cases included?

Security Notes:

Suggested Reviewers

Reviewer Review Focus
@reviewer-or-team Component, domain, security, test, or compatibility focus

SujalS27 and others added 9 commits November 18, 2026 23:38
Signed-off-by: SujalS27 <Sujal.Sooryavamshi@dell.com>
Signed-off-by: SujalS27 <Sujal.Sooryavamshi@dell.com>
… packages

- Upgrade cryptography from 45.0.7 to 50.0.2 in all sample catalogs,
  telemetry_packages.yml, and master_reference_file.md to align with
  the version already used in requirements.txt files.
- Remove aarch64 architecture entries from Kubernetes-only packages in
  combined catalogs (slurm_service_k8s_* and catalog_rhel.json).
  Only truly K8s-specific packages affected: kubeadm, kubelet, kubectl,
  cri-o, calico, metallb, helm, cert-manager, strimzi-operator,
  victoria-metrics-operator, nfs-subdir-external-provisioner,
  csi-powerscale, karavi-observability.
- General-purpose packages (git, podman, python3, gcc-c++, papi,
  PyMySQL, container-selinux, fuse-overlayfs, etc.) retain their
  aarch64 entries unchanged.
- Slurm-only catalogs are unchanged except for the cryptography bump.

Closes dell#1657

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Signed-off-by: SujalS27 <sujal.sooryavamshi@dell.com>
Discovery domain:
- Extend ome_server_inventory.py to fetch physical location data (aisle/rack/rackslot)
  from OME using group-level bulk API with per-device fallback
- Add generate_xname_mapping.py module with strict all-or-nothing location check
  and location-based XNAME formula (x1000c{rack}s{aisle}b{rackslot}n0)
- Add generate_xname_mapping.yml task file to invoke the module
- Update ome_discovery main.yml to include xname mapping generation
- Add xname mapping messages to vars/main.yml

Orchestrator domain:
- Extend SMDIdentityResolver to accept optional xname_hints parameter
- Use hint if available and free in SMD, otherwise fall back to sequential
- Update openchami_reconcile.py to accept and pass xname_hints
- Update reconciler.py to pass through xname_hints
- Update register_nodes.yml to load xname_mapping_file.csv if exists,
  build SERVICE_TAG->XNAME hints dict, and pass to reconcile

The xname mapping file is separate from PXE mapping and only generated
when all devices have valid OME location data. Orchestrator consumes
it as hints for first-time XNAME allocation, with SMD as authority.

Signed-off-by: SujalS27 <sujal.sooryavamshi@dell.com>
@github-actions

Copy link
Copy Markdown

Secure Code Review

Advisory only: this check never blocks the PR. It scans the lines added by this PR against secure-coding rules derived from recent security fixes in this repository.

Result: 16 passed, 1 failed (9 file(s) scanned)

Checklist

  • PASS SEC-01 No hardcoded credentials
  • PASS SEC-04 No shell / command injection sinks
  • PASS SEC-05 Ansible shell/command variables are quoted
  • PASS SEC-06 No unsafe Jinja lookups
  • PASS SEC-07 YAML parsed safely
  • PASS SEC-11 Secrets not written to logs or errors
  • PASS SEC-12 Swallowed exceptions are logged
  • PASS SEC-13 Safe permissions on files and directories
  • PASS SEC-14 Secure temporary files
  • PASS SEC-15 Path inputs validated against traversal
  • PASS SEC-16 Input validated before shell/SSH/config use
  • PASS SEC-17 Container base images pinned by digest
  • PASS SEC-18 Python dependencies pinned to exact versions
  • PASS SEC-19 Kubernetes / pod hardening
  • PASS SEC-20 Firewall / network exposure not widened
  • PASS SEC-21 Strong crypto and token handling
  • FAIL SEC-22 CSV/injection-safe output - 1 finding(s)

Failed checks - details

SEC-22 CSV/injection-safe output - 1 finding(s)

Guideline: Neutralise leading =,+,-,@ in values written to CSV/spreadsheets; do not echo user input into logs without sanitising newlines.

  • src/discovery/plugins/modules/generate_xname_mapping.py:294 writer = csv.DictWriter(csvfile, fieldnames=headers)

Manual review focus (based on changed files)

  • Python: input validation, safe_load, subprocess argv, logging of secrets/exceptions
  • Ansible: no_log on credential tasks, quoted shell vars, no failed_when: false on critical tasks, vault tmpfs pattern

Findings are heuristic; reviewers should confirm each one. Suppress a justified finding with a # nosec comment and a short reason.

@github-actions

Copy link
Copy Markdown

Compliance Gate

Result: 2 passed, 0 not passed (2 domain scope(s) checked; unchanged domains are skipped)

Not checked (no changes in that domain): pipeline/pipeline, src/build_stream, src/image_build_manager, src/main, src/repo_manager, src/telemetry, src/utils, svt/svt, test/build_stream, test/discovery, test/image_build_manager, test/main, test/orchestrator, test/repo_manager, test/telemetry, test/utils

src/discovery: PASSED

  • PASSED score 100.0, baseline 100.0
  • WAIVED false positive: Domain Integration / samples/ directory exists: Missing samples/ directory (optional)
  • ADVISORY: Code Style Compliance (advisory) / no_log: true on credential tasks: 0/4 credential references have no_log: true nearby
  • ADVISORY: Code Style Compliance (advisory) / Type annotations on public functions: 21/34 public functions have return type annotations; - plugins/modules/ome_server_inventory.py:extract_server_info; - plugins/modules/ome_server_inventory.p
  • Open findings: 0

src/orchestrator: PASSED

  • PASSED score 94.4, baseline 94.4
  • KNOWN DEBT: Role Metadata / README.md in every role: 28/29 roles have README.md
  • KNOWN DEBT: Role Metadata / ib_ipv6_config: Missing: README.md
  • KNOWN DEBT: Input Validation Structure / Inline error messages deduction: 2 inline error strings found in validators (-2)
  • WAIVED false positive: Domain Integration / Precheck verifies upstream contracts: Upstream domains referenced but not verified by a precheck stat/readiness check: repo_manager
  • WAIVED false positive: ansible.cfg Compliance / No hardcoded /opt/omnia in runtime code: Found /opt/omnia hardcoding in 5 runtime files (must use OMNIA_DATA_PATH env var):; - input/storage_config.yml (1 runtime occurrence(s), 0 acceptable fallback
  • KNOWN DEBT: Domain Independence / No executable cross-domain source coupling: 2 direct references to other domain source dirs; - playbooks/ansible.cfg: roles_path = ../roles:../../build_stream/roles:~/.ansible/roles:/usr/share/ansible/r
  • ADVISORY: Code Style Compliance (advisory) / no_log: true on credential tasks: 6/8 credential references have no_log: true nearby
  • ADVISORY: Code Style Compliance (advisory) / Copyright header in .py files: 42/43 .py files have copyright header
  • ADVISORY: Code Style Compliance (advisory) / Type annotations on public functions: 214/251 public functions have return type annotations; - plugins/modules/fetch_credential_rule.py:load_rules; - plugins/modules/fetch_credential_rule.py:fet
  • ADVISORY: Code Style Compliance (advisory) / Shell scripts use strict mode: 3/4 .sh files use set -euo pipefail
  • Open findings: 0

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants