[GPTEINFRA-16720] Fix showroom multi-user mode trigger in combined CI#155
Merged
Conversation
…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
previously approved these changes
Jun 23, 2026
…int risky-file-permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In combined CI (multi-tenant loop), user2's showroom pod entered multi-user mode incorrectly, creating namespace
user2-showroom-user1instead ofuser2-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_datalookup in the showroom role'sprepare_variables.yamlreadsprovision-user-data.yaml. After user1's Phase 1, this file containsusers.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_factpersists host-level facts acrossinclude_rolecalls in the same play. Thecombine()inprepare_variables.yamlmerges onto dirty_showroom_user_datafrom the previous iteration even if the file is clean.Fix
Two-part fix in
provision_user.ymlwrapping each user's Phase 1:userskey fromprovision-user-data.yaml— preserves global keys (cluster credentials, endpoints) but removes per-user entries so_showroom_user_data.usersis undefined → single-user mode_showroom_user_data: {}— clears dirty in-memory fact socombine()starts from a clean slate each iterationMerge-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.yamlscoping 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