percona cluster getting wrong private ip
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Invalid
|
Undecided
|
Unassigned | ||
OPNFV |
New
|
Undecided
|
Unassigned | ||
OpenStack Nova Compute Charm |
Invalid
|
High
|
Unassigned | ||
OpenStack Percona Cluster Charm |
Fix Released
|
High
|
David Ames | ||
juju (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
nova-compute (Juju Charms Collection) |
Invalid
|
High
|
Unassigned | ||
percona-cluster (Juju Charms Collection) |
Invalid
|
Critical
|
James Page |
Bug Description
Percona cluster charm from master branch is not getting correct private ip when using spaces.
internal CIDR: 192.0.5.0/24
public CIDR: 172.21.159.0/24
wsrep_node_
Below are the logs requested.
root@juju-
machine-1-lxd-2.log unit-mysql-0.log
root@juju-
http://
root@juju-
http://
root@juju-
root@juju-
root@juju-
root@juju-
error.log
root@juju-
http://
root@juju-
root@juju-
conf.d debian.cnf my.cnf my.cnf.fallback percona-
root@juju-
root@juju-
client.cnf isamchk.cnf mysqld.cnf mysqld_safe.cnf
root@juju-
http://
affects: | charms → percona-cluster (Juju Charms Collection) |
Changed in percona-cluster (Juju Charms Collection): | |
importance: | Undecided → Critical |
milestone: | none → 17.01 |
status: | New → Confirmed |
tags: | added: oil oil-2.0 |
Changed in percona-cluster (Juju Charms Collection): | |
assignee: | nobody → James Page (james-page) |
Changed in nova-compute (Juju Charms Collection): | |
importance: | Critical → High |
status: | Confirmed → Triaged |
Changed in charm-nova-compute: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in nova-compute (Juju Charms Collection): | |
status: | Triaged → Invalid |
Changed in percona-cluster (Juju Charms Collection): | |
status: | Fix Committed → Invalid |
Changed in charm-percona-cluster: | |
status: | New → Fix Released |
milestone: | none → 17.02 |
Changed in charm-nova-compute: | |
milestone: | none → 17.05 |
Changed in charm-percona-cluster: | |
importance: | Undecided → High |
assignee: | nobody → David Ames (thedac) |
Changed in juju (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in charm-nova-compute: | |
milestone: | 17.05 → 17.08 |
Changed in charm-nova-compute: | |
milestone: | 17.08 → none |
According to John Meinel:
'The charms should be updated to use "network-get <bindname> --preferred- address" instead of just "unit-get private-address". unit-get doesn't pass the information to Juju for us to know which bit of the configuration we're supposed to be reporting.'
In the OpenStack charms most of the time we use charmhelpers. contrib. openstack. ip resolve_address() which does the right thing checking network-get first.
However, we have some isolated instances where unit_get( private- address) is defaulted to. Which according to John can be unpredictable.
Specifically, calls to get_host_ip() functions that return the private-address by default in nova-compute and percona-cluster. Leading to unpredictable IPs in configuration files.
We need to also check other charms for this issue.
Nova compute HostIPContext returns the private-address: context. OSContextGenera tor): 'prefer- ipv6'): ip(unit_ get('private- address' ))
class HostIPContext(
def __call__(self):
ctxt = {}
if config(
host_ip = get_ipv6_addr()[0]
else:
host_ip = get_host_
if host_ip:
ctxt[ 'host_ip' ] = host_ip
# NOTE: do not format this even for ipv6 (see bug 1499656)
return ctxt
percona-cluster in render_config returns the private-address:
'cluster_ name': 'juju_cluster',
'private_ address' : get_host_ip(),
context = {