[GPTEINFRA-16720] Fix showroom failure on no-bastion labs (DevSpaces, OCP Virt)#157
Merged
Merged
Conversation
andrew-jones
previously approved these changes
Jun 28, 2026
added 2 commits
June 28, 2026 18:08
…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
…ot full reset
Resetting _showroom_user_data to {} wiped the showroom role vars/main.yml
default (bastion_public_hostname: 'test_hostname'), breaking labs with no
bastion (LB2236 Ansible Dev Tools DevSpaces, LB2391 Modernize OCP Virt).
Labs WITH a bastion still work because provision-user-data.yaml has the value.
Labs WITHOUT a bastion depended on the role default — wiped by our {} reset.
Strip only the users key instead using dict2items|rejectattr|items2dict.
Guards:
- _showroom_user_data is defined (skip on first user iteration)
- _showroom_user_data is mapping (guard against non-dict type edge case)
- _showroom_user_data.users is defined (only strip when actually dirty)
This preserves bastion_public_hostname and all other role defaults while
still preventing multi-user mode trigger on subsequent user iterations.
f5fc7c8 to
5546759
Compare
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
Labs without a bastion (LB2236 Ansible Dev Tools DevSpaces, LB2391 Modernize OCP Virt) fail with:
Root Cause
The bridge role's
set_fact: _showroom_user_data: {}reset wipes the showroom role'svars/main.ymldefault (bastion_public_hostname: 'test_hostname').set_facthas higher precedence than role vars — once reset to{}, the default is gone. Labs WITH a bastion work becauseprovision-user-data.yamlsupplies the value. Labs WITHOUT a bastion crash when the helm chart values are rendered.Fix
Strip only the
userskey instead of full reset. Three guards per council + external model review:_showroom_user_data is defined— safe skip on first iteration_showroom_user_data is mapping— guard against non-dict edge case_showroom_user_data.users is defined— only strip when fact is dirtyPreserves
bastion_public_hostnameand all other role defaults while preventing multi-user mode trigger.Validated
Jira: GPTEINFRA-16720