From 727830bfffb5932078f756eb3633c012a721f3d5 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 30 Aug 2007 14:21:59 +0000
Subject: [PATCH] More updates to the installation tutorial.

Changes:
  - add note about installing the cron job
  - add an example cron job file and modify top-level Makefile.am to put
    it into the archive
  - modify the tutorial with information about setting a reasonable
    number of minors for DRBD
  - add note about installing on 32-bit the xen libc

Reviewed-by: imsnah
---
 Makefile.am               |  2 +-
 docs/examples/ganeti.cron |  2 ++
 docs/install.sgml         | 24 +++++++++++++++++++++---
 3 files changed, 24 insertions(+), 4 deletions(-)
 create mode 100644 docs/examples/ganeti.cron

diff --git a/Makefile.am b/Makefile.am
index def0e725f..d91b08322 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 # standard automake rules
 
 SUBDIRS = man lib scripts daemons docs testing tools
-EXTRA_DIST = docs/examples/ganeti.initd
+EXTRA_DIST = docs/examples/ganeti.initd docs/examples/ganeti.cron
 
 # custom rules
 depgraph: depgraph.png
diff --git a/docs/examples/ganeti.cron b/docs/examples/ganeti.cron
new file mode 100644
index 000000000..f6ed2416b
--- /dev/null
+++ b/docs/examples/ganeti.cron
@@ -0,0 +1,2 @@
+# restart failed instances
+*/5 * * * * root /usr/local/sbin/ganeti-watcher
diff --git a/docs/install.sgml b/docs/install.sgml
index 250ec328a..134f28c1b 100644
--- a/docs/install.sgml
+++ b/docs/install.sgml
@@ -184,7 +184,11 @@
       <para>
         Under Debian Etch or Sarge+backports you can install the
         relevant <literal>xen-linux-system</literal> package, which
-        will pull in both the hypervisor and the relevant kernel.
+        will pull in both the hypervisor and the relevant
+        kernel. Also, if you are installing a 32-bit Etch, you should
+        install the <computeroutput>lib6-xen</computeroutput> package
+        (run <computeroutput>apt-get install
+        libc6-xen</computeroutput>).
       </para>
       </formalpara>
 
@@ -254,7 +258,10 @@ ln -s initrd.img-2.6.18-5-xen-686 initrd-2.6-xenU
         Ganeti will do it for you for every instance you set up.  If
         you have the DRBD utils installed and the module in your
         kernel you're fine. Please check that your system is
-        configured to load the module at every boot.
+        configured to load the module at every boot, and that it
+        passes the following option to the module:
+        <computeroutput>minor_count=64</computeroutput> (this will
+        allow you to use up to 32 instances per node).
       </para>
 
       <formalpara><title>Debian</title>
@@ -269,7 +276,8 @@ ln -s initrd.img-2.6.18-5-xen-686 initrd-2.6-xenU
 apt-get install drbd0.7-module-source drbd0.7-utils
 m-a update
 m-a a-i drbd0.7
-modprobe drbd
+echo drbd minor_count=64 >> /etc/modules
+modprobe drbd minor_count=64
       </screen>
 
     </sect2>
@@ -498,6 +506,16 @@ mkdir /srv/ganeti/ /srv/ganeti/os /srv/ganeti/export
       </para>
       <screen>update-rc.d ganeti defaults 20 80</screen>
 
+      <para>
+        In order to automatically restart failed instances, you need
+        to setup a cron job run the
+        <computeroutput>ganeti-watcher</computeroutput> program. A
+        sample cron file is provided in the source at
+        <filename>docs/examples/ganeti.cron</filename> and you can
+        copy that (eventually altering the path) to
+        <filename>/etc/cron.d/ganeti</filename>
+      </para>
+
     </sect2>
 
     <sect2>
-- 
GitLab