[Debian-ha-commits] [ocfs2-tools] 05/06: debian/tests: o2cb service startup

Valentin Vidic vvidic-guest at moszumanska.debian.org
Fri Jul 8 09:59:29 UTC 2016


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch master
in repository ocfs2-tools.

commit 638b6ba2c1019d800d0cb5005f5e6ea447850b5a
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Fri Jul 8 11:54:20 2016 +0200

    debian/tests: o2cb service startup
---
 debian/tests/control |  3 +++
 debian/tests/o2cb    | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..5a11a07
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Depends: ocfs2-tools
+Tests: o2cb
+Restrictions: needs-root, isolation-machine
diff --git a/debian/tests/o2cb b/debian/tests/o2cb
new file mode 100644
index 0000000..579d7b9
--- /dev/null
+++ b/debian/tests/o2cb
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+cleanup () {
+  service o2cb stop
+}
+
+trap "cleanup" 0 2 3 15
+
+# configure cluster
+cat >/etc/ocfs2/cluster.conf <<EOF
+node:
+        ip_port = 7777
+        ip_address = 127.0.0.1
+        number = 0
+        name = localhost
+        cluster = ocfs2
+
+cluster:
+        node_count = 1
+        name = ocfs2
+EOF
+
+sed -i -e 's/^O2CB_ENABLED=.*/O2CB_ENABLED=true/' /etc/default/o2cb
+
+# start cluster
+service o2cb restart
+
+# check cluster
+grep '^ocfs2_dlmfs /dlm' /proc/mounts
+lsmod | grep ocfs2_stack_o2cb
+pgrep -a o2hbmonitor

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/ocfs2-tools.git



More information about the Debian-HA-Commits mailing list