[OpenNMS/opennms] ceaa1c: NMS-20109: Handle some corner cases
Chandra Gorantla via opennms-cvs <[email protected]> Fri, 31 Jul 2026 13:02:23 -0700
| Newsgroups | gmane.network.opennms.cvs |
|---|---|
| Message-ID | <OpenNMS/opennms/push/refs/heads/features/ha-management/[email protected]> |
Branch: refs/heads/features/ha-management
Home: https://github.com/OpenNMS/opennms
Commit: ceaa1cc2e6607c7db0191d92fa73bd853342e690
https://github.com/OpenNMS/opennms/commit/ceaa1cc2e6607c7db0191d92fa73bd853342e690
Author: Chandra Gorantla <[email protected]>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
M features/ha-management/ha-daemon/src/main/java/org/opennms/netmgt/ha/HaStartupCoordinator.java
M features/ha-management/ha-daemon/src/test/java/org/opennms/netmgt/ha/HaStartupCoordinatorTest.java
Log Message:
-----------
NMS-20109: Handle some corner cases
Fail-closed startup
Partner check before claiming ACTIVE
No assume-inactive-on-error
Commit: cad595062f1f74649f2afede985f2ba60137185e
https://github.com/OpenNMS/opennms/commit/cad595062f1f74649f2afede985f2ba60137185e
Author: Chandra Gorantla <[email protected]>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
M core/daemon/src/main/java/org/opennms/netmgt/vmmgr/Starter.java
M features/ha-management/ha-daemon/src/main/java/org/opennms/netmgt/ha/HaConfigSyncer.java
M features/ha-management/ha-daemon/src/main/java/org/opennms/netmgt/ha/HaStartupCoordinator.java
M features/ha-management/ha-daemon/src/main/java/org/opennms/netmgt/ha/HaSyncFiles.java
M features/ha-management/ha-daemon/src/test/java/org/opennms/netmgt/ha/HaConfigSyncerTest.java
M features/ha-management/ha-daemon/src/test/java/org/opennms/netmgt/ha/HaStartupCoordinatorTest.java
M features/ha-management/ha-rest/src/main/java/org/opennms/netmgt/ha/rest/impl/HaRestServiceImpl.java
M features/ha-management/ha-shell/src/main/java/org/opennms/netmgt/ha/shell/HaConfigCommand.java
M features/ha-management/ha-shell/src/main/java/org/opennms/netmgt/ha/shell/HaFailoverCommand.java
M opennms-base-assembly/src/main/filtered-meridian/etc/ha-configuration.xml
M opennms-webapp/src/main/webapp/WEB-INF/applicationContext-spring-security.xml
Log Message:
-----------
NMS-20109: Fail closed on HA config errors and harden sync path handling
- Abort startup instead of proceeding standalone when the HA config is
unreadable, required fields are missing, or coordination throws;
coordinator mode now requires a distinct partner-instance-id (enforced
at load, REST update, and reload)
- Clamp failover-threshold to at least 2x the heartbeat interval and
enforce a minimum sync interval before scheduling
- Suppress config sync in heartbeat-only mode, including config reloads
- Halt the JVM when failover cannot stop services after the step-down
is advertised, instead of running on undetectable
- Config sync: support the ${scv:alias:attr|default} fallback syntax and
resolve credentials via the stock vault (honors the configured keystore
type); advertise the serving node's exclusions in the manifest and use
the union of both nodes' lists for deletion propagation; canonicalize
paths before exclusion matching; reject symlink escapes from etc/ and
skip symlinks when building manifests; re-check HA state before every
file write and deletion so a mid-cycle promotion aborts the pass
- Copy mode and sync-excludes in the ha-config shell command
- Use subtree intercept-url patterns for /rest/ha so trailing-slash
variants keep requiring ROLE_ADMIN
- Document featuresBoot.d feature activation in the config template
Commit: f50dfefd723bf3ff1624bcf22002f86c4d036377
https://github.com/OpenNMS/opennms/commit/f50dfefd723bf3ff1624bcf22002f86c4d036377
Author: Chandra Gorantla <[email protected]>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
M core/daemon/src/main/java/org/opennms/netmgt/vmmgr/Manager.java
M core/daemon/src/main/java/org/opennms/netmgt/vmmgr/Starter.java
A core/daemon/src/main/java/org/opennms/netmgt/vmmgr/StartupLifecycleHook.java
M features/ha-management/ha-daemon/pom.xml
M features/ha-management/ha-daemon/src/main/java/org/opennms/netmgt/ha/HaStartupCoordinator.java
A features/ha-management/ha-daemon/src/main/java/org/opennms/netmgt/ha/HaStartupLifecycleHook.java
A features/ha-management/ha-daemon/src/main/resources/META-INF/services/org.opennms.netmgt.vmmgr.StartupLifecycleHook
M features/ha-management/ha-daemon/src/test/java/org/opennms/netmgt/ha/HaStartupCoordinatorTest.java
A features/ha-management/ha-daemon/src/test/java/org/opennms/netmgt/ha/HaStartupLifecycleHookTest.java
M features/ha-management/ha-rest/src/main/java/org/opennms/netmgt/ha/rest/impl/HaRestServiceImpl.java
M features/ha-management/ha-shell/src/main/java/org/opennms/netmgt/ha/shell/HaFailoverCommand.java
M opennms-base-assembly/src/main/filtered-meridian/etc/ha-configuration.xml
Log Message:
-----------
NMS-20109: Publish HA state after shutdown completes; lifecycle SPI
- Defer the STANDBY/FAILED row write until the service Invoker has
finished stopping, so the partner can never promote alongside a node
that is still draining; a hung drain falls back to heartbeat staleness
at the failover threshold. The split-brain yield keeps its immediate
write since the halt is instantaneous.
- Arbitrate split-brain only against a partner whose heartbeat is within
the failover threshold: an ACTIVE row with a dead heartbeat means the
partner stopped while holding the role, so the survivor continues as
the sole active instance instead of halting in deference to it.
- Replace the reflective HA hooks in Starter and Manager with a
StartupLifecycleHook SPI discovered via ServiceLoader; ha-daemon
registers the implementation, and its absence is a no-op.
- Clarify the sync-excludes example in the config template.
Compare: https://github.com/OpenNMS/opennms/compare/949bb1b23b47...f50dfefd723b
To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs