Merge lp://qastaging/~gnuoy/charms/trusty/percona-cluster/respect-the-vip into lp://qastaging/~openstack-charmers-archive/charms/trusty/percona-cluster/trunk

Proposed by Liam Young
Status: Merged
Merged at revision: 38
Proposed branch: lp://qastaging/~gnuoy/charms/trusty/percona-cluster/respect-the-vip
Merge into: lp://qastaging/~openstack-charmers-archive/charms/trusty/percona-cluster/trunk
Diff against target: 1126 lines (+575/-128)
10 files modified
hooks/charmhelpers/contrib/hahelpers/cluster.py (+1/-2)
hooks/charmhelpers/contrib/network/ip.py (+194/-19)
hooks/charmhelpers/contrib/peerstorage/__init__.py (+27/-29)
hooks/charmhelpers/core/hookenv.py (+42/-16)
hooks/charmhelpers/core/host.py (+40/-12)
hooks/charmhelpers/core/services/base.py (+17/-9)
hooks/charmhelpers/core/services/helpers.py (+119/-5)
hooks/charmhelpers/fetch/__init__.py (+72/-17)
hooks/charmhelpers/fetch/archiveurl.py (+49/-4)
hooks/percona_hooks.py (+14/-15)
To merge this branch: bzr merge lp://qastaging/~gnuoy/charms/trusty/percona-cluster/respect-the-vip
Reviewer Review Type Date Requested Status
James Page Approve
Edward Hope-Morley Pending
Review via email: mp+239010@code.qastaging.launchpad.net

Description of the change

vip is being set correctly:

ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ cat > percona.yaml << EOF
> percona-cluster:
> root-password: my-root-password
> sst-password: my-sst-password
> EOF
ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju deploy --config percona.yaml local:trusty/percona-cluster
Added charm "local:trusty/percona-cluster-45" to the environment.
ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju add-unit percona-cluster
ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju set percona-cluster vip=10.5.100.10
ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju deploy hacluster
Added charm "cs:trusty/hacluster-13" to the environment.
ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju add-relation hacluster percona-cluster
ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju deploy cinder
Added charm "cs:trusty/cinder-7" to the environment.
ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju add-relation cinder percona-cluster
ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju run --unit cinder/0 'relation-list -r $(relation-ids "shared-db") | xargs -I{} relation-get -r $(relation-ids "shared-db") - {}'
allowed_units: cinder/0
db_host: 10.5.100.10
password: S89CwhqwFhjy8XnNJyZKsKWrGYJ8CS5B
private-address: 10.5.46.45
allowed_units: cinder/0
db_host: 10.5.100.10
password: S89CwhqwFhjy8XnNJyZKsKWrGYJ8CS5B
private-address: 10.5.46.46

To post a comment you must log in.
Revision history for this message
James Page (james-page) :
review: Needs Fixing
40. By Liam Young

Put db_host calculation in its own function and only set db_host to the access_network address if the remote client provides a hostname that is in the same address range

Revision history for this message
James Page (james-page) :
review: Needs Fixing
41. By Liam Young

Ensure get_db_host always returns an ip address and fix bug with get_db_host referencing loop variables outside of the loop

Revision history for this message
Liam Young (gnuoy) wrote :

Updated with James' suggestions and tested with nova-cc

ubuntu@gnuoy-bastion:~/bugs/bug1383253⟫ juju run --unit nova-cloud-controller/0 'relation-list -r $(relation-ids "shared-db") | xargs -I{} relation-get -r $(relation-ids "shared-db") - {}'
db_host: 10.5.100.10
neutron_allowed_units: nova-cloud-controller/0
neutron_password: qM3mtg4JfVLHGk3LFcX5gbH9dPVmbLT8
nova_allowed_units: nova-cloud-controller/0
nova_password: T7kFcJt8FnXCnW56kjMg8ZcyPtGgn9Tp
private-address: 10.5.46.210
db_host: 10.5.100.10
neutron_allowed_units: nova-cloud-controller/0
neutron_password: qM3mtg4JfVLHGk3LFcX5gbH9dPVmbLT8
nova_allowed_units: nova-cloud-controller/0
nova_password: T7kFcJt8FnXCnW56kjMg8ZcyPtGgn9Tp
private-address: 10.5.46.213

Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: