From 2520d7372df697b15ef54a1f602fb77d9fb39083 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 9 Sep 2019 14:51:38 +1000 Subject: [PATCH] designate: cleanup producer HA deployment (SOC-9766) The previous PR merged before I managed to push up some fixes to silence Hound, and correct the sync marks. --- chef/cookbooks/designate/recipes/api.rb | 2 -- chef/cookbooks/designate/recipes/ha.rb | 16 +++++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/chef/cookbooks/designate/recipes/api.rb b/chef/cookbooks/designate/recipes/api.rb index 7dc78f0fc9..d8bdb385be 100644 --- a/chef/cookbooks/designate/recipes/api.rb +++ b/chef/cookbooks/designate/recipes/api.rb @@ -16,8 +16,6 @@ # Recipe:: api # -package "openstack-designate-producer" - keystone_settings = KeystoneHelper.keystone_settings(node, @cookbook_name) designate_port = node[:designate][:api][:bind_port] diff --git a/chef/cookbooks/designate/recipes/ha.rb b/chef/cookbooks/designate/recipes/ha.rb index 245b2d8867..ba3f60728e 100644 --- a/chef/cookbooks/designate/recipes/ha.rb +++ b/chef/cookbooks/designate/recipes/ha.rb @@ -33,20 +33,22 @@ action :nothing end.run_action(:create) -op = {} -op["monitor"] = {} -op["monitor"]["interval"] = "10s" +crowbar_pacemaker_sync_mark "wait-designate_producer" -designate_producer_primitive = "designate-producer" -pacemaker_primitive designate_producer_primitive do +package "openstack-designate-producer" + +op = { "monitor" => { "interval" => "10s" }} + +producer_primitive = "designate-producer" +pacemaker_primitive producer_primitive do agent "systemd:openstack-designate-producer" op op action :update only_if { CrowbarPacemakerHelper.is_cluster_founder?(node) } end -service_transaction_objects << "pacemaker_primitive[#{designate_producer_primitive}]" +service_transaction_objects << "pacemaker_primitive[#{producer_primitive}]" -designate_producer_loc = openstack_pacemaker_controller_only_location_for designate_producer_primitive +designate_producer_loc = openstack_pacemaker_controller_only_location_for producer_primitive service_transaction_objects << "pacemaker_location[#{designate_producer_loc}]" pacemaker_transaction "designate producer service" do