ichavero pushed to openstack-puppet-modules (f20). "Updated patches from f20-patches"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 8 01:36:03 UTC 2015


>From 628e79315062898a2087a85b3f13f0fd5f68931a Mon Sep 17 00:00:00 2001
From: Ivan Chavero <ichavero at redhat.com>
Date: Tue, 7 Apr 2015 19:06:14 -0600
Subject: Updated patches from f20-patches


diff --git a/0015-pacemaker-corosync-Grab-correct-hacluster-password.patch b/0015-pacemaker-corosync-Grab-correct-hacluster-password.patch
new file mode 100644
index 0000000..6292d37
--- /dev/null
+++ b/0015-pacemaker-corosync-Grab-correct-hacluster-password.patch
@@ -0,0 +1,137 @@
+From 46f99e115d6fe14eae97762fbe9546e41ee7f1c6 Mon Sep 17 00:00:00 2001
+From: Yanis Guenane <yanis.guenane at enovance.com>
+Date: Tue, 19 Aug 2014 09:47:11 -0400
+Subject: [PATCH] pacemaker/corosync: Grab correct hacluster password
+
+Conflicts:
+	manifests/corosync.pp
+---
+ pacemaker/manifests/corosync.pp | 98 ++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 81 insertions(+), 17 deletions(-)
+
+diff --git a/pacemaker/manifests/corosync.pp b/pacemaker/manifests/corosync.pp
+index 13d31a1..1ec04df 100644
+--- a/pacemaker/manifests/corosync.pp
++++ b/pacemaker/manifests/corosync.pp
+@@ -1,40 +1,104 @@
+-class pacemaker::corosync($cluster_name, $cluster_members) inherits pacemaker {
++# == Class: pacemaker::corosync
++#
++# A class to setup a pacemaker cluster
++#
++# === Parameters
++# [*cluster_name*]
++#   The name of the cluster (no whitespace)
++# [*cluster_members*]
++#   A space-separted list of cluster IP's or names
++# [*setup_cluster*]
++#   If your cluster includes pcsd, this should be set to true for just
++#    one node in cluster.  Else set to true for all nodes.
++# [*manage_fw*]
++#   Manage or not IPtables rules.
++# [*settle_timeout*]
++#   Timeout to wait for settle.
++# [*settle_tries*]
++#   Number of tries for settle.
++# [*settle_try_sleep*]
++#   Time to sleep after each seetle try.
+ 
++class pacemaker::corosync(
++  $cluster_members,
++  $cluster_name     = 'clustername',
++  $setup_cluster    = true,
++  $manage_fw        = true,
++  $settle_timeout   = '3600',
++  $settle_tries     = '360',
++  $settle_try_sleep = '10',
++) inherits pacemaker {
++  include ::pacemaker::params
++
++  if $manage_fw {
+     firewall { '001 corosync mcast':
+       proto  => 'udp',
+       dport  => ['5404', '5405'],
+       action => 'accept',
+     }
++  }
+ 
++  if $pcsd_mode {
++    if $manage_fw {
++      firewall { '001 pcsd':
++        proto  => 'tcp',
++        dport  => ['2224'],
++        action => 'accept',
++      }
++    }
++    Service['pcsd'] ->
++    # we have more fragile when-to-start pacemaker conditions with pcsd
++    exec {"enable-not-start-$cluster_name":
++      command => "/usr/sbin/pcs cluster enable"
++    }
++    ->
+     exec {"Set password for hacluster user on $cluster_name":
+-      command => "/bin/echo CHANGEME | /usr/bin/passwd --stdin hacluster",
++      command => "/bin/echo ${::pacemaker::hacluster_pwd} | /usr/bin/passwd --stdin hacluster",
+       creates => "/etc/cluster/cluster.conf",
+       require => Class["::pacemaker::install"],
+     }
++    ->
++    exec {"auth-successful-across-all-nodes":
++      command => "/usr/sbin/pcs cluster auth $cluster_members -u hacluster -p ${::pacemaker::hacluster_pwd} --force",
++      timeout   => 3600,
++      tries     => 360,
++      try_sleep => 10,
++    }
++    ->
++    Exec["wait-for-settle"]
++  }
+ 
++  if $setup_cluster {
+     exec {"Create Cluster $cluster_name":
+       creates => "/etc/cluster/cluster.conf",
+       command => "/usr/sbin/pcs cluster setup --name $cluster_name $cluster_members",
++      unless => "/usr/bin/test -f /etc/corosync/corosync.conf",
+       require => Class["::pacemaker::install"],
+     }
+-
++    ->
+     exec {"Start Cluster $cluster_name":
+-      unless => "/usr/sbin/pcs status > /dev/null 2>&1",
+-      command => "/usr/sbin/pcs cluster start",
++      unless => "/usr/sbin/pcs status >/dev/null 2>&1",
++      command => "/usr/sbin/pcs cluster start --all",
+       require => Exec["Create Cluster $cluster_name"],
+     }
+-
+-    exec {"wait-for-settle":
+-      timeout   => 3600,
+-      tries     => 360,
+-      try_sleep => 10,
+-      command   => "/usr/sbin/pcs status | grep -q 'partition with quorum' > /dev/null 2>&1",
+-      unless    => "/usr/sbin/pcs status | grep -q 'partition with quorum' > /dev/null 2>&1",
+-      require   => Exec["Start Cluster $cluster_name"],
+-      notify    => Notify["pacemaker settled"],
++    if $pcsd_mode {
++      Exec["auth-successful-across-all-nodes"] ->
++        Exec["Create Cluster $cluster_name"]
+     }
++    Exec["Start Cluster $cluster_name"] ->
++      Exec["wait-for-settle"]
++  }
+ 
+-    notify {"pacemaker settled":
+-      message => "Pacemaker has reported quorum achieved",
+-    }
++  exec {"wait-for-settle":
++    timeout   => $settle_timeout,
++    tries     => $settle_tries,
++    try_sleep => $settle_try_sleep,
++    command   => "/usr/sbin/pcs status | grep -q 'partition with quorum' > /dev/null 2>&1",
++    unless    => "/usr/sbin/pcs status | grep -q 'partition with quorum' > /dev/null 2>&1",
++    notify    => Notify["pacemaker settled"],
++  }
++
++  notify {"pacemaker settled":
++    message => "Pacemaker has reported quorum achieved",
++  }
+ }
diff --git a/openstack-puppet-modules.spec b/openstack-puppet-modules.spec
index d9800f9..9ab769a 100644
--- a/openstack-puppet-modules.spec
+++ b/openstack-puppet-modules.spec
@@ -23,6 +23,7 @@ Patch0011: 0011-glance-Replace-qpid_host-with-qpid_hostname.patch
 Patch0012: 0012-glance-Add-parameter-qpid_protocol-to-notify-qpid-so.patch
 Patch0013: 0013-glance-Revert-Explicitly-set-default-notifier-strate.patch
 Patch0014: 0014-neutron-Disable-report_interval-and-agent_down_time-.patch
+Patch0015: 0015-pacemaker-corosync-Grab-correct-hacluster-password.patch
 
 BuildArch:      noarch
 Requires:       rubygem-json
@@ -49,6 +50,7 @@ OpenStack via installers using Puppet configuration tool.
 %patch0012 -p1
 %patch0013 -p1
 %patch0014 -p1
+%patch0015 -p1
 
 find %{_builddir}/%{name}-%{version}/ -type f -name ".*" -exec rm {} +
 find %{_builddir}/%{name}-%{version}/ -size 0 -exec rm {} +
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/openstack-puppet-modules.git/commit/?h=f20&id=628e79315062898a2087a85b3f13f0fd5f68931a


More information about the scm-commits mailing list