In invirt-cluster-config: 0.0.12
authorEvan Broder <broder@mit.edu>
Wed, 27 Jan 2010 02:19:36 +0000 (21:19 -0500)
committerEvan Broder <broder@mit.edu>
Wed, 27 Jan 2010 02:19:36 +0000 (21:19 -0500)
  * Use openais for clustering instead of cman!

svn path=/trunk/packages/invirt-cluster-config/; revision=2927

cluster.conf.mako [deleted file]
debian/changelog
debian/control
debian/corosync.conf.invirt.mako [new file with mode: 0644]
debian/corosync.invirt [new file with mode: 0644]
debian/invirt-cluster-config.install
debian/rules

diff --git a/cluster.conf.mako b/cluster.conf.mako
deleted file mode 100644 (file)
index e5b5c87..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<%
-from invirt.config import structs as cfg
-%>\
-<?xml version="1.0"?>
-<cluster name="invirt" config_version="2">
-% if len(cfg.hosts) == 2:
-  <cman two_node="1" expected_votes="1" />
-% else:
-  <cman />
-% endif
-  <clusternodes>
-% for id, host in enumerate(cfg.hosts):
-    <clusternode name="${host.hostname.split('.')[0]}-internal" nodeid="${id + 1}">
-      <fence>
-        <method name="single">
-          <device name="human" nodename="${host.hostname.split('.')[0]}-internal"/>
-        </method>
-      </fence>
-    </clusternode>
-% endfor
-  </clusternodes>
-  <fencedevices>
-    <fencedevice name="human" agent="fence_manual"/>
-  </fencedevices>
-</cluster>
index e2fead3..49d4f5e 100644 (file)
@@ -2,8 +2,9 @@ invirt-cluster-config (0.0.12) unstable; urgency=low
 
   * Use LVM's built-in cluster locking instead of a separate locking
     library - this is the behavior prefered by modern LVM.
 
   * Use LVM's built-in cluster locking instead of a separate locking
     library - this is the behavior prefered by modern LVM.
+  * Use openais for clustering instead of cman!
 
 
- -- Evan Broder <broder@mit.edu>  Tue, 26 Jan 2010 20:33:32 -0500
+ -- Evan Broder <broder@mit.edu>  Tue, 26 Jan 2010 21:14:14 -0500
 
 invirt-cluster-config (0.0.11) unstable; urgency=low
 
 
 invirt-cluster-config (0.0.11) unstable; urgency=low
 
index d807082..6abeb92 100644 (file)
@@ -8,9 +8,9 @@ Standards-Version: 3.8.0
 Package: invirt-cluster-config
 Architecture: all
 Depends: ${shlibs:Depends}, ${misc:Depends}, invirt-base,
 Package: invirt-cluster-config
 Architecture: all
 Depends: ${shlibs:Depends}, ${misc:Depends}, invirt-base,
- cman, clvm
+ corosync, invirt-openais | openais (>> 1.1.2), clvm
 Provides: ${diverted-files}
 Conflicts: ${diverted-files}
 Description: Cluster configuration for the Invirt project
  This package should be installed on all Invirt host machines to
 Provides: ${diverted-files}
 Conflicts: ${diverted-files}
 Description: Cluster configuration for the Invirt project
  This package should be installed on all Invirt host machines to
- configure Redhat Clustering and clustering LVM
+ configure OpenAIS clustering and clustering LVM
diff --git a/debian/corosync.conf.invirt.mako b/debian/corosync.conf.invirt.mako
new file mode 100644 (file)
index 0000000..4cdffb4
--- /dev/null
@@ -0,0 +1,33 @@
+<%
+from invirt.config import structs as cfg
+ring = 0
+%>\
+compatibility: whitetank
+
+totem {
+       version: 2
+       secauth: off
+% if len(cfg.cluster.rings) > 1:
+       rrp_mode: passive
+% endif
+% for r in cfg.cluster.rings:
+       interface {
+               ringnumber: ${ring}
+               bindnetaddr: ${r.bind}
+               mcastaddr: ${r.mcast}
+               mcastport: ${r.port}
+       }
+<% ring += 1 %>\
+% endfor
+}
+
+logging {
+       to_syslog: yes
+       syslog_facility: daemon
+       timestamp: on
+       debug: off
+}
+
+amf {
+       mode: disabled
+}
diff --git a/debian/corosync.invirt b/debian/corosync.invirt
new file mode 100644 (file)
index 0000000..4145383
--- /dev/null
@@ -0,0 +1,5 @@
+# start corosync at boot [yes|no]
+START=yes
+
+# Use openais's clustering instead of corosync
+export COROSYNC_DEFAULT_CONFIG_IFACE="openaisserviceenableexperimental:corosync_parser"
index 31e3ea1..98379f4 100644 (file)
@@ -1 +1,2 @@
-cluster.conf.mako etc/cluster
+debian/corosync.conf.invirt.mako etc/corosync
+debian/corosync.invirt etc/default
index 4597cfa..c111e4a 100755 (executable)
@@ -3,6 +3,9 @@
 DEB_DIVERT_EXTENSION = .invirt
 DEB_TRANSFORM_FILES_invirt-cluster-config += \
        /etc/lvm/lvm.conf.invirt
 DEB_DIVERT_EXTENSION = .invirt
 DEB_TRANSFORM_FILES_invirt-cluster-config += \
        /etc/lvm/lvm.conf.invirt
+DEB_DIVERT_FILES_invirt-cluster-config += \
+       /etc/corosync/corosync.conf.invirt \
+       /etc/default/corosync
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/config-package.mk
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/config-package.mk