Skip to content

feat(dual-stack): add IPv6 hostname-based networking across main, repo_manager, and image_build_manager - #5954

Open
Rohith-Ravut wants to merge 5 commits into
dell:feature/ipv6-pocfrom
Rohith-Ravut:ipv6
Open

Rohith-Ravut wants to merge 5 commits into
dell:feature/ipv6-pocfrom
Rohith-Ravut:ipv6

Conversation

@Rohith-Ravut

@Rohith-Ravut Rohith-Ravut commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Description of the Solution

Enables dual-stack (IPv4 + IPv6) connectivity across three Omnia domains using hostname-based service URLs and socat IPv6 proxies. All changes are backward compatible -- IPv6 is activated only by setting SYSTEM_ADMIN_NIC_IPV6 in omnia.env.

Design

Principle Detail
Hostname over IP All client-facing service URLs use SYSTEM_OIM_HOSTNAME (e.g. omniacp.omnia.test). DNS resolves to both A (IPv4) and AAAA (IPv6) records.
IP-based bind addresses Podman PublishPort binds to SYSTEM_ADMIN_NIC_IPV4. Podman/netavark only generates IPv4 DNAT rules -- IPv6 PublishPort accepts connections at the socket but never forwards them into containers.
socat IPv6 proxy A lightweight systemd service listens on the IPv6 address and opens a TCP4 connection to the IPv4 Podman port. Applied to Pulp (:2225) and MinIO (:9000).
Backward compatible Without SYSTEM_ADMIN_NIC_IPV6, behavior is identical to the original IPv4-only code. Zero breaking changes.
Single source of truth Hostname and IPv6 are set once in omnia.env. Downstream domains inherit them.

Related Issue

Changes

Domain 1: Main (6 files, 76 insertions, 11 deletions)

File Change
src/main/omnia.env Added SYSTEM_ADMIN_NIC_IPV6 optional variable
src/main/omnia.sh Derives SYSTEM_OIM_HOSTNAME from ${SYSTEM_HOSTNAME}.${SYSTEM_DOMAIN_NAME}. Validates IPv6 is on a local interface. Exports both new variables.
src/main/omnia-cli Same load/export treatment plus updated help text
src/main/docs/omnia-env.md Documented new variables
src/main/docs/omnia-setup.md Updated setup instructions
src/main/README.md Updated

Domain 2: Repo Manager (14 modified + 1 new file, 173 insertions, 31 deletions)

File Change
input/repo_manager_endpoint_config.yml Added pulp_server_hostname and pulp_server_ipv6 fields
roles/pulp_validation/tasks/read_endpoint_config.yml Env-var fallback: hostname from SYSTEM_OIM_HOSTNAME, IPv6 from SYSTEM_ADMIN_NIC_IPV6. Derives pulp_endpoint_authority.
roles/pulp_validation/vars/main.yml URLs and error messages use pulp_endpoint_authority
roles/deploy_pulp/vars/main.yml URLs, TLS cert SANs (hostname + IPv6), IPv6 publish port variable
roles/deploy_pulp/tasks/prepare_tls.yml Hostname cert check via openssl x509 -checkhost. CN prefers hostname. Auto-regenerates cert if hostname SAN missing.
roles/deploy_pulp/tasks/deploy_container_https.yml socat IPv6 proxy deploy/remove tasks using handler pattern
roles/deploy_pulp/templates/pulp_ipv6_proxy.service.j2 NEW -- socat IPv6 proxy systemd unit template
roles/parse_and_download/tasks/*.yml (2 files) Use pulp_endpoint_authority
playbooks/repo_operations/*.yml (3 files) Use pulp_endpoint_authority, pass hostname
playbooks/deploy/deploy_pulp.yml Use pulp_endpoint_authority
plugins/modules/generate_local_repo_access.py Added pulp_server_hostname parameter

Domain 3: Image Build Manager (19 modified + 1 new file)

File Change
roles/image_build_setup/tasks/load_config.yml Loads SYSTEM_ADMIN_NIC_IPV6 and derives oim_hostname from SYSTEM_OIM_HOSTNAME
roles/deploy_minio/vars/main.yml Added admin_nic_ipv6, oim_hostname, cluster_boot_hostname, s3cmd_config variables
roles/deploy_minio/templates/minio/minio.service.j2 Binds to admin_nic_ip only (was all interfaces)
roles/deploy_minio/templates/s3/s3cfg.j2 host_base uses oim_hostname
roles/deploy_minio/tasks/main.yml socat IPv6 proxy deploy/remove for MinIO
roles/deploy_minio/tasks/policy_update.yml Uses cluster_boot_hostname
roles/deploy_minio/templates/minio/minio_ipv6_proxy.service.j2 NEW -- MinIO socat IPv6 proxy systemd unit
roles/build_os_images/vars/main.yml Added registry_host using oim_hostname
roles/build_os_images/tasks/configure_registry.yml Uses oim_hostname for registry
roles/build_os_images/tasks/build_image_common_x86_64.yml S3 endpoint uses oim_hostname
roles/build_os_images/tasks/build_image_common_aarch64.yml S3 endpoint uses oim_hostname
roles/build_os_images/templates/build_status.yml.j2 Output uses oim_hostname
roles/deploy_registry/tasks/main.yml Registry host uses oim_hostname
roles/prepare_aarch64_node/tasks/*.yml (2 files) Registry and S3 use oim_hostname
roles/cleanup_build_artifacts/tasks/cleanup_minio.yml IPv6 proxy cleanup
roles/cleanup_build_artifacts/tasks/cleanup_images.yml Registry cleanup uses hostname
roles/cleanup_build_artifacts/vars/main.yml Added oim_hostname, admin_nic_ipv6
plugins/modules/validate_system_environment.py IPv6 address validation
Docs (3 files) Updated architecture, output contract, README

Testing

Test Result
Pulp IPv4 (curl -4 https://omniacp.omnia.test:2225) HTTP 200
Pulp IPv6 (curl -6 https://omniacp.omnia.test:2225) HTTP 200
MinIO IPv4 (curl -4 http://omniacp.omnia.test:9000) HTTP 200
MinIO IPv6 (curl -6 http://omniacp.omnia.test:9000) HTTP 200
Registry (curl http://omniacp.omnia.test:5000/v2/) HTTP 200
TLS cert SANs IP:10.41.12.150, DNS:omniacp.omnia.test, IP:fd00::150, DNS:pulp, DNS:localhost
Image builds (5 x86_64 groups) All passed, 15 objects in S3
Socket bindings (ss -tlnp) conmon on IPv4, socat on IPv6 for both :2225 and :9000
socat proxy services pulp-ipv6-proxy.service and minio-ipv6-proxy.service active (running)
IPv4-only backward compat Without SYSTEM_ADMIN_NIC_IPV6, behavior identical to original
ansible-lint Passed (0 failures from this PR)
YAML validation All modified files pass yaml.safe_load

Backward Compatibility

  • Zero breaking changes. All changes are opt-in via SYSTEM_ADMIN_NIC_IPV6.
  • An existing IPv4-only deployment continues to work without any configuration updates.
  • socat proxy services are only deployed when IPv6 is configured; they are automatically removed if IPv6 is later disabled.
  • TLS certificates are only regenerated if the hostname SAN is missing.

Summary

Metric Value
Domains modified 3 (main, repo_manager, image_build_manager)
Files changed 46
Insertions 467
Deletions 77
New templates 2 (pulp_ipv6_proxy.service.j2, minio_ipv6_proxy.service.j2)
Breaking changes 0

Rohith-Ravut and others added 3 commits November 27, 2026 14:58
…rification failures (dell#5952)

* fix(image_build_manager): add missing PowerScale validation message variables

The powerscale_check.yml task references powerscale_validation_fail_msg
and powerscale_unreachable_msg in fail_msg directives, but neither
variable was defined in validate_build_runtime/vars/main.yml.

Ansible evaluates fail_msg expressions during task arg finalization
before checking the 'when' condition. When provider is set to
'powerscale', the assert task fails with:
  "Error while resolving value for 'fail_msg':
   'powerscale_validation_fail_msg' is undefined"

This commit adds both missing variable definitions so the validation
task can execute properly and provide meaningful error messages.

Signed-off-by: Rohith Ravut <rohith.ravut@dellteam.com>

* fix(image_build_manager): create .s3cfg for PowerScale and fix cleanup

When s3_configurations.provider is 'powerscale', the deploy_minio role
skips the entire MinIO deployment block including s3_bucket.yml which
installs s3cmd and renders /root/.s3cfg. The build_os_images role uses
s3cmd to verify uploads regardless of provider, so without .s3cfg the
verification silently returns 0 matches and fails.

Changes:
- Add EPEL GPG key import, EPEL release install, s3cmd install, and
  .s3cfg rendering for the PowerScale provider path in deploy_minio
- Remove the PowerScale provider guard from cleanup_s3cmd.yml so
  .s3cfg is cleaned up for both providers
- Add s3cmd_config variable to deploy_minio/vars/main.yml

Signed-off-by: Rohith Ravut <rohith.ravut@dellteam.com>

---------

Signed-off-by: Rohith Ravut <rohith.ravut@dellteam.com>
Co-authored-by: Abhishek S A <abhishek.sa3@dell.com>
…o_manager, and image_build_manager

Enable dual-stack (IPv4 + IPv6) connectivity using hostname-based
service URLs across three domains:

Main domain:
- Add SYSTEM_ADMIN_NIC_IPV6 optional env var in omnia.env
- Derive SYSTEM_OIM_HOSTNAME (FQDN) in omnia.sh and omnia-cli
- Validate IPv6 address is on a local interface
- Update profile drop-in and activate-omnia.sh templates

Repo Manager domain:
- Switch all Pulp URLs from raw IP to pulp_endpoint_authority (hostname)
- Add env-var fallback for hostname and IPv6 from omnia.env
- Dynamic TLS certificate SANs (hostname + IPv6 when configured)
- socat IPv6 proxy for Pulp (pulp_ipv6_proxy.service.j2)
- Update Python module generate_local_repo_access.py

Image Build Manager domain:
- Switch all S3/MinIO endpoints from admin_nic_ip to oim_hostname
- Switch registry endpoints to oim_hostname
- Bind MinIO to admin NIC only (not all interfaces)
- socat IPv6 proxy for MinIO (minio_ipv6_proxy.service.j2)
- Add IPv6 validation in validate_system_environment.py
- Update cleanup to handle IPv6 proxy teardown

Design:
- Hostname over IP for all client-facing URLs
- Podman binds to IPv4; socat proxies bridge IPv6 to IPv4
- Fully backward compatible (opt-in via SYSTEM_ADMIN_NIC_IPV6)
- Single source of truth in omnia.env

Signed-off-by: Rohith Ravut <rohith.ravut@dellteam.com>
# Conflicts:
#	src/image_build_manager/roles/deploy_minio/tasks/main.yml
#	src/image_build_manager/roles/validate_build_runtime/vars/main.yml
@github-actions

Copy link
Copy Markdown

Compliance Gate

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

Not checked (no changes in that domain): pipeline/pipeline, src/build_stream, src/discovery, src/orchestrator, 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/image_build_manager: PASSED

  • PASSED score 100.0, baseline 100.0
  • ADVISORY: Code Style Compliance (advisory) / Type annotations on public functions: 17/75 public functions have return type annotations; - plugins/modules/functional_group_parser.py:normalize_functional_groups; - plugins/modules/parse_repo_
  • Open findings: 0

src/main: PASSED

  • PASSED score 100.0, baseline 100.0
  • No findings
  • Open findings: 0

src/repo_manager: PASSED

  • PASSED score 100.0, baseline 100.0
  • WAIVED false positive: ansible.cfg Compliance / No hardcoded /opt/omnia in runtime code: Found /opt/omnia hardcoding in 1 runtime files (must use OMNIA_DATA_PATH env var):; - plugins/module_utils/repo_manager/path_resolver.py (1 runtime occurrence
  • ADVISORY: Code Style Compliance (advisory) / no_log: true on credential tasks: 25/27 credential references have no_log: true nearby
  • ADVISORY: Code Style Compliance (advisory) / Type annotations on public functions: 79/400 public functions have return type annotations; - plugins/modules/cert_vault_handler.py:extract_repos_with_certs; - plugins/modules/cert_vault_handler
  • Open findings: 0

@github-actions

github-actions Bot commented Nov 27, 2026 •

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 (43 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
  • FAIL SEC-06 No unsafe Jinja lookups - 5 finding(s)
  • 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
  • PASS SEC-22 CSV/injection-safe output

Failed checks - details

SEC-06 No unsafe Jinja lookups - 5 finding(s)

Guideline: Avoid lookup('pipe'|'env'), eval-style filters and template of untrusted input; load user YAML as literal data (no Jinja evaluation).

  • src/image_build_manager/roles/image_build_setup/tasks/load_config.yml:35 admin_nic_ipv6: "{{ lookup('env', 'SYSTEM_ADMIN_NIC_IPV6') \| default('', true) }}"
  • src/image_build_manager/roles/image_build_setup/tasks/load_config.yml:39 {{ lookup('env', 'SYSTEM_OIM_HOSTNAME') \| default('', true)
  • src/image_build_manager/roles/image_build_setup/tasks/load_config.yml:40 if (lookup('env', 'SYSTEM_OIM_HOSTNAME') \| default('', true)) \| length > 0
  • src/image_build_manager/roles/image_build_setup/tasks/load_config.yml:41 else (lookup('env', 'SYSTEM_HOSTNAME') \| default('oim', true) + '.'
  • src/image_build_manager/roles/image_build_setup/tasks/load_config.yml:42 + lookup('env', 'SYSTEM_DOMAIN_NAME') \| default('omnia.cluster', true)) }}

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
  • Shell: quoted variables, strict mode (set -euo pipefail), no eval, secure temp files

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

@abhishek-sa1
abhishek-sa1 changed the base branch from main to feature/ipv6-poc November 27, 2026 09:46
ansible-lint no-handler rule: tasks with 'when: .changed' should use
notify + handlers instead. Replaced inline daemon_reload tasks with
notify on the existing 'reload pulp systemd' handler, followed by
flush_handlers to ensure systemd is reloaded before the next task.

Signed-off-by: Rohith Ravut <rohith.ravut@dellteam.com>
@Rohith-Ravut Rohith-Ravut changed the title feat(dual-stack): add IPv6 hostname-based networking across main, rep… feat(dual-stack): add IPv6 hostname-based networking across main, repo_manager, and image_build_manager Nov 27, 2026
Signed-off-by: Rohith Ravut <rohith.ravut@dellteam.com>

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.

1 participant