summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Zuckerman <me@louiszuckerman.com>2011-07-29 18:03:41 -0400
committerAnand Avati <avati@gluster.com>2011-08-03 23:10:47 -0700
commit4b640273b05dec6923c13d14d4d40e136e2df99f (patch)
tree6a1ff89a2c6a279d6765649b3246d0fb61ff7206
parent3780881e1bc4387f55e065508fb8fad371fc2b51 (diff)
Provides an upstart job for glusterd on Ubuntu, solving Bug 3282
Mounting from localhost in fstab fails at boot on ubuntu when glusterd is started by debian initscript. A new directory, extras/Ubuntu, contains the new upstart job (glusterd.conf) and a brief README.Ubuntu file. This makes the upstart job available to package maintainers like the SysV initscripts are in extras/init.d. This has been tested on Ubuntu 10.10 Maverick. Change-Id: I6ccd06054e920cd6dc45dba4eb8ab89aa30f8b47 BUG: 3282 Reviewed-on: http://review.gluster.com/126 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
-rw-r--r--extras/Ubuntu/README.Ubuntu20
-rw-r--r--extras/Ubuntu/glusterd.conf17
2 files changed, 37 insertions, 0 deletions
diff --git a/extras/Ubuntu/README.Ubuntu b/extras/Ubuntu/README.Ubuntu
new file mode 100644
index 00000000000..651bd046eff
--- /dev/null
+++ b/extras/Ubuntu/README.Ubuntu
@@ -0,0 +1,20 @@
+Bug 3282 - Mounting from localhost in fstab fails at boot on ubuntu
+(http://bugs.gluster.com/show_bug.cgi?id=3282)
+
+Ubuntu uses upstart instead of init to bootstrap the system and it has a unique
+way of handling fstab, using a program called mountall(8). As a result,
+glusterfs mounts in fstab are tried before the glusterd service is running. In
+the case where the client is also a server and the volume is mounted from
+localhost, the mount fails at boot time. An upstart job for glusterd is needed
+to correct this.
+
+The glusterd.conf file contains the necessary configuration for upstart to
+manage the glusterd service. It should be placed in /etc/init/glusterd.conf
+on Ubuntu systems, and then the old initscript /etc/init.d/glusterd can be
+removed.
+
+It can also be added to Ubuntu deb packages by placing it in debian/upstart
+inside the source package (or debian/glusterd.upstart if the source package
+builds multiple binary packages.)
+
+This affects all versions of glusterfs on the ubuntu platform.
diff --git a/extras/Ubuntu/glusterd.conf b/extras/Ubuntu/glusterd.conf
new file mode 100644
index 00000000000..b987ffa1322
--- /dev/null
+++ b/extras/Ubuntu/glusterd.conf
@@ -0,0 +1,17 @@
+# glusterd service upstart job
+#
+# Author: Louis Zuckerman <me@louiszuckerman.com>
+
+description "GlusterFS Management Daemon"
+
+start on (local-filesystems and net-device-up IFACE=lo and net-device-up IFACE=eth0) or (mounting TYPE=glusterfs)
+stop on runlevel [016]
+
+respawn
+
+exec /usr/sbin/glusterd -N -p /var/run/glusterd.pid
+
+post-start script
+ sleep 1
+end script
+