From 0902a9f94b0b126e913f87fc3c1fe585261a2c83 Mon Sep 17 00:00:00 2001 From: Hui Xiang Date: Tue, 23 Sep 2014 14:52:16 +0800 Subject: [PATCH] Set private-address for peer cluster. --- hooks/nova_cc_hooks.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hooks/nova_cc_hooks.py b/hooks/nova_cc_hooks.py index ad828d19..4c2497d4 100755 --- a/hooks/nova_cc_hooks.py +++ b/hooks/nova_cc_hooks.py @@ -580,6 +580,13 @@ def cluster_changed(): disable_services() cmd_all_services('stop') + # peer_echo will pop up private-address + if config('prefer-ipv6'): + for rid in relation_ids('cluster'): + addr = get_ipv6_addr(exc_list=[config('vip')])[0] + relation_set(relation_id=rid, + relation_settings={'private-address': addr}) + @hooks.hook('ha-relation-joined') def ha_joined():