Interface resolution should be more intelligent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack HA Cluster Charm |
Triaged
|
High
|
James Page | ||
hacluster (Juju Charms Collection) |
Invalid
|
High
|
James Page |
Bug Description
Hi
When I add a relation between openstack-dashboard and hacluster, it has a relation error
=======
2015-02-23 02:15:57 DEBUG worker.uniter.jujuc server.go:111 hook context id "hacluster-
2015-02-23 02:15:57 INFO worker.uniter.jujuc server.go:110 running hook tool "relation-get" ["--format=json" "-r" "ha:26" "corosync_
2015-02-23 02:15:57 DEBUG worker.uniter.jujuc server.go:111 hook context id "hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
2015-02-23 02:15:57 INFO unit.hacluster-
=======
It seems that it can't get the ha bind network interfaces in the machine.
So I put the debugging code and then get the result which tried to find the wrong interfaces that the machine doesn't have.
(the machine's interface is only eth0)
The history of deployment is as below
1. I set the ha-bindiface=
2. I got the error as above which means that the machine doesn't have such device in there.
3. I set ha-bindiface='eth0' and tried to resolve unit
4. it still finds the interface (device) as juju-br0 even though I changed device from juju-br0 to eth0
ubuntu@
1: lo: <LOOPBACK,
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
23: eth0: <BROADCAST,
link/ether 00:16:3e:6d:23:5f brd ff:ff:ff:ff:ff:ff
inet 10.100.1.82/24 brd 10.100.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::216:
valid_lft forever preferred_lft forever
Additionally this error occurs here (hacluster.py)
def get_network_
if iface:
iface = str(iface)
network = "{}/{}"
ip = IPNetwork(network)
return str(ip.network)
else:
return None
I think it can easily reproduce like this
1. set the wrong interface for ha-bindiface in yaml file
2. deploy openstack component with hacluster
3. change the ha-bindiface with exsting interface in the machine
4. check it out
Thanks
Changed in hacluster (Juju Charms Collection): | |
status: | New → Confirmed |
summary: |
- ha relation falied to get the interface + Interface resolution should be more intelligent |
Changed in hacluster (Juju Charms Collection): | |
importance: | Undecided → Medium |
status: | Confirmed → Triaged |
Changed in hacluster (Juju Charms Collection): | |
milestone: | 16.10 → 17.01 |
Changed in charm-hacluster: | |
assignee: | nobody → James Page (james-page) |
importance: | Undecided → High |
status: | New → Triaged |
Changed in hacluster (Juju Charms Collection): | |
status: | Triaged → Invalid |
I suspect that the change in configuration is not getting down to the hacluster subordinate charm, so its probably not possible to resolve this way.
That said, the hacluster charm has direct configuration of corosync_bindiface which overrides anything coming down from the principle charm - try setting that instead and resolved --retry the units:
juju set hacluster corosync_ bindiface= eth0
....