feat: add ha.h stub + ha.c skeleton; document iomgr/SSL reuse decision (P1-1)

This commit is contained in:
Rongsong Shen 2026-05-07 13:45:36 +00:00
parent a7094fc47f
commit 89c360f7b5
3 changed files with 22 additions and 0 deletions

3
src/controller/ha.c Normal file
View file

@ -0,0 +1,3 @@
#include "ha.h"
/* P1-2: implementation added in next task */

18
src/controller/ha.h Normal file
View file

@ -0,0 +1,18 @@
#ifndef HA_H
#define HA_H
/*
* XCE Controller HA — role management and election (P1).
*
* P1-1 audit: the existing create_ssl_context() + iomgr_set_ssl_ctx() path
* in cluster.c (line 559, set at line 583) covers all controller-to-controller SSL.
* HA listeners (heartbeat, election probe, replication accept) reuse the same
* ssl_ctx already installed on c->iomgr.
* No new TLS infrastructure is needed — XCE runs on a trusted management LAN.
* Peer identity is validated by host:port match against the --peers candidate list.
* See design doc Part 5.9 and memory: Persistence & HA Trusted LAN Decision.
*/
/* Full struct definitions and API declarations added in P1-2. */
#endif /* HA_H */

View file

@ -1,6 +1,7 @@
controller_src = [
'cluster.c',
'dataex.c',
'ha.c',
'job.c',
'join.c',
'main.c',