virtual IP addresses should not be registered
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Joseph Phillips |
Bug Description
juju registers all IP addresses configured in a machine, if the IP address is a virtual IP managed by pacemaker (or equivalent clustering solutions like keepalived), so far this hasn't been a problem, but we found an environment where for an undetermined reason the virtual IP is stored as the first element of the array in machineaddresses
...
"machineadd
{
"origin": "machine",
"value": "192.168.140.21"
},
{
"origin": "machine",
"value": "192.168.140.33"
},
{
"origin": "machine",
"value": "127.0.0.1"
},
{
"origin": "machine",
"value": "::1"
}
],
...
In this case the IP address 192.168.140.21 is a virtual IP that was migrated to another node, when the user tries to use 'juju run' with this unit the following error message is printed:
- MachineId: 0/lxc/1
ReturnCode: 1
Stderr: |
error: unit "unit/0" not found on this machine
Stdout: ""
UnitId: unit/0
This is happening because jujud-machine-0 tries to talk to unit/0 via 192.168.140.21, the virtual IP that according to juju's database is the machine 0/lxc/1, but the address is actually configured in another machine (e.g. 1/lxc/1), so when juju detects this mismatch the operation is aborted.
Steps to reproduce:
cat << EOF>cfg.yaml
percona-cluster:
vip: 192.168.11.5
min-cluster-size: 3
EOF
juju deploy --config cfg.yaml -n 3 cs:trusty/
juju deploy cs:trusty/hacluster
juju add-relation hacluster percona-cluster
This will make juju record the IP address 192.168.11.5 when it shouldn't
[Workaround]
juju ssh 0 sudo su -
apt-get install mongodb-clients
mongo --ssl -u admin -p $(grep oldpassword /var/lib/
In mongodb shell
use juju;
db.machines.
This will remove the ip address 192.168.11.5 from the machine 1, this will be needed when 192.168.11.5 was migrated from machine 1 and the IP is the first element of the array.
tags: | added: sts |
Changed in juju: | |
status: | Incomplete → Triaged |
Changed in juju: | |
milestone: | none → 2.4-beta1 |
Changed in juju: | |
milestone: | 2.4-beta1 → none |
no longer affects: | juju-core |
Changed in juju: | |
milestone: | none → 2.8-rc1 |
importance: | Medium → High |
Changed in juju: | |
assignee: | nobody → Simon Richardson (simonrichardson) |
Changed in juju: | |
assignee: | Simon Richardson (simonrichardson) → Joseph Phillips (manadart) |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | 2.8.1 → 2.8.2 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
@Felipe Reyes,
Could you please clarify Juju version?