Skip to content

[GPTEINFRA-16720] Fix showroom multi-user mode trigger in combined CI#155

Merged
treddy08 merged 2 commits into
mainfrom
fix/GPTEINFRA-16720-showroom-multiuser-mode
Jun 23, 2026
Merged

[GPTEINFRA-16720] Fix showroom multi-user mode trigger in combined CI#155
treddy08 merged 2 commits into
mainfrom
fix/GPTEINFRA-16720-showroom-multiuser-mode

Conversation

@prakhar1985

Copy link
Copy Markdown
Contributor

Problem

In combined CI (multi-tenant loop), user2's showroom pod entered multi-user mode incorrectly, creating namespace user2-showroom-user1 instead of user2-showroom. Each user also saw duplicate portal messages from prior users' Phase 1 runs.

Root Cause

Two layers of state contamination between sequential user Phase 1 runs:

1. File state: The agnosticd.core.agnosticd_user_data lookup in the showroom role's prepare_variables.yaml reads provision-user-data.yaml. After user1's Phase 1, this file contains users.user1. When user2's showroom role runs, the lookup returns _showroom_user_data.users defined → multi-user mode → wrong namespace.

2. In-memory state: set_fact persists host-level facts across include_role calls in the same play. The combine() in prepare_variables.yaml merges onto dirty _showroom_user_data from the previous iteration even if the file is clean.

Note: user-info.yaml is only used for display messages — not the multi-user mode trigger. Previous fix attempts targeted the wrong file.

Fix

Two-part fix in provision_user.yml wrapping each user's Phase 1:

  1. Strip users key from provision-user-data.yaml — preserves global keys (cluster credentials, endpoints) but removes per-user entries so _showroom_user_data.users is undefined → single-user mode
  2. Reset _showroom_user_data: {} — clears dirty in-memory fact so combine() starts from a clean slate each iteration

Merge-back after Phase 1 uses combine(recursive=True) to restore all prior users plus the current user's new data.

Also retains existing user-info.yaml scoping and Phase 1 message stripping for clean portal messages.

Validation

Confirmed fixed in LB2863 combined CI test order — user2's showroom namespace is correct and portal messages are clean.

Jira: GPTEINFRA-16720

…ulti-user mode trigger

The agnosticd.core.agnosticd_user_data lookup in the showroom role's
prepare_variables.yaml reads provision-user-data.yaml, not user-info.yaml.
If user1's Phase 1 writes users.user1 into that file, user2's showroom
role sees _showroom_user_data.users defined and enters multi-user mode,
creating namespace user2-showroom-user1 instead of user2-showroom.

Two-part fix:
1. Strip the users key from provision-user-data.yaml before each user's
   Phase 1 — preserves global keys (cluster credentials) but removes
   per-user entries so the showroom lookup stays in single-user mode.
2. Reset _showroom_user_data: {} fact before Phase 1 — set_fact persists
   across include_role calls in the same play, so combine() in
   prepare_variables.yaml merges onto dirty in-memory data even if the
   file is clean. The fact reset ensures a clean slate per iteration.

Also scopes user-info.yaml (display messages) and strips Phase 1 msgs
from merge-back to prevent duplicate portal messages.

Validated in LB2863 combined CI test order.
Jira: GPTEINFRA-16720
treddy08
treddy08 previously approved these changes Jun 23, 2026
@treddy08 treddy08 merged commit 6b5e60c into main Jun 23, 2026
1 check passed
@treddy08 treddy08 deleted the fix/GPTEINFRA-16720-showroom-multiuser-mode branch June 23, 2026 08:57
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