fix: map mongo_version to correct mongo playbook in containerized san… - #361
Merged
srathod-apphelix merged 1 commit intoJul 27, 2026
Merged
Conversation
ktyagiapphelix2u
approved these changes
Jul 27, 2026
srathod-apphelix
deleted the
srathod/GSRE-4246-sandbox-mongo-playbook-mapping
branch
July 27, 2026 07:18
There was a problem hiding this comment.
Pull request overview
This PR fixes containerized sandbox provisioning failures by mapping mongo_version values like 5.0/6.0/7.0 to the correct Ansible playbook basenames (mongo_5_0/mongo_6_0/mongo_7_0) so the containerized provisioning path no longer tries to run nonexistent playbooks like 5.0.yml.
Changes:
- Introduces
mongo_playbookmapping based onmongo_versionalongside the existingMONGO_*_ENABLEDflag selection. - Updates the containerized provisioning loop to invoke
$mongo_playbook.ymlrather than$mongo_version.yml.
Comments suppressed due to low confidence (1)
util/jenkins/ansible-provision.sh:741
- The containerized provisioning loop now depends on
mongo_playbook, but ifmongo_versionis unset/unsupported,$mongo_playbookexpands empty and Mongo setup will be skipped (or an exportedmongo_playbookcould be used unintentionally). Add an explicit guard so failures are fast and diagnosable.
for playbook in redis $mongo_playbook; do
run_ansible $playbook.yml -i "${deploy_host}," $extra_var_arg --user ubuntu
done
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -521,20 +521,23 @@ EOF_AUTH | |||
| fi | |||
|
|
|||
| if [[ $mongo_version == "5.0" ]]; then | |||
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.
Summary
Fixes containerized sandbox builds failing with
ERROR! the playbook: 5.0.yml could not be foundwhenedxapp_container_enabled=trueandmongo_version=5.0.Jira - GSRE-4246
Purpose
The CreateSandbox Jenkins job sets
mongo_versionto version strings like5.0,6.0, and7.0. The containerized path inansible-provision.shwas using that value directly as the playbook name (5.0.yml), while the actual playbooks aremongo_5_0.yml,mongo_6_0.yml, andmongo_7_0.yml. This change mapsmongo_versionto the correct playbook basename in the same block that setsMONGO_*_ENABLEDflags.Changes
mongo_playbooktomongo_5_0,mongo_6_0, ormongo_7_0based on the selectedmongo_versioninansible-provision.sh.$mongo_playbookinstead of$mongo_versionwhen invoking ansible playbooks.