Skip to content

fix(oceanbase-ce): update reconfigure script to argv-reading#3074

Merged
leon-ape merged 1 commit into
mainfrom
eve/fix-obce-reconfigure-argv-channel
Jul 9, 2026
Merged

fix(oceanbase-ce): update reconfigure script to argv-reading#3074
leon-ape merged 1 commit into
mainfrom
eve/fix-obce-reconfigure-argv-channel

Conversation

@weicao

@weicao weicao commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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:

  • in InstanceSet spec
  • ()
  • iterates pairs, each → one action call ()
  • appends arguments to command argv ()
  • Result: sh -c "script" -- system_memory 2G=system_memory, =2G

The 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:

Fix

Clean revert of commit 78f66c03 — restore the original argv-reading pattern.

Before (broken):

env_file="/tmp/oceanbase-reconfigure-env.27563"
trap 'rm -f "$env_file"' EXIT
tr '\0' '\n' < /proc/self/environ > "$env_file"
# ... 20+ lines of env-scanning loop ...

After (fixed):

/scripts/{{ .script }} "$1" "$2"

Validation

  • Smoke: 6/6 PASS (cluster creation, SQL read/write, service)
  • O05 Reconfiguring: SUCCEEDED in 3s (was stuck 176min with env-reading)
  • Controller log: successfully reconfigure the pod
  • InstanceSet argv proof: reconfigureArgs: [["system_memory", "2G"]]

Scope

Only addons/oceanbase-ce/templates/_helpers.tpl changed. 1 file, 2 insertions, 25 deletions.

….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).
@weicao weicao requested review from a team, leon-ape and shanshanying as code owners July 6, 2026 14:47
@weicao weicao added the nopick Not auto cherry-pick when PR merged label Jul 6, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (931738c) to head (42edfa5).
⚠️ Report is 18 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leon-ape leon-ape left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leon-ape leon-ape changed the title fix(oceanbase-ce): revert reconfigure script to argv-reading for KB 1.2 contract fix(oceanbase-ce): update reconfigure script to argv-reading Jul 9, 2026
@leon-ape leon-ape merged commit 8cd5cca into main Jul 9, 2026
15 checks passed
@leon-ape leon-ape deleted the eve/fix-obce-reconfigure-argv-channel branch July 9, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nopick Not auto cherry-pick when PR merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants