Skip to content

AMBARI-26640: Prevent auto-recovery from blocking cluster start operations - #4187

Merged
JiaLiangC merged 5 commits into
apache:trunkfrom
JiaLiangC:AMBARI-26640
Aug 31, 2026
Merged

AMBARI-26640: Prevent auto-recovery from blocking cluster start operations#4187
JiaLiangC merged 5 commits into
apache:trunkfrom
JiaLiangC:AMBARI-26640

Conversation

@JiaLiangC

Copy link
Copy Markdown
Contributor

Issue: AMBARI-26640

What changes were proposed in this pull request?

  • Make server-issued execution commands preempt queued and active Agent auto-recovery work, including the dequeue-to-active race.
  • Derive transitive recovery dependencies from RoleCommandOrder and publish actual component-instance current, desired, required, and freshness state in a versioned topology.
  • Scope topology freshness to the active Agent session, invalidate it on registration and heartbeat loss, ignore superseded reports, and prevent cached topology version regression.
  • Gate Agent START and RESTART recovery on a complete fresh topology and reject older versions from the same server epoch.
  • Isolate status snapshot acknowledgements by generation so reconnects cannot reuse stale cached status.

How was this patch tested?

All focused tests passed in the local Ambari build container using JDK 17.

  • Ambari Server: 29 tests run, 0 failures, 0 errors, 4 existing ignored tests.
  • Ambari Agent: 37 tests run, 0 failures.
  • Python compilation checks passed for all changed Agent source and test files.
  • Full server Checkstyle reported only two existing trunk violations in ThemeArtifactResourceProviderTest and MethodOverrideFilterTest; no changed file reported an error.
mvn -s .codex-maven-settings.xml -pl ambari-server -Drat.skip=true -Dcheckstyle.skip -DskipPythonTests -Dtest=RecoveryConfigHelperTest,RecoveryTopologyManagerTest,ComponentStatusAgentReportTest,TestHeartbeatMonitor,RoleCommandOrderTest,HostLevelParamsHolderTest -Dsurefire.failIfNoSpecifiedTests=false test

cd ambari-agent/src/test/python
python3 unitTests.py TestActionQueue
python3 unitTests.py TestRecoveryManager
python3 unitTests.py TestComponentStatusExecutor

Please review Ambari Contributing Guide before opening a pull request.

@JiaLiangC
JiaLiangC merged commit 1e753e0 into apache:trunk Aug 31, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants