fix(oceanbase-ce): update reconfigure script to argv-reading#3074
Merged
Conversation
….2 contract PR #2862 changed the reconfigure action script from argv-reading ("" "" with -- placeholder) to env-scanning (/proc/self/environ). This broke reconfigure on KB 1.2+, which delivers reconfigure params as argv via ReconfigureArgs -> kbagent Arguments -> command argv. Root cause confirmed by KB controller team (Edward) code trace: - ReconfigureArgs [][]string in InstanceSet spec - lifecycle.Options{Arguments: config.ReconfigureArgs} - callActionWithRetry iterates pairs, each -> one action call - execActionCallX appends arguments to command argv - Result: sh -c "script" -- system_memory 2G -> $1=system_memory, $2=2G PostgreSQL sibling addon uses the same correct pattern. Fix: revert to original argv-reading pattern (clean revert of 78f66c0).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3074 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 140 140
Lines 22548 22548
=====================================
Misses 22548 22548 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
PR #2862 changed the OBCE reconfigure action script from argv-reading ( with placeholder) to env-scanning (). This broke reconfigure on KB 1.2+, which delivers reconfigure params as argv via:
sh -c "script" -- system_memory 2G→=system_memory,=2GThe env-scanning script finds no matching env vars →
no reconfigure parameters found in kbagent environment→ exit 1.Root cause confirmation
Edward (KB controller team) traced the full code chain and confirmed:
78f66c03)sh -c 'script "$1" "$2"' --Fix
Clean revert of commit
78f66c03— restore the original argv-reading pattern.Before (broken):
After (fixed):
/scripts/{{ .script }} "$1" "$2"Validation
successfully reconfigure the podreconfigureArgs: [["system_memory", "2G"]]Scope
Only
addons/oceanbase-ce/templates/_helpers.tplchanged. 1 file, 2 insertions, 25 deletions.