Skip to content

refactor: make orchestrator and discovery domains fully self-contained - #4880

Merged
abhishek-sa1 merged 1 commit into
dell:issue-4849-omnia-modernizationfrom
sujit-jadhav:feature/self-contained-domains
Jul 27, 2026
Merged

refactor: make orchestrator and discovery domains fully self-contained#4880
abhishek-sa1 merged 1 commit into
dell:issue-4849-omnia-modernizationfrom
sujit-jadhav:feature/self-contained-domains

Conversation

@sujit-jadhav

@sujit-jadhav sujit-jadhav commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #4849

Summary

Make both the orchestrator and discovery domains fully self-contained, eliminating all external references to ../common/ and ../playbooks/. Both now follow the same pattern as image_build_manager.

Orchestrator Domain

New Roles

  • orchestrator_setup — absorbs upgrade_checkup, include_input_dir, create_container_group
  • orchestrator_functional_groups — absorbs generate_functional_groups utility
  • validate_orchestrator_input — absorbs validate_config.yml
  • orchestrator_credentials — absorbs full credential_utility (12 task files + 3 templates)
  • orchestrator_common — shared task library (configure_s3_access, openchami_auth, decrypt_include_encrypt, check_kube_vip_reachability)

New Sub-Playbooks

  • prepare_orchestrator.yml, validate_orchestrator.yml, orchestrator_credentials.yml
  • cleanup_orchestrator.yml, upgrade_orchestrator.yml, rollback_orchestrator.yml

Localized Assets

  • library/modules/ — 8 Python modules
  • library/module_utils/input_validation/ — full validation schemas
  • callback_plugins/omnia_default.py
  • vars/common_vars.yml, vars/encrypt_files_vars.yml

Documentation

  • ORCHESTRATOR_DESIGN.md, INPUT_CONTRACT.md, OUTPUT_CONTRACT.md

Discovery Domain

New Roles

  • discovery_setup — absorbs inline path init, pip install, config load, validation tags
  • validate_discovery_input — absorbs validate_config.yml
  • discovery_credentials — absorbs credential_utility (OME credentials only)
  • discovery_common — shared task library (decrypt_include_encrypt)

New Sub-Playbooks

  • validate_discovery.yml, discovery_credentials.yml

Localized Assets

  • library/modules/ — 8 Python modules (ome_server_inventory, generate_pxe_mapping, etc.)
  • library/module_utils/input_validation/ — full validation schemas
  • callback_plugins/omnia_default.py
  • vars/common_vars.yml, vars/encrypt_files_vars.yml

Documentation

  • DISCOVERY_DESIGN.md, INPUT_CONTRACT.md, OUTPUT_CONTRACT.md

Verification

Check Orchestrator Discovery
../common/ in ansible.cfg 0 0
../playbooks/ in entrypoint 0 0
../common/ in roles/ 0 0

Relates-to: #4849

@sujit-jadhav
sujit-jadhav force-pushed the feature/self-contained-domains branch from 55c4393 to 3991824 Compare July 22, 2026 10:57

@abhishek-sa1 abhishek-sa1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now let me look at the actual file changes:

Let me try to get the file list from the commit directly:

The diff page is too large (GitHub "Uh oh" / lazy-loading). Let me try the API to get the file list:
I now have a clear picture of the PR. Here's my analysis:


PR #4880 Review — Critical Issues

TL;DR

The PR blindly duplicates the entire input_validation framework (all schemas, all validation flows, all utility code for ALL domains) into both src/orchestrator/ and src/discovery/. This is the wrong approach — it creates a 3x maintenance burden with no value.


Issue 1: Full input_validation/ Wholesale Copy (BLOCKER)

Both orchestrator and discovery get a complete copy of the entire validation framework:

orchestrator/library/module_utils/input_validation/
├── common_utils/
│   ├── config.py              ← 241 lines — contains ALL domain configs
│   ├── data_fetch.py          ← 175 lines
│   ├── data_validation.py     ← 229 lines
│   ├── data_verification.py
│   ├── en_us_validation_msg.py
│   ├── logical_validation.py
│   ├── slurm_conf_utils.py    ← WHY does discovery need slurm utils?
│   ├── timezone.txt
│   └── validation_utils.py
└── schema/
    ├── additional_software.json
    ├── build_stream_config.json
    ├── credential_rules.json
    ├── discovery_config.json   ← WHY does orchestrator have discovery schema?
    ├── functional_groups_config.json
    ├── ...ALL other schemas

The same files are copied identically to discovery/library/module_utils/input_validation/.

What's wrong:

  • config.py (241 lines) contains configs for telemetry, security, storage, slurm, k8s, local_repo, provision — none of which are relevant to discovery
  • slurm_conf_utils.py is copied to discovery — discovery has zero slurm interaction
  • All 15+ schemas are copied to both domains — discovery only needs discovery_config.json, orchestrator only needs orchestrator_config.json + network_spec.json
  • All validation flows for ALL domains (telemetry, security, storage, etc.) are duplicated

What should be done instead:

Follow the image_build_manager pattern — only copy what the domain actually uses:

Domain Actually Needs
discovery discovery_config.json schema, validate_input.py, data_validation.py, config.py (trimmed to discovery tag only)
orchestrator orchestrator_config.json + network_spec.json schemas, validate_input.py, credential rule schema

Or better: keep validate_input.py in common/ since it's a tag-dispatched engine shared by everyone, and only copy the specific schemas each domain needs.


Issue 2: config.py Contains Cross-Domain Secrets Map

The copied config.py includes get_vault_password() which maps credential files:

vault_passwords = {
    "omnia_config_credentials.yml": ".omnia_config_credentials_key",
    "image_build_credentials.yml": ".image_build_credentials_key",
}

And input_file_inventory which maps ALL tags to ALL files:

input_file_inventory = {
    "build_image": [...],
    "scheduler": [...],
    "provision": [...],
    "orchestrator": [...],
    "security": [...],
    "telemetry": [...],
    "local_repo": [...],
    "slurm": [...],
    "service_k8s": [...],
    ...
}

Discovery doesn't need image_build_credentials.yml vault mapping or scheduler tag definitions. This is a security smell — leaking credential file names across domains.


Issue 3: Orchestrator Design Docs Are Empty

src/orchestrator/ORCHESTRATOR_DESIGN.md  — 0 additions (empty)
src/orchestrator/INPUT_CONTRACT.md       — 0 additions (empty)
src/orchestrator/OUTPUT_CONTRACT.md      — 0 additions (empty)

These are added but completely empty. Either add real content or don't add the files yet.


Issue 4: validate_input.py Module Copied to Both Domains

The central validate_input.py is a tag-dispatched validation engine — it reads input_file_inventory from config.py, iterates over the matching files for the current tag, and runs L1 schema + L2 logic validation.

Copying this to each domain means:

  • Any bugfix to validation logic requires updating 3+ copies
  • Schema additions for new domains require touching every copy
  • The validate_input.py → config.py → schema lookup chain is tightly coupled to the central framework

Better approach:

  • image_build_manager pattern: Create a domain-specific validation module (like we did with validate_image_build_config.py) that only validates the domain's own files using domain-specific schemas. No need to carry the entire central framework.

Issue 5: validate_credentials.py + fetch_credential_rule.py Copied to Discovery

Discovery copies validate_credentials.py and fetch_credential_rule.py as modules — but these depend on the full credential_rules.json schema and the central framework's credential validation flow. Discovery only needs OME username/password validation.


Issue 6: Discovery callback_plugins Docstring Still References Common Path

    callback_plugins = <relative-path-to>/common/callback_plugins

Line 28 of src/discovery/callback_plugins/omnia_default.py still references the old common path in the usage docstring. Minor but shows it was a blind copy.


Recommended Approach

Thin Domain Validation (Preferred — matches image_build_manager)

Each domain creates its own domain-specific validation module that:

  1. Only loads the schemas it needs (e.g., discovery_config.json)
  2. Has domain-specific L2 validation logic
  3. Does NOT carry the full input_validation/ framework
discovery/library/
├── modules/
│   └── validate_discovery_config.py   # Domain-specific, lean
└── module_utils/
    └── discovery_validation/
        ├── schema/
        │   └── discovery_config.json  # Only schema discovery needs
        └── discovery_validation_flow.py  # Only L2 rules discovery needs

Summary Table

Issue Severity Fix
Full input_validation/ wholesale copy (3x duplication) BLOCKER Only copy what domain needs, or create domain-specific validation
config.py has ALL domain configs (slurm, telemetry, etc.) in discovery HIGH Trim to domain-relevant config only
Empty orchestrator design docs MEDIUM Add content or remove empty files
slurm_conf_utils.py in discovery HIGH Remove — discovery has no slurm dependency
Credential vault map leaked across domains MEDIUM Trim get_vault_password() to domain-relevant entries
Callback plugin docstring still references common path LOW Update docstring

@sujit-jadhav
sujit-jadhav force-pushed the feature/self-contained-domains branch from 3991824 to 84b6e15 Compare July 22, 2026 16:51
@abhishek-sa1

abhishek-sa1 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Comprehensive PR Review Comments for #4880

Based on the detailed gap analysis comparing orchestrator and discovery domains against the image_build_manager reference pattern, here are the consolidated PR review comments:


🔴 CRITICAL Issues (Must Fix Before Merge)

1. Credential Scope Violation — Cross-Domain Credential Management

Location: src/orchestrator/roles/orchestrator_credentials/vars/main.yml

Issue: The orchestrator_credentials role manages credentials for 16 services across ALL domains, violating self-containment principles.

# Lines 17-35: Manages 3 credential files across 3 domains
credential_files:
  - credential_type: "Omnia"          # ← orchestrator's own
  - credential_type: "Build Stream"   # ❌ NOT orchestrator's responsibility
  - credential_type: "Image Build"    # ❌ belongs to image_build_manager domain!

# Lines 70-159: Credential definitions for services that don't belong
omnia_credentials:
  gitlab:              # ❌ build_stream domain
  build_stream:        # ❌ build_stream domain
  prepare_oim:         # ❌ prepare_oim domain
  local_repo:          # ❌ repo_manager domain
  image_build_manager: # ❌ image_build_manager domain (has its own collect_build_credentials)
  discovery:           # ❌ discovery domain (has its own discovery_credentials)
  build_aarch_image:   # ❌ image_build_manager domain

Impact:

  • Violates domain self-containment (each domain should own its credentials)
  • Creates credential file conflicts (two domains managing same file)
  • Circular dependency: orchestrator prompts for image_build_manager S3 creds instead of reading them
  • Discovery credentials duplicated (both domains prompt for OME creds)

Fix Required:

# orchestrator_credentials/vars/main.yml — CORRECTED
credential_files:
  - credential_type: "Omnia"
    file_path: "{{ input_project_dir }}/orchestrator/omnia_config_credentials.yml"
    vault_path: "{{ input_project_dir }}/orchestrator/.omnia_config_credentials_key"
    # Remove build_stream and image_build entries

omnia_credentials:
  provision:
    mandatory:
      - { password: provision_password }
      - { username: bmc_username, password: bmc_password }
  slurm:
    mandatory:
      - { password: slurm_db_password }
  openldap:
    mandatory:
      - { username: openldap_db_username, password: openldap_db_password }
  # ONLY orchestrator-specific services

Delete templates:

  • src/orchestrator/roles/orchestrator_credentials/templates/build_stream_credential.j2
  • src/orchestrator/roles/orchestrator_credentials/templates/image_build_credential.j2

2. Wholesale input_validation/ Framework Copy (Maintenance Burden)

Location:

Issue: Both domains copied the ENTIRE shared validation framework including:

Impact:

  • 3x maintenance burden (update in 3 places)
  • Cross-domain schema leakage
  • Bloated module_utils directories

Fix Required:

  1. Keep domain-specific validation only:

  2. Delete cross-domain schemas:

  3. Move misplaced code:


3. build_status.yml Default Path Mismatch (Runtime Failure)

Location: src/orchestrator/roles/orchestrator_setup/vars/main.yml:22

Issue: Default path points to wrong location:

default_build_status_path: "/opt/omnia/output/project_default/image_build_manager/build_status.yml"

Actual location (from image_build_manager):

/opt/omnia/output/project_default/build_status.yml  ← one level up (latest)
/opt/omnia/output/project_default/image_build_manager/build_status_<version>_<timestamp>.yml  ← versioned

Impact: configure_s3_access.yml will fail at runtime unless user explicitly sets image_build_manager_output_path.

Fix Required:

default_build_status_path: "/opt/omnia/output/project_default/build_status.yml"

🟠 HIGH Priority Issues

4. Missing roles_path in Main ansible.cfg

Location:

  • src/orchestrator/ansible.cfg:12-14
  • src/discovery/ansible.cfg:12-14

Issue: Both main ansible.cfg files are missing roles_path = roles directive.

Current:

library = library/modules
module_utils = library/module_utils
# roles_path missing!

Reference (image_build_manager):

roles_path = roles
callback_plugins = callback_plugins
library = library/modules
module_utils = library/module_utils

Impact: Ansible falls back to system default roles path. Works only because roles are in conventional roles/ subdir, but breaks if playbook invoked from different working directory.

Fix Required: Add roles_path = roles after line 11 in both files.


5. Tag Validation Missing from Both Domains

Location:

Issue: Neither domain has tag validation logic that image_build_manager implements.

Missing components:

  • No supported_tags variable
  • No skip_credential_tags variable
  • No invalid_tag_combinations variable
  • No tag validation tasks in setup roles
  • No credential skipping for cleanup/validate tags

Reference (image_build_manager):

supported_tags:
  - prepare
  - build
  - cleanup
  - validate
  - upgrade
  - rollback

skip_credential_tags:
  - cleanup
  - validate

invalid_tag_combinations:
  - [prepare, cleanup]
  - [build, cleanup]
  # ... 7 more combinations

Fix Required (orchestrator-specific tags per your request):

# orchestrator_setup/vars/main.yml
supported_tags:
  - prepare      # Deploy OpenCHAMI + S3 setup
  - provision    # Provision nodes
  - pxe          # PXE boot
  - cleanup      # Cleanup OpenCHAMI + artifacts
  - validate     # Validate config only
  - upgrade      # Upgrade flow
  - rollback     # Rollback flow

skip_credential_tags:
  - cleanup
  - validate

invalid_tag_combinations:
  - [prepare, cleanup]
  - [provision, cleanup]
  - [pxe, cleanup]
  - [prepare, upgrade]
  - [provision, upgrade]
  - [cleanup, upgrade]
  - [upgrade, rollback]

Add tag validation logic in orchestrator_setup/tasks/main.yml (Step 0) following image_build_manager pattern.


6. Dead Code — Legacy Module Copies

Location:

Issue: Both domains copied OLD shared modules AND created new domain-specific ones. Old copies are never invoked.

Fix Required: Delete all dead modules listed above.


7. Execution Order Mismatch (Orchestrator)

Location: src/orchestrator/orchestrator.yml:45-70

Issue: Design doc says validation is Step 1, but actual playbook runs functional groups FIRST (with tags: always).

Design doc order:

Step 0: Setup → Step 1: Validate → Step 2: Credentials → Step 3: Functional Groups

Actual orchestrator.yml order:

Step 0: Setup → Step 1: Functional Groups → Step 2: Validate → Step 3: Credentials

Impact: Invalid input can trigger functional group generation before validation catches it.

Fix Required: Reorder plays to match design doc (validate before functional groups).


8. Shared Credential File Conflict (Discovery vs Orchestrator)

Location: Both domains write to same file:

  • Discovery: /opt/omnia/input/<project>/omnia_config_credentials.yml
  • Orchestrator: /opt/omnia/input/<project>/omnia_config_credentials.yml

Issue: If both domains run independently, they compete over the same credential file.

Impact:

  • Discovery only needs ome_username/ome_password
  • Orchestrator template includes ALL 16 services
  • Running discovery FIRST creates credential file that orchestrator overwrites

Fix Required: After fixing credential scope (Issue #1), discovery should write to:

/opt/omnia/input/<project>/discovery/discovery_credentials.yml

🟡 MEDIUM Priority Issues

9. slurm_conf_utils.py in Wrong Location

Location: src/orchestrator/library/module_utils/orchestrator_validation/slurm_conf_utils.py (32KB)

Issue: This file is in orchestrator_validation/ but has nothing to do with validation. Used by slurm_conf.py module for Slurm configuration.

Fix Required: Move to library/module_utils/slurm/slurm_conf_utils.py or library/module_utils/slurm_config/.


10. Discovery-Specific Issues

Location: src/discovery/roles/discovery_setup/tasks/main.yml:17-23

Issue A — Air-gap violation:

- name: Install required Python packages
  ansible.builtin.pip:
    name:
      - toml
    state: present

Violates air-gapped deployment constraint. Package should be pre-installed or available via Pulp.

Issue B — Hardcoded paths (lines 33-34):

discovery_input_dir: "/opt/omnia/input/{{ discovery_project_name }}/discovery"
discovery_output_dir: "/opt/omnia/output/{{ discovery_project_name }}/discovery"

Should use vars like omnia_input_dir/omnia_output_dir from vars file.

Issue C — No upgrade guard: Discovery setup missing upgrade lock check (orchestrator and image_build_manager have it).

Fix Required:

  1. Remove pip install toml or document pre-requisite
  2. Use vars instead of hardcoded paths
  3. Add upgrade guard check

11. Design Doc Gaps

Orchestrator DESIGN.md missing sections (vs. image_build_manager reference):

Missing Section Status
§5 Input Validation Design (HLD) ❌ MISSING entirely (7 subsections in reference)
§6 Credential Management Design (HLD) ⚠️ §7 exists but shallow (3 subsections vs. 6 in reference)
§10 Naming Convention ❌ MISSING (full table in reference)

Discovery DESIGN.md missing sections:

Missing Section Status
Validation Design (HLD) ❌ MISSING
Credential Design (HLD) ❌ MISSING
Tag Support ❌ MISSING
Naming Convention ❌ MISSING
Self-Containment Verification ❌ MISSING (grep commands in reference)
Backward Compatibility ❌ MISSING
Cleanup Playbook ❌ No cleanup playbook exists

Fix Required: Expand design docs to match image_build_manager depth.


🔵 LOW Priority Issues (Post-Merge OK)

12. Missing samples/ Directory

Both domains lack samples/ directory with example configs (image_build_manager has samples/build_status.yml).

13. Verb-First Role Naming Convention

Roles use noun-first naming (orchestrator_credentials, discovery_credentials) instead of verb-first (collect_orchestrator_credentials, collect_discovery_credentials).

14. Legacy CONTRACTS.md in Discovery

Discovery has both CONTRACTS.md (3147 bytes) AND INPUT_CONTRACT.md + OUTPUT_CONTRACT.md — redundant.

Fix: Delete src/discovery/CONTRACTS.md.


Summary: Blocking Issues for Merge

# Issue Severity Blocks Merge?
1 Credential scope violation CRITICAL ✅ YES
2 Wholesale validation framework copy BLOCKER ✅ YES
3 build_status.yml path mismatch HIGH ✅ YES
4 Missing roles_path HIGH ⚠️ RECOMMEND
5 Missing tag validation HIGH ⚠️ RECOMMEND
6 Dead code cleanup HIGH ⚠️ RECOMMEND
7 Execution order mismatch HIGH ⚠️ RECOMMEND
8 Credential file conflict HIGH ✅ YES (after #1 fixed)

Recommendation: Fix issues #1, #2, #3, #8 before merge. Issues #4-#7 strongly recommended. Issues #9-#14 can be follow-up PRs.

@sujit-jadhav
sujit-jadhav force-pushed the feature/self-contained-domains branch from 84b6e15 to df756b5 Compare July 23, 2026 06:14
@abhishek-sa1

abhishek-sa1 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Let me review the current state of the orchestrator and discovery domains in the local repo to see what's changed since the previous review.

Comprehensive PR Review Comments for #4880 — Updated Review

What's Been Fixed Since Last Review

Prev # Issue Status
1 Credential scope — cross-domain management Partially fixed (see new issue below)
2 Wholesale validation framework copy FIXED — domain-specific schemas only
3 build_status.yml default path FIXED in setup vars (but see inconsistency below)
4 Missing roles_path in ansible.cfg FIXED — both domains
5 Tag validation missing FIXED — both domains have tag validation
6 Dead code — validate_input.py FIXED — deleted (and fetch_credential_rule.py/validate_credentials.py are actually used by prompt tasks — previous review was wrong)
7 Execution order mismatch FIXED — validates before functional groups
8 Credential file conflict FIXED — discovery uses discovery_credentials.yml
9 slurm_conf_utils.py in wrong location FIXED — moved to module_utils/slurm/
10A Discovery pip install (air-gap) FIXED — removed
10C Discovery missing upgrade guard FIXED — added
11 Design doc gaps FIXED — comprehensive design docs for both domains
14 Legacy CONTRACTS.md in discovery FIXED — deleted

Significant improvement. The PR addressed most of the critical items. However, the credential scope fix introduced a new critical regression.


🔴 CRITICAL Issues (Must Fix Before Merge)

1. credential_status.yml References credential_files[1] and credential_files[2] — RUNTIME CRASH

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\roles\orchestrator_credentials\tasks\credential_status.yml:19-21

Issue: credential_files now has only 1 entry (index 0 — "Omnia"), but credential_status.yml still references credential_files[1] (Build Stream) and credential_files[2] (Image Build) in 14 places:

# Line 20-21 — will cause index out of range
bs_cred_file_status: "{{ credential_files[1].file_path is file }}"    # ❌ INDEX ERROR
ib_cred_file_status: "{{ credential_files[2].file_path is file }}"    # ❌ INDEX ERROR

# Lines 37-38, 47, 56, 77-78, 94, 101, 110 — same error in username/password logic
field.file != credential_files[1].file_path    #
field.file == credential_files[2].file_path    #

Impact: Every credential prompt run will crash with an Ansible index out of range error. This makes the orchestrator completely non-functional.

Root Cause: Credential scope was fixed in vars/main.yml (reduced to 1 entry) but credential_status.yml still has the old 3-file logic.

Fix Required: Rewrite credential_status.yml to remove all credential_files[1] and credential_files[2] references. Simplify to single-file logic:

- name: Check credential file status
  ansible.builtin.set_fact:
    omnia_cred_file_status: "{{ credential_files[0].file_path is file }}"
    skipped_optional_credentials: "{{ skipped_optional_credentials | default([]) }}"

2. update_credentials_main.yml References credential_files[2] — RUNTIME CRASH

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\roles\orchestrator_credentials\tasks\update_credentials_main.yml:22-28

# Lines 22-28 — credential_files[2] doesn't exist anymore
- name: Pre-load image build credentials into namespaced variable
  when:
    - credential_files[2].file_path is file    # ❌ INDEX ERROR
  block:
    - name: Set variables for image build credential task
      ansible.builtin.set_fact:
        cred_file_path: "{{ credential_files[2].file_path }}"    #
        cred_vault_path: "{{ credential_files[2].vault_path }}"  #

Impact: Same as above — runtime crash. The entire block (lines 20-53) for "Pre-load image build credentials" should be deleted since orchestrator no longer manages image_build credentials.


🟠 HIGH Priority Issues

3. omnia_credential.j2 Template Contains Non-Orchestrator Credentials

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\roles\orchestrator_credentials\templates\omnia_credential.j2:21-50

# Lines 21-24 — belongs to prepare_oim domain
pulp_password: ""
docker_username: ""
docker_password: ""

# Lines 45-46 — belongs to build_stream domain
gitlab_root_password: ""

# Lines 48-50 — belongs to discovery domain (has its own discovery_credentials.yml)
ome_username: ""
ome_password: ""

Impact: Creates credential file with fields that no orchestrator service uses. Confusing for operators who see prompts for credentials irrelevant to the orchestrator. Also, ome_username/ome_password in the orchestrator template conflicts with discovery's own credential management.

Fix Required: Remove all non-orchestrator fields. Template should only contain:

# iDrac Telemetry credentials
mysqldb_user: ""
mysqldb_password: ""
mysqldb_root_password: ""

# csi powerscale credentials
csi_username: ""
csi_password: ""

# LDMS sampler
ldms_sampler_password: ""

# UFM telemetry credentials
ufm_username: ""
ufm_password: ""

# VAST telemetry credentials
vast_username: ""
vast_password: ""

4. fetch_credentials.yml Still Lists Cross-Domain Services

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\roles\orchestrator_credentials\tasks\fetch_credentials.yml:30-34

    - >-
      service.key in (software_names | default([])) or
      service.key in ["provision", "prepare_oim", "local_repo", "idrac_telemetry",
      "visualization", "build_aarch_image", "image_build_manager", "gitlab", "build_stream",
      "csi_driver_powerscale", "discovery", "ufm_telemetry", "vast_telemetry"]

Issue: Still includes prepare_oim, local_repo, build_aarch_image, image_build_manager, gitlab, build_stream, discovery — services that don't exist in omnia_credentials anymore. While these won't match (no dict entries), it's misleading and creates maintenance confusion.

Fix Required: Remove non-orchestrator services from the list:

      service.key in ["provision", "idrac_telemetry",
      "csi_driver_powerscale", "ufm_telemetry", "vast_telemetry"]

5. configure_s3_access.yml Default Path Inconsistent with Setup Vars

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\roles\orchestrator_common\tasks\configure_s3_access.yml:34

_build_status_path: "{{ _orch_config.image_build_manager_output_path | default('/opt/omnia/output/project_default/image_build_manager/build_status.yml') }}"

But @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\roles\orchestrator_setup\vars\main.yml:22:

default_build_status_path: "/opt/omnia/output/project_default/build_status.yml"

Impact: Setup vars correctly points to /opt/omnia/output/project_default/build_status.yml but configure_s3_access.yml has a hardcoded fallback to the old wrong path (with /image_build_manager/ subdir). If _orch_config fails to load, the fallback is wrong.

Fix Required: Use the fact set by orchestrator_setup:

_build_status_path: "{{ _orch_config.image_build_manager_output_path | default(hostvars['localhost']['image_build_manager_output_path']) }}"

6. skip_credential_tags Defined But Never Used

Location: Both orchestrator_setup/vars/main.yml:34-36 and discovery_setup/vars/main.yml:35-37

Issue: skip_credential_tags is defined but no task checks it. In orchestrator.yml, credential skipping relies on config_file_status:

- role: orchestrator_credentials
  when: not config_file_status | default(false) | bool

There's no logic that says "if running with --tags cleanup or --tags validate, skip credentials." The config_file_status variable is not set by tag validation.

Impact: Running ansible-playbook orchestrator.yml --tags cleanup will still prompt for credentials (unless config_file_status happens to be true).

Fix Required: Add credential-skipping logic wired to skip_credential_tags, either:

  • In orchestrator.yml: add when: omnia_run_tags | intersect(skip_credential_tags) | length == 0
  • Or set config_file_status: true when skip tags are detected

🟡 MEDIUM Priority Issues

7. Orchestrator Has Both CONTRACTS.md AND INPUT_CONTRACT.md + OUTPUT_CONTRACT.md

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\CONTRACTS.md (4736 bytes) alongside INPUT_CONTRACT.md (8222 bytes) and OUTPUT_CONTRACT.md (4347 bytes)

Issue: Redundant documentation. Discovery fixed this by deleting CONTRACTS.md, but orchestrator still has all three.

Fix: Delete src/orchestrator/CONTRACTS.md.


8. Orchestrator Design Doc Lists fetch_credential_rule.py and validate_credentials.py as Copied from Common

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\ORCHESTRATOR_DESIGN.md:35-36

Design doc §2 Directory Structure lists these modules but §5.1 What Was Copied Locally table doesn't call them out explicitly. The design doc should clarify that these are used by the credential prompting flow (prompt_password.yml, prompt_username.yml) for input validation against credential_rules.json.


9. build_stream_prerequisite.yml in Orchestrator Validations

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\roles\orchestrator_validations\tasks\build_stream_prerequisite.yml

Issue: Contains build_stream-specific validation logic (build_stream_job_id, image_key, enable_build_stream). If orchestrator is truly self-contained and doesn't own build_stream, this file should be moved to the build_stream domain or removed.

Counter-argument: Orchestrator may legitimately need to validate build_stream inputs when it receives images from build_stream. If so, this is fine but should be documented in the design doc.


10. orchestrator.yml Step 0 Has Typo

Location: @c:\Users\Abhishek_Sa1\OneDrive - Dell Technologies\Github\omnia-sujit\src\orchestrator\orchestrator.yml:42

openchami_vars_suppport: true    # ← double 'p' in 'suppport'

Fix: openchami_vars_support: true

Note: This must also be fixed everywhere it's referenced (both the var name in setup tasks and the condition check).


🔵 LOW Priority Issues (Post-Merge OK)

11. Missing samples/ Directory

Both domains still lack a samples/ directory with example configs (image_build_manager reference has samples/build_status.yml).

12. common_vars.yml Identical in Both Domains

Both domains have byte-identical common_vars.yml (891 bytes). Expected for self-containment, but if values drift independently, bugs will differ between domains.

13. Verb-First Role Naming Convention

Roles still use noun-first naming (orchestrator_credentials vs collect_orchestrator_credentials). Cosmetic — consistent within the PR.


Summary: Updated Blocking Issues

# Issue Severity Fixed from Prev? Blocks Merge?
1 credential_status.yml index crash CRITICAL 🆕 NEW regression ✅ YES
2 update_credentials_main.yml index crash CRITICAL 🆕 NEW regression ✅ YES
3 Template has non-orchestrator creds HIGH ⚠️ Partial fix ✅ YES
4 fetch_credentials.yml cross-domain list HIGH ⚠️ Partial fix ⚠️ RECOMMEND
5 S3 path default inconsistency HIGH ⚠️ Partial fix ⚠️ RECOMMEND
6 skip_credential_tags not wired HIGH 🆕 NEW ⚠️ RECOMMEND
7 Redundant CONTRACTS.md MEDIUM No
8-10 Design doc, build_stream, typo MEDIUM No

Bottom line: Issues #1 and #2 are regression bugs introduced by the credential scope fix. The vars/main.yml was correctly scoped to 1 credential file, but the task files that consume credential_files[] were not updated. These will cause immediate runtime crashes. Fix #1, #2, and #3 before merge. #4-#6 are strongly recommended.

@sujit-jadhav
sujit-jadhav force-pushed the feature/self-contained-domains branch 2 times, most recently from 6f87ee5 to 557fcb8 Compare July 24, 2026 06:14
- Orchestrator domain:
  - Create roles: orchestrator_setup, orchestrator_functional_groups,
    validate_orchestrator_input, orchestrator_credentials, orchestrator_common
  - Localize library/modules (8 Python modules), module_utils, callback_plugins
  - Create sub-playbooks: prepare, validate, credentials, cleanup, upgrade, rollback
  - Update orchestrator.yml to use local roles (zero ../playbooks/ imports)
  - Update ansible.cfg to use local paths (zero ../common/ references)
  - git mv tasks/ files into orchestrator_common role, remove clone_dependencies
  - Add ORCHESTRATOR_DESIGN.md, INPUT_CONTRACT.md, OUTPUT_CONTRACT.md

- Discovery domain:
  - Create roles: discovery_setup, validate_discovery_input,
    discovery_credentials, discovery_common
  - Localize library/modules (8 Python modules), module_utils, callback_plugins
  - Create sub-playbooks: validate, credentials
  - Update discovery.yml to use local roles (zero ../playbooks/ imports)
  - Update ansible.cfg to use local paths (zero ../common/ references)
  - Add DISCOVERY_DESIGN.md, INPUT_CONTRACT.md, OUTPUT_CONTRACT.md

Both domains now follow the same self-containment pattern as
image_build_manager: zero external ../common/ or ../playbooks/ references.

Relates-to: dell#4849
Signed-off-by: Sujit Jadhav <sujit.jadhav@dell.com>
@sujit-jadhav
sujit-jadhav force-pushed the feature/self-contained-domains branch from 557fcb8 to 2512027 Compare July 24, 2026 08:33
@abhishek-sa1
abhishek-sa1 merged commit 130182d into dell:issue-4849-omnia-modernization Jul 27, 2026
1 check passed
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