Elasticsearch charm deploys with incorrect network.publish_host value fails with "peer-relation-joined" hook error

Bug #1980459 reported by Nicholas Njihia
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Elasticsearch Charm
Won't Fix
Undecided
Unassigned

Bug Description

When I deployed the elasticsearch (charm rev 59 - charm version 6.8.23) in a VMware environment, the charm is in an error state with "peer-relation-changed" hook failure. The value for network.publish_host in the elasticsearch.yml file ( /etc/ elasticsearch/elasticsearch.yml ) is incorrectly given as the LXD bridge IP address lxdbr0 rather than the actual ethernet network address that clients and other nodes can use to contact this node.

The elasticsearch.yml file is as follows:

# This config is autogenerated by ansible.
# See templates/elasticsearch.yml in the charm folder.

cluster.name: elasticsearch
http.port: 9200
network.host: 0
network.publish_host: 10.47.165.1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
discovery.zen.ping.unicast.hosts:
  - 10.246.154.105

There are 3 elasticsearch units in the deployment. As shown in the output of `ip addr` the charm assigns the ip address of lxdbr0 to network.publish_host value as in the following output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:38:67:e5 brd ff:ff:ff:ff:ff:ff
    inet 10.246.154.145/24 brd 10.246.154.255 scope global dynamic ens192
       valid_lft 3310sec preferred_lft 3310sec
    inet6 fe80::250:56ff:fe38:67e5/64 scope link
       valid_lft forever preferred_lft forever
3: fan-252: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP group default qlen 1000
    link/ether 56:0f:3b:a7:5e:26 brd ff:ff:ff:ff:ff:ff
    inet 252.154.145.1/8 scope global fan-252
       valid_lft forever preferred_lft forever
    inet6 fe80::5874:cdff:fe22:cb48/64 scope link
       valid_lft forever preferred_lft forever
4: ftun0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master fan-252 state UNKNOWN group default qlen 1000
    link/ether 5a:74:cd:22:cb:48 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5874:cdff:fe22:cb48/64 scope link
       valid_lft forever preferred_lft forever
5: lxdbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:16:3e:41:73:81 brd ff:ff:ff:ff:ff:ff
    inet 10.47.165.1/24 scope global lxdbr0
       valid_lft forever preferred_lft forever
7: veth495edb6f@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master fan-252 state UP group default qlen 1000
    link/ether 56:0f:3b:a7:5e:26 brd ff:ff:ff:ff:ff:ff link-netnsid 0

Revision history for this message
Eric Chen (eric-chen) wrote :

This charm is no longer being actively maintained. Please consider using the new Canonical Observability Stack (https://charmhub.io/topics/canonical-observability-stack) or the opensearch-operator (https://github.com/canonical/opensearch-operator) instead.

Changed in charm-elasticsearch:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.