fix/dev-config-raft-adv

set RQLiteRaftInternalPort and advertised addresses to fix health checks
This commit is contained in:
JohnySigma 2025-12-04 10:32:37 +02:00 committed by GitHub
parent 9f43cea907
commit 2d5ab372e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,16 +143,21 @@ func (ce *ConfigEnsurer) ensureNodeConfig(nodeSpec NodeSpec, peerAddrs []string)
// Generate node config (all nodes are unified) // Generate node config (all nodes are unified)
data := templates.NodeConfigData{ data := templates.NodeConfigData{
NodeID: nodeSpec.Name, NodeID: nodeSpec.Name,
P2PPort: nodeSpec.P2PPort, P2PPort: nodeSpec.P2PPort,
DataDir: nodeDir, DataDir: nodeDir,
RQLiteHTTPPort: nodeSpec.RQLiteHTTPPort, RQLiteHTTPPort: nodeSpec.RQLiteHTTPPort,
RQLiteRaftPort: nodeSpec.RQLiteRaftPort, RQLiteRaftPort: nodeSpec.RQLiteRaftPort,
RQLiteJoinAddress: nodeSpec.RQLiteJoinTarget, // Internal Raft port is the same as the external in local dev
BootstrapPeers: peerAddrs, RQLiteRaftInternalPort: nodeSpec.RQLiteRaftPort,
ClusterAPIPort: nodeSpec.ClusterAPIPort, RQLiteJoinAddress: nodeSpec.RQLiteJoinTarget,
IPFSAPIPort: nodeSpec.IPFSAPIPort, BootstrapPeers: peerAddrs,
UnifiedGatewayPort: nodeSpec.UnifiedGatewayPort, ClusterAPIPort: nodeSpec.ClusterAPIPort,
IPFSAPIPort: nodeSpec.IPFSAPIPort,
UnifiedGatewayPort: nodeSpec.UnifiedGatewayPort,
// Advertise local addresses for HTTP and Raft in dev
HTTPAdvAddress: fmt.Sprintf("localhost:%d", nodeSpec.UnifiedGatewayPort),
RaftAdvAddress: fmt.Sprintf("localhost:%d", nodeSpec.RQLiteRaftPort),
} }
config, err := templates.RenderNodeConfig(data) config, err := templates.RenderNodeConfig(data)