Skip to content

fix(tenant-2): use cross_node_links for kibana→elasticsearch - #11

Merged
artemnikitin merged 8 commits into
mainfrom
fix/tenant-2-cross-node-link
Jun 28, 2026
Merged

fix(tenant-2): use cross_node_links for kibana→elasticsearch#11
artemnikitin merged 8 commits into
mainfrom
fix/tenant-2-cross-node-link

Conversation

@artemnikitin

@artemnikitin artemnikitin commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Switch tenant-2/kibana.yaml from links to cross_node_links for the Elasticsearch service discovery
  • Add port_forwards: [{host_port: 9200, vm_port: 9200}] to tenant-2/elasticsearch.yaml

Why

The scheduler placed tenant-2-kibana and tenant-2-elasticsearch on different nodes. links is same-node only — the agent resolves to the linked service's guest IP (172.16.0.x). Since the services were cross-node, ELASTICSEARCH_HOSTS was never injected, causing Kibana to panic at boot with:

Error: Unknown environment variable referenced in config: ELASTICSEARCH_HOSTS
Kernel panic - not syncing: Attempted to kill init!

cross_node_links is resolved by the controller at reconcile time: it finds tenant-2-elasticsearch on its node, reads the host_port from port_forwards, and injects ELASTICSEARCH_HOSTS=http://<host_ip>:9200 into Kibana's kernel args before the service starts.

🤖 Generated with Claude Code

artemnikitin and others added 8 commits June 20, 2026 13:54
The scheduler placed tenant-2-kibana and tenant-2-elasticsearch on
different nodes. `links` only resolves same-node guest IPs, so
ELASTICSEARCH_HOSTS was never set and Kibana panicked at boot.

Switch to `cross_node_links` so the controller injects the peer
node's host_ip:host_port at reconcile time. Add port_forwards on
elasticsearch to expose 9200 on the host so the controller has a
host_port to resolve.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@artemnikitin
artemnikitin merged commit 7991918 into main Jun 28, 2026
3 checks passed
@artemnikitin
artemnikitin deleted the fix/tenant-2-cross-node-link branch June 28, 2026 13:20
artemnikitin added a commit that referenced this pull request Jun 28, 2026
## Summary

- Fix `cross_node_links` field: `port` → `host_port` in
`tenant-2/kibana.yaml`

## Why

Follow-up to #11. The enricher maps `host_port` →
`CrossNodeLinks.HostPort`. Using `port: 9200` left `HostPort: 0` in the
desired state, so the controller resolved `ELASTICSEARCH_HOSTS` to
`10.30.0.3:0` instead of `10.30.0.3:9200`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant