Update the command line scripts man pages for 2.0
authorIustin Pop <iustin@google.com>
Thu, 12 Feb 2009 17:05:08 +0000 (17:05 +0000)
committerIustin Pop <iustin@google.com>
Thu, 12 Feb 2009 17:05:08 +0000 (17:05 +0000)
This patch updates the gnt-* scripts to show the new 2.0 syntax. It's
not guaranteed to be 80% complete.

Reviewed-by: ultrotter

Makefile.am
man/footer.sgml
man/ganeti.sgml
man/gnt-backup.sgml
man/gnt-cluster.sgml
man/gnt-debug.sgml [new file with mode: 0644]
man/gnt-instance.sgml
man/gnt-job.sgml [new file with mode: 0644]
man/gnt-node.sgml
man/gnt-os.sgml

index 7d7dcbd..ddbce67 100644 (file)
@@ -186,7 +186,9 @@ man_MANS = \
        man/ganeti-watcher.8 \
        man/gnt-backup.8 \
        man/gnt-cluster.8 \
+       man/gnt-debug.8 \
        man/gnt-instance.8 \
+       man/gnt-job.8 \
        man/gnt-node.8 \
        man/gnt-os.8
 
@@ -309,6 +311,7 @@ $(REPLACE_VARS_SED): Makefile stamp-directories
          echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
          echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
          echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
+         echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
          echo '/@INCLUDE_RAPI_RESOURCES@/ {'; \
          echo '  r $(abs_top_builddir)/doc/rapi-resources.sgml'; \
          echo '  d'; \
index afd0d95..7058273 100644 (file)
         <manvolnum>8</manvolnum>
       </citerefentry> (cluster-wide commands),
       <citerefentry>
+        <refentrytitle>gnt-job</refentrytitle>
+        <manvolnum>8</manvolnum>
+      </citerefentry> (job-related commands),
+      <citerefentry>
         <refentrytitle>gnt-node</refentrytitle>
         <manvolnum>8</manvolnum>
       </citerefentry> (node-related commands),
       <citerefentry>
         <refentrytitle>gnt-backup</refentrytitle>
         <manvolnum>8</manvolnum>
-      </citerefentry> (instance import/export commands).
+      </citerefentry> (instance import/export commands),
+      <citerefentry>
+        <refentrytitle>gnt-debug</refentrytitle>
+        <manvolnum>8</manvolnum>
+      </citerefentry> (debug commands).
     </para>
 
     <para>Ganeti daemons:
index 40c6c77..9a5ddd0 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>June 16, 2007</date>">
+  <!ENTITY dhdate      "<date>February 12, 2009</date>">
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>7</manvolnum>">
@@ -20,6 +20,8 @@
     <copyright>
       <year>2006</year>
       <year>2007</year>
+      <year>2008</year>
+      <year>2009</year>
       <holder>Google Inc.</holder>
     </copyright>
     &dhdate;
@@ -28,7 +30,7 @@
     &dhucpackage;
 
     &dhsection;
-    <refmiscinfo>ganeti 1.2</refmiscinfo>
+    <refmiscinfo>ganeti 2.0</refmiscinfo>
   </refmeta>
   <refnamediv>
     <refname>&dhpackage;</refname>
@@ -40,8 +42,8 @@
     <screen>
 # gnt-cluster init cluster1.example.com
 # gnt-node add node2.example.com
-# gnt-os add -o debian-etch -p /srv/ganeti/os/debian-etch
-# gnt-instance add -n node2.example.com -o debian-etch -s 128 -m 8 \
+# gnt-instance add -n node2.example.com \
+&gt; -o debootstrap --disk 0:size=30g \
 &gt; -t plain instance1.example.com
     </screen>
   </refsynopsisdiv>
@@ -51,7 +53,8 @@
     <para>
       The ganeti software manages physical nodes and virtual instances
       of a cluster based on a virtualization software. The current
-      version (1.2) supports Xen 3.0 (also tested with 3.1).
+      version (2.0) supports Xen 3.0 (also tested with 3.1) and KVM
+      hypervisors.
     </para>
 
   </refsect1>
@@ -62,7 +65,7 @@
       First you must install the software on all the cluster nodes,
       either from sources or (if available) from a package. The next
       step is to create the initial cluster configuration, using
-      <computeroutput>gnt-cluster init</computeroutput>.
+      <userinput>gnt-cluster init</userinput>.
     </para>
 
     <para>
 
   </refsect1>
 
+  <refsect1>
+    <title>Cluster architecture</title>
+
+    <para>
+      In Ganeti 2.0, the architecture of the cluster is a little more
+      complicated than in 1.2. The cluster is coordinated by a master
+      daemon (<citerefentry>
+      <refentrytitle>ganeti-masterd</refentrytitle>
+      <manvolnum>8</manvolnum> </citerefentry>), running on the master
+      node. Each node runs (as before) a node daemon, and the master
+      has the <acronym>RAPI</acronym> daemon running too.
+    </para>
+
+    <refsect2>
+      <title>Node roles</title>
+
+      <para>Each node can be in one of the following states:
+        <variablelist>
+          <varlistentry>
+            <term>master_candidate</term>
+            <listitem>
+              <para>The node receives the full cluster configuration
+              (configuration file and jobs) and can become a master
+              via the <command>gnt-cluster masterfailover</command>
+              command. Nodes that are not in this state cannot
+              transition into the master role due to missing
+              state.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>regular</term>
+            <listitem>
+              <para>This the normal state of a node.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>drained</term>
+            <listitem>
+              <para>Nodes in this state are functioning normally but
+              cannot receive new instance, because the intention is to
+              set them to <emphasis>offline</emphasis> or remove them
+              from the cluster.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>offline</term>
+            <listitem>
+              <para>These nodes are still recorder in the ganeti
+              configuration, but except for the master daemon startup
+              voting procedure, they are not actually contacted by the
+              master. This state was added in order to allow broken
+              machines (that are being repaired) to remain in the
+              cluster but without creating problems.</para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>Cluster configuration</title>
+
+      <para>The master node keeps and is responsible for the cluster
+      configuration. On the filesystem, this is stored under the
+      <filename
+      class="directory">@LOCALSTATEDIR@/ganeti/lib</filename>
+      directory, and if the master daemon is stopped it can be backed
+      up normally.</para>
+
+      <para>The master daemon will replicate the configuration
+      database called <filename>config.data</filename> and the job
+      files to all the nodes in the master candidate role. It will
+      also distribute a copy of some configuration values via the
+      <emphasis>ssconf</emphasis> files, which are stored in the same
+      directory and start with <filename>ssconf_</filename> prefix, to
+      all nodes.</para>
+
+    </refsect2>
+
+    <refsect2>
+      <title>Jobs</title>
+
+      <para>
+        All cluster modification are done via jobs. A job consists of
+        one or more opcodes, and the list of opcodes is processed
+        serially. If an opcode fails, the entire job is failed and
+        later opcodes are no longer processed. A job can be in one of
+        the following states:
+        <variablelist>
+          <varlistentry>
+            <term>queued</term>
+            <listitem>
+              <simpara>The job has been submitted but not yet
+              processed by the master daemon.</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>waiting</term>
+            <listitem>
+              <simpara>The job is waiting for for locks before the
+              first of its opcodes.</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>canceling</term>
+            <listitem>
+              <para>The jos is waiting for locks, but is has been
+              marked for cancelation. It will not transition to
+              <emphasis>running</emphasis>, but to
+              <emphasis>canceled</emphasis>.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>running</term>
+            <listitem>
+              <simpara>The job is currently being executed.</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>canceled</term>
+            <listitem>
+              <para>The job has been canceled before starting
+              execution.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>success</term>
+            <listitem>
+              <para>The job has finished successfully.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>error</term>
+            <listitem>
+              <para>The job has failed during runtime, or the master
+              daemon has been stopped during the job execution.</para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </para>
+    </refsect2>
+  </refsect1>
+
   &footer;
 
 </refentry>
index b9d6304..fec4091 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>Jul 6, 2007</date>">
+  <!ENTITY dhdate      "<date>February 11, 2009</date>">
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
@@ -19,6 +19,8 @@
   <refentryinfo>
     <copyright>
       <year>2007</year>
+      <year>2008</year>
+      <year>2009</year>
       <holder>Google Inc.</holder>
     </copyright>
     &dhdate;
@@ -27,7 +29,7 @@
     &dhucpackage;
 
     &dhsection;
-    <refmiscinfo>ganeti 1.2</refmiscinfo>
+    <refmiscinfo>ganeti 2.0</refmiscinfo>
   </refmeta>
   <refnamediv>
     <refname>&dhpackage;</refname>
       <title>IMPORT</title>
       <cmdsynopsis>
         <command>import</command>
-
+        <sbr>
         <group choice="req">
-          <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
-          <arg>--iallocator <replaceable>name</replaceable></arg>
+          <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg> <arg>--iallocator
+          <replaceable>name</replaceable></arg>
         </group>
         <sbr>
 
-        <arg>-s <replaceable>disksize</replaceable></arg>
-        <arg>--swap-size <replaceable>disksize</replaceable></arg>
-        <arg>-m <replaceable>memsize</replaceable></arg>
+        <arg rep="repeat">--disk <replaceable>N</replaceable>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg>
         <sbr>
-
-        <arg>-b <replaceable>bridge</replaceable></arg>
-        <arg>--mac <replaceable>mac</replaceable></arg>
+        <group>
+          <arg rep="repeat">--net <replaceable>N</replaceable><arg rep="repeat">:options</arg></arg>
+          <arg>--no-nics</arg>
+        </group>
+        <sbr>
+        <arg>-B <replaceable>BEPARAMS</replaceable></arg>
+        <sbr>
+        <arg>-H <replaceable>HYPERVISOR</replaceable><arg>:<arg choice="plain" rep="repeat">option=<replaceable>value</replaceable></arg></arg></arg>
         <sbr>
-        <arg choice="req">--src-node=<replaceable>source-node</replaceable></arg>
-        <arg choice="req">--src-dir=<replaceable>source-dir</replaceable></arg>
+        <arg>--src-node=<replaceable>source-node</replaceable></arg>
+        <arg>--src-dir=<replaceable>source-dir</replaceable></arg>
         <sbr>
 
         <arg choice="req">-t<group>
             <arg>diskless</arg>
             <arg>plain</arg>
             <arg>drbd</arg>
+            <arg>file</arg>
           </group></arg>
         <sbr>
 
         Imports a new instance from an export residing on
         <replaceable>source-node</replaceable> in
         <replaceable>source-dir</replaceable>.
-        <replaceable>instance</replaceable> must be in DNS and
-        resolve to a IP in the same network as the nodes in the
-        cluster.
+        <replaceable>instance</replaceable> must be in DNS and resolve
+        to a IP in the same network as the nodes in the cluster. If
+        the source node and directory are not passed, the last backup
+        in the cluster is used, as visible with the
+        <command>list</command> command.
       </para>
 
       <para>
-        The <option>-s</option> option specifies the disk size for
-        the instance, in mebibytes (defaults to
-        <constant>20480MiB</constant> =
-        <constant>20GiB</constant>). You can also use one of the
-        suffixes <literal>m</literal>, <literal>g</literal> or
+        The <option>disk</option> option specifies the parameters for
+        the disks of the instance. The numbering of disks starts at
+        zero, and at least one disk needs to be passed. For each disk,
+        at least the size needs to be given, and optionally the access
+        mode (read-only or the default of read-write) can also be
+        specified.  The size is interpreted (when no unit is given) in
+        mebibytes. You can also use one of the suffixes
+        <literal>m</literal>, <literal>g</literal> or
         <literal>t</literal> to specificy the exact the units used;
         these suffixes map to mebibytes, gibibytes and tebibytes.
       </para>
 
       <para>
-        The <option>--swap-size</option> option specifies the swap
-        disk size (in mebibytes) for the instance (the one presented
-        as <filename class="devicefile">/dev/sdb</filename>). The
-        default is <constant>4096MiB</constant>. As for the disk
-        size, you can specify other suffixes.
+        The minimum disk specification is therefore <userinput>--disk
+        0:size=20G</userinput>, and a three-disk instance can be
+        specified as <userinput>--disk 0:size=20G --disk 1:size=4G
+        --disk 2:size=100G</userinput>.
       </para>
 
       <para>
-        The <option>-m</option> option specifies the memory size for
-        the instance, in mebibytes (defaults to 128 MiB). Again, you
-        can use other suffixes (e.g. <userinput>2g</userinput>).
+        The NICs of the instances can be specified via the
+        <option>--nic</option> option. By default, one NIC is created
+        for the instance, with the MAC set to the original MAC of the
+        instance (as it was at export time). Each NIC can take up to
+        three parameters (all optional):
+        <variablelist>
+          <varlistentry>
+            <term>mac</term>
+            <listitem>
+              <simpara>either a value or <constant>GENERATE</constant>
+              to generate a new unique MAC, or
+              <constant>AUTO</constant> to reuse the old MAC</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>ip</term>
+            <listitem>
+              <simpara>specifies the IP address assigned to the
+              instance from the Ganeti side (this is not necessarily
+              what the instance will use, but what the node expects
+              the instance to use)</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>bridge</term>
+            <listitem>
+              <simpara>specifies the bridge to attach this NIC
+              to</simpara>
+            </listitem>
+          </varlistentry>
+        </variablelist>
       </para>
 
       <para>
-        The <option>-b</option> option specifies the bridge to which the
-        instance will be connected. (defaults to the cluster-wide default
-        bridge specified at cluster intialization time).
+        Alternatively, if no network is desired for the instance, you
+        can prevent the default of one NIC with the
+        <option>--no-nics</option> option.
       </para>
 
       <para>
-       The <option>--mac</option> option specifies the mac address for the
-       instance. The default is 'auto' which is reusing the previous mac
-       address if the instance is being imported with the same name, and
-       generating a new one otherwise. You can also force generation by
-       specifying 'generate'.
+        The <option>-B</option> option specifies the backend
+        parameters for the instance. If no such parameters are
+        specified, the values are inherited from the cluster. Possible
+        parameters are:
+        <variablelist>
+          <varlistentry>
+            <term>memory</term>
+            <listitem>
+              <simpara>the memory size of the instance; as usual,
+              suffixes can be used to denote the unit, otherwise the
+              value is taken in mebibites</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>vcpus</term>
+            <listitem>
+              <simpara>the number of VCPUs to assign to the instance
+              (if this value makes sense for the hypervisor)</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>auto_balance</term>
+            <listitem>
+              <simpara>whether the instance is considered in the N+1
+              cluster checks (enough redundancy in the cluster to
+              survive a node failure)</simpara>
+            </listitem>
+          </varlistentry>
+        </variablelist>
       </para>
 
       <para>
               </para>
             </listitem>
           </varlistentry>
+          <varlistentry>
+            <term>file</term>
+            <listitem>
+              <para>Disk devices will be backed up by files, under the
+              <filename
+              class="directory">@RPL_FILE_STORAGE_DIR@</filename>. By
+              default, each instance will get a directory (as its own
+              name) under this path, and each disk is stored as
+              individual files in this (instance-specific)
+              directory.</para>
+            </listitem>
+          </varlistentry>
         </variablelist>
       </para>
 
 
       <para>
         The optional second value of the <option>--node</option> is used for
-        the remote raid template type and specifies the remote node.
+        the drbd template and specifies the remote node.
       </para>
 
       <para>
       <para>
         Example:
         <screen>
-# gnt-backup import -t plain -s 30 -m 512 -n node1.example.com \
-> --src-node=node2.example.com \
-> --src-dir=/srv/ganeti/export/instance3.example.com \
+# gnt-backup import -t plain --disk 0:size=1G -B memory=512 \
+> -n node1.example.com \
 > instance3.example.com
         </screen>
       </para>
 </screen>
     </refsect2>
 
+    <refsect2>
+      <title>REMOVE</title>
+      <cmdsynopsis>
+        <command>remove</command>
+        <arg choice="req">instance_name</arg>
+      </cmdsynopsis>
+
+      <para>
+        Removes the backup for the given instance name, if any. If the
+        backup was for a deleted instances, it is needed to pass the
+        <acronym>FQDN</acronym> of the instance, and not only the
+        short hostname.
+      </para>
+
+    </refsect2>
+
   </refsect1>
 
   &footer;
index cdeb501..17fc206 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>December 12, 2007</date>">
+  <!ENTITY dhdate      "<date>February 12, 2009</date>">
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
@@ -20,6 +20,8 @@
     <copyright>
       <year>2006</year>
       <year>2007</year>
+      <year>2008</year>
+      <year>2009</year>
       <holder>Google Inc.</holder>
     </copyright>
     &dhdate;
@@ -28,7 +30,7 @@
     &dhucpackage;
 
     &dhsection;
-    <refmiscinfo>ganeti 1.2</refmiscinfo>
+    <refmiscinfo>ganeti 2.0</refmiscinfo>
   </refmeta>
   <refnamediv>
     <refname>&dhpackage;</refname>
         The command is executed serially on the selected nodes. If the
         master node is present in the list, the command will be
         executed last on the master. Regarding the other nodes, the
-        execution order is somewhat alphabetic (it's smarter so that
+        execution order is somewhat alphabetic, so that
         node2.example.com will be earlier than node10.example.com but
-        after node1.example.com).
+        after node1.example.com.
       </para>
 
       <para>
 
       <cmdsynopsis>
         <command>init</command>
+        <sbr>
         <arg>-s <replaceable>secondary_ip</replaceable></arg>
+        <sbr>
         <arg>-b <replaceable>bridge</replaceable></arg>
+        <sbr>
         <arg>-g <replaceable>vg-name</replaceable></arg>
+        <sbr>
         <arg>--master-netdev <replaceable>vg-name</replaceable></arg>
+        <sbr>
         <arg>-m <replaceable>mac-prefix</replaceable></arg>
+        <sbr>
         <arg>--no-lvm-storage</arg>
+        <sbr>
         <arg>--file-storage-dir <replaceable>dir</replaceable></arg>
+        <sbr>
         <arg>--enabled-hypervisors <replaceable>hypervisors</replaceable></arg>
+        <sbr>
         <arg>-t <replaceable>hypervisor name</replaceable></arg>
+        <sbr>
         <arg>--hypervisor-parameters <replaceable>hv-params</replaceable></arg>
+        <sbr>
         <arg>--backend-parameters <replaceable>be-params</replaceable></arg>
+        <sbr>
         <arg choice="req"><replaceable>clustername</replaceable></arg>
       </cmdsynopsis>
 
         to set default hypervisor specific parameters for the
         cluster. The format of this option is the name of the
         hypervisor, followed by a colon and a comma-separated list of
-        key=value pairs with the following keys:
-      </para>
-
-      <para>
-        <variablelist>
-          <varlistentry>
-            <term>xen-pvm</term>
-            <listitem>
-              <variablelist>
-                <varlistentry>
-                  <term>
-                    kernel_path
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets the path to the instance kernel, if not
-                      specified, the value /boot/vmlinuz-2.6-xenU will
-                      be used.
-                    </para>
-                  </listitem>
-                </varlistentry>
-                <varlistentry>
-                  <term>
-                    initrd_path
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets the path to the instance initrd, if not
-                      specified, no initrd will be used.
-                    </para>
-                  </listitem>
-                </varlistentry>
-              </variablelist>
-            </listitem>
-          </varlistentry>
-          <varlistentry>
-            <term>xen-hvm</term>
-            <listitem>
-              <variablelist>
-                <varlistentry>
-                  <term>
-                    boot_order
-                  </term>
-                  <listitem>
-                    <para>
-                      Boot device order for instances. Several single
-                      letter device entries can be combined together
-                      without a separator. If not specified, the value
-                      cd will be used. Available boot device entries are:
-                    <para>
-                      <variablelist>
-                        <varlistentry>
-                          <term>a</term>
-                          <listitem>
-                            <para>
-                              floppy drive
-                            </para>
-                          </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                          <term>c</term>
-                          <listitem>
-                            <para>
-                              hard disk
-                            </para>
-                          </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                          <term>d</term>
-                          <listitem>
-                            <para>
-                              CDROM drive
-                            </para>
-                          </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                          <term>n</term>
-                          <listitem>
-                            <para>
-                              network boot (PXE)
-                            </para>
-                          </listitem>
-                        </varlistentry>
-                      </variablelist>
-                  </listitem>
-                </varlistentry>
-                <varlistentry>
-                  <term>
-                    cdrom_image_path
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets the path to the file Xen uses to
-                      emulate a virtual CDROM drive for
-                      instances. Valid values are either an absolute
-                      path to an existing file or the value None,
-                      which disables virtual CDROM support. If not
-                      specified, the value None will be used.
-                    </para>
-                  </listitem>
-                </varlistentry>
-                <varlistentry>
-                  <term>
-                    nic_type
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets the NIC type Xen should use for this
-                      HVM instance. Valid choices are rtl8139,
-                      ne2k_pci, ne2k_isa and paravirtual. The
-                      paravirtual setting is intended for use with the
-                      GPL PV drivers inside HVM Windows instances. If
-                      not specified, the value rtl8139 will be used.
-                      </para>
-                  </listitem>
-                </varlistentry>
-                <varlistentry>
-                  <term>
-                      disk_type
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets the disk type Xen should use for the
-                      HVM instance. Valid choices are ioemu and
-                      paravirtual. The paravirtual setting is intended
-                      for use with the GPL PV drivers inside HVM
-                      Windows instances. If not specified, the value
-                      ioemu will be used.
-                      </para>
-                  </listitem>
-                </varlistentry>
-                <varlistentry>
-                  <term>
-                    vnc_bind_address
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets the address that the VNC listener for
-                      this instance should bind to. Valid  values
-                      are IPv4 addresses. Use the address 0.0.0.0 to
-                      bind to all available interfaces or specify the
-                      address of one of the interfaces on the node to
-                      restrict listening to that interface. If not
-                      specified, the value 0.0.0.0 will be used.
-                    </para>
-                  </listitem>
-                </varlistentry>
-                <varlistentry>
-                  <term>
-                    acpi
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets if Xen should enable ACPI support for
-                      HVM instances. Valid values are true or
-                      false. If not specified, the value true will be
-                      used.
-                    </para>
-                  </listitem>
-                </varlistentry>
-                <varlistentry>
-                  <term>
-                    pae
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets if Xen should enabled PAE support for
-                      this HVM instance. Valid values are true or
-                      false. If not specified, the value true will be
-                      used.
-                    </para>
-                  </listitem>
-                </varlistentry>
-              </variablelist>
-            </listitem>
-          </varlistentry>
-          <varlistentry>
-            <term>kvm</term>
-            <listitem>
-              <variablelist>
-                <varlistentry>
-                  <term>
-                    kernel_path
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets the path to the instance kernel, if not
-                      specified, the valee /boot/vmlinuz-2.6-xenU will
-                      be used.
-                    </para>
-                  </listitem>
-                </varlistentry>
-                <varlistentry>
-                  <term>
-                    initrd_path
-                  </term>
-                  <listitem>
-                    <para>
-                      Sets the path to the instance initrd, if not
-                      specified, no initrd will be used.
-                    </para>
-                  </listitem>
-                </varlistentry>
-              </variablelist>
-            </listitem>
-          </varlistentry>
-          <varlistentry>
-            <term>fake</term>
-            <listitem>
-              <para>
-                There are currently no parameters for the fake
-                hypervisor.
-              </para>
-            </listitem>
-          </varlistentry>
-        </variablelist>
+        key=value pairs. The keys available for each hypervisors are
+        detailed int the <citerefentry>
+        <refentrytitle>gnt-instance</refentrytitle>
+        <manvolnum>8</manvolnum> </citerefentry> man page, in the
+        <command>add</command> command.
       </para>
 
     </refsect2>
 
       <cmdsynopsis>
         <command>modify</command>
+        <sbr>
         <arg choice="opt">-g <replaceable>vg-name</replaceable></arg>
+        <sbr>
         <arg choice="opt">--no-lvm-storage</arg>
+        <sbr>
         <arg choice="opt">--enabled-hypervisors
         <replaceable>hypervisors</replaceable></arg>
+        <sbr>
         <arg choice="opt">--hypervisor-parameters
         <replaceable>hv-params</replaceable></arg>
+        <sbr>
         <arg choice="opt">--backend-parameters
         <replaceable>be-params</replaceable></arg>
+        <sbr>
+        <arg>-C <replaceable>candidate_pool_size</replaceable></arg>
 
       </cmdsynopsis>
 
           <option>--backend-parameters</option> options are
           described in the <command>init</command> command.
         </para>
+
+      <para>
+        The <option>-C</option> options specifies the
+        <varname>candidate_pool_size</varname> cluster parameter. This
+        is the number of nodes that the master will try to keep as
+        <literal>master_candidates</literal>. For more details about
+        this role and other node roles, see the <citerefentry>
+        <refentrytitle>ganeti</refentrytitle><manvolnum>7</manvolnum>
+        </citerefentry>. If you increase the size, the master will
+        automatically promote as many nodes as required and possible
+        to reach the intended number.
+      </para>
     </refsect2>
 
     <refsect2>
     </refsect2>
 
     <refsect2>
+      <title>redist-conf</title>
+      <cmdsynopsis>
+        <command>redist-conf</command>
+          <arg>--submit</arg>
+      </cmdsynopsis>
+
+      <para>
+        This command forces a full push of configuration files from
+        the master node to the other nodes in the cluster. This is
+        normally not needed, but can be run if the
+        <command>verify</command> complains about configuration
+        mismatches.
+      </para>
+
+      <para>
+        The <option>--submit</option> option is used to send the job
+        to the master daemon but not wait for its completion. The job
+        ID will be shown so that it can be examined via
+        <command>gnt-job info</command>.
+      </para>
+
+    </refsect2>
+    <refsect2>
       <title>REMOVE-TAGS</title>
 
       <cmdsynopsis>
diff --git a/man/gnt-debug.sgml b/man/gnt-debug.sgml
new file mode 100644 (file)
index 0000000..26639d5
--- /dev/null
@@ -0,0 +1,181 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>February 12, 2009</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhucpackage "<refentrytitle>gnt-debug</refentrytitle>">
+  <!ENTITY dhpackage   "gnt-debug">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+  <!ENTITY footer SYSTEM "footer.sgml">
+]>
+
+<refentry>
+  <refentryinfo>
+    <copyright>
+      <year>2006</year>
+      <year>2007</year>
+      <year>2008</year>
+      <year>2009</year>
+      <holder>Google Inc.</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+    <refmiscinfo>ganeti 2.0</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>debug commands</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage; </command>
+
+      <arg choice="req">command</arg>
+      <arg>arguments...</arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>
+      The <command>&dhpackage;</command> is used for debugging the
+      ganeti system.
+    </para>
+
+  </refsect1>
+  <refsect1>
+    <title>COMMANDS</title>
+
+    <refsect2>
+      <title>ALLOCATOR</title>
+
+      <cmdsynopsis>
+        <command>allocator</command>
+        <arg>--debug</arg>
+        <arg>--dir <replaceable>DIRECTION</replaceable></arg>
+        <arg choice="req">--algorithm <replaceable>ALLOCATOR</replaceable>
+        </arg>
+        <arg>--mode <replaceable>MODE</replaceable></arg>
+        <arg>--mem <replaceable>MEMORY</replaceable></arg>
+        <arg>--disks <replaceable>DISKS</replaceable></arg>
+        <arg>--disk-template <replaceable>TEMPLATE</replaceable></arg>
+        <arg>--nics <replaceable>NICS</replaceable></arg>
+        <arg>--os-type <replaceable>OS</replaceable></arg>
+        <arg>--vcpus <replaceable>VCPUS</replaceable></arg>
+        <arg>--tags <replaceable>TAGS</replaceable></arg>
+        <arg choice="req"><replaceable>instance</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        Executes a test run of the <emphasis>iallocator</emphasis> framework.
+      </para>
+
+      <para>
+        The command will build input for a given iallocator script
+        (named with the <option>--algorithm</option> option), and
+        either show this input data (if
+        <replaceable>DIRECTION</replaceable> is
+        <emphasis>in</emphasis>) or run the iallocator script and show
+        its output (if <replaceable>DIRECTION</replaceable> is
+        <emphasis>out</emphasis>).
+      </para>
+
+      <para>
+        If the <replaceable>MODE</replaceable> is
+        <emphasis>allocate</emphasis>, then an instance definition is
+        built from the other arguments and sent to the script,
+        otherwise (<replaceable>MODE</replaceable> is
+        <emphasis>relocate</emphasis>) an existing instance name must
+        be passed as the first argument.
+      </para>
+
+      <para>
+        This build of ganeti will look for iallocator scripts in the
+        following directories: <filename
+        class="directory">@CUSTOM_IALLOCATOR_SEARCH_PATH@</filename>;
+        for more details about this framework, see the HTML or PDF
+        documentation.
+      </para>
+
+    <refsect2>
+      <title>DELAY</title>
+
+      <cmdsynopsis>
+        <command>delay</command>
+        <arg>--debug</arg>
+        <arg>--no-master</arg>
+        <arg choice="opt" rep="repeat">-n <replaceable>NODE</replaceable></arg>
+        <arg choice="req"><replaceable>duration</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        Run a test opcode (a sleep) on the master (internally in the
+        command) and on selected nodes (via an RPC call). This server
+        no other purpose but to execute a test operation.
+      </para>
+
+      <para>
+        The <option>-n</option> option can be given multiple times to
+        select the nodes for the RPC call. By default, the delay will
+        also be executed on the master, unless the
+        <option>--no-master</option> option is passed.
+      </para>
+
+      <para>
+        The <replaceable>delay</replaceable> argument will be
+        interpreted as a floating point number.
+      </para>
+
+    </refsect2>
+
+    <refsect2>
+      <title>SUBMIT-JOB</title>
+
+      <cmdsynopsis>
+        <command>submit-job</command>
+
+        <arg choice="req">opcodes_file</arg>
+      </cmdsynopsis>
+
+      <para>
+        This command builds a list of opcodes from a JSON-format file
+        and submits them as a single job to the master daemon. It can
+        be used to test some options that are not available via the
+        command line.
+      </para>
+
+    </refsect2>
+
+  </refsect1>
+
+  &footer;
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
index e6d190e..c6c511c 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>May 29, 2008</date>">
+  <!ENTITY dhdate      "<date>February 11, 2009</date>">
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
@@ -21,6 +21,7 @@
       <year>2006</year>
       <year>2007</year>
       <year>2008</year>
+      <year>2009</year>
       <holder>Google Inc.</holder>
     </copyright>
     &dhdate;
@@ -29,7 +30,7 @@
     &dhucpackage;
 
     &dhsection;
-    <refmiscinfo>ganeti 1.2</refmiscinfo>
+    <refmiscinfo>ganeti 2.0</refmiscinfo>
   </refmeta>
   <refnamediv>
     <refname>&dhpackage;</refname>
         <title>ADD</title>
         <cmdsynopsis>
           <command>add</command>
-          <arg>-s <replaceable>disksize</replaceable></arg>
-          <arg>--swap-size <replaceable>disksize</replaceable></arg>
-          <arg>-m <replaceable>memsize</replaceable></arg>
           <sbr>
-
-          <arg>-b <replaceable>bridge</replaceable></arg>
-          <arg>--mac <replaceable>MAC-address</replaceable></arg>
-          <sbr>
-
-          <arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg>
-          <arg>--hvm-acpi <replaceable>ACPI-support</replaceable></arg>
-          <sbr>
-
-          <arg>--hvm-pae <replaceable>PAE-support</replaceable></arg>
-          <sbr>
-
-          <arg>--hvm-cdrom-image-path
-            <replaceable>cdrom-image-path</replaceable></arg>
+          <arg rep="repeat">--disk=<replaceable>N</replaceable>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg>
           <sbr>
-
-          <arg>--hvm-nic-type <replaceable>NICTYPE</replaceable></arg>
-          <sbr>
-
-          <arg>--hvm-disk-type
-          <replaceable>DISKTYPE</replaceable></arg>
-          <sbr>
-
-          <arg>--vnc-bind-address
-            <replaceable>vnc-bind-address</replaceable></arg>
+          <group>
+            <arg rep="repeat">--net=<replaceable>N</replaceable><arg rep="repeat">:options</arg></arg>
+            <arg>--no-nics</arg>
+          </group>
           <sbr>
-
-          <arg>--kernel<group choice="req">
-              <arg>default</arg>
-              <arg><replaceable>kernel_path</replaceable></arg>
-            </group></arg>
+          <arg>-B <replaceable>BEPARAMS</replaceable></arg>
           <sbr>
 
-          <arg>--initrd<group choice="req">
-              <arg>default</arg>
-              <arg>none</arg>
-              <arg><replaceable>initrd_path</replaceable></arg>
-            </group></arg>
+          <arg>-H <replaceable>HYPERVISOR</replaceable><arg>:<arg choice="plain" rep="repeat">option=<replaceable>value</replaceable></arg></arg></arg>
           <sbr>
 
           <arg>--file-storage-dir <replaceable>dir_path</replaceable></arg>
 
           <arg choice="req">-o <replaceable>os-type</replaceable></arg>
           <sbr>
+          <arg>--submit</arg>
+          <sbr>
 
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
         <para>
-          Creates a new instance on the specified
-          host. <replaceable>instance</replaceable> must be in DNS and
-          resolve to a IP in the same network as the nodes in the
-          cluster.
+          Creates a new instance on the specified host. The
+          <replaceable>instance</replaceable> argument must be in DNS,
+          but depending on the bridge setup, need not be in the same
+          network as the nodes in the cluster.
         </para>
 
         <para>
-          The <option>-s</option> option specifies the disk size for
-          the instance, in mebibytes (defaults to
-          <constant>20480MiB</constant> =
-          <constant>20GiB</constant>). You can also use one of the
-          suffixes <literal>m</literal>, <literal>g</literal> or
+          The <option>disk</option> option specifies the parameters
+          for the disks of the instance. The numbering of disks starts
+          at zero, and at least one disk needs to be passed. For each
+          disk, at least the size needs to be given, and optionally
+          the access mode (read-only or the default of read-write) can
+          also be specified.  The size is interpreted (when no unit is
+          given) in mebibytes. You can also use one of the suffixes
+          <literal>m</literal>, <literal>g</literal> or
           <literal>t</literal> to specificy the exact the units used;
           these suffixes map to mebibytes, gibibytes and tebibytes.
         </para>
 
         <para>
-          The <option>--swap-size</option> option specifies the swap
-          disk size (in mebibytes) for the instance (the one presented
-          as <filename class="devicefile">/dev/sdb</filename>). The
-          default is <constant>4096MiB</constant>. As for the disk
-          size, you can specify other suffixes.
+          The minimum disk specification is therefore
+          <userinput>--disk 0:size=20G</userinput>, and a three-disk
+          instance can be specified as <userinput>--disk 0:size=20G
+            --disk 1:size=4G --disk 2:size=100G</userinput>.
         </para>
 
         <para>
-          The <option>-m</option> option specifies the memory size for
-          the instance, in mebibytes (defaults to 128 MiB). Again, you
-          can use other suffixes (e.g. <userinput>2g</userinput>).
+          The NICs of the instances can be specified via the
+          <option>--nic</option> option. By default, one NIC is
+          created for the instance, with a random MAC, and connected
+          to the default bridge. Each NIC can take up to three
+          parameters (all optional):
+          <variablelist>
+            <varlistentry>
+              <term>mac</term>
+              <listitem>
+                <simpara>either a value or <constant>GENERATE</constant>
+                  to generate a new unique MAC</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>ip</term>
+              <listitem>
+                <simpara>specifies the IP address assigned to the
+                  instance from the Ganeti side (this is not necessarily
+                  what the instance will use, but what the node expects
+                  the instance to use)</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>bridge</term>
+              <listitem>
+                <simpara>specifies the bridge to attach this NIC
+                  to</simpara>
+              </listitem>
+            </varlistentry>
+          </variablelist>
         </para>
 
         <para>
-          The <option>-o</option> options specifies the operating
-          system to be installed. The available operating systems can
-          be listed with <command>gnt-os list</command>.
+          Alternatively, if no network is desired for the instance, you
+          can prevent the default of one NIC with the
+          <option>--no-nics</option> option.
         </para>
 
         <para>
-          The <option>-b</option> option specifies the bridge to which the
-          instance will be connected. (defaults to the cluster-wide default
-          bridge specified at cluster initialization time).
+          The <option>-o</option> options specifies the operating
+          system to be installed. The available operating systems can
+          be listed with <command>gnt-os list</command>.
         </para>
 
         <para>
-          The <option>--mac</option> option specifies the MAC address
-          of the ethernet interface for the instance. If this option
-          is not specified, a new MAC address is generated randomly with
-          the configured MAC prefix. The randomly generated MAC
-          address is guaranteed to be unique among the instances of
-          this cluster.
+          The <option>-B</option> option specifies the backend
+          parameters for the instance. If no such parameters are
+          specified, the values are inherited from the cluster. Possible
+          parameters are:
+          <variablelist>
+            <varlistentry>
+              <term>memory</term>
+              <listitem>
+                <simpara>the memory size of the instance; as usual,
+                  suffixes can be used to denote the unit, otherwise the
+                  value is taken in mebibites</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>vcpus</term>
+              <listitem>
+                <simpara>the number of VCPUs to assign to the instance
+                  (if this value makes sense for the hypervisor)</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>auto_balance</term>
+              <listitem>
+                <simpara>whether the instance is considered in the N+1
+                  cluster checks (enough redundancy in the cluster to
+                  survive a node failure)</simpara>
+              </listitem>
+            </varlistentry>
+          </variablelist>
         </para>
 
         <para>
-          The <option>--hvm-boot-order</option> option specifies the
-          boot device order for Xen HVM instances. The boot order is a
-          string of letters listing the boot devices, with valid
-          device letters being:
+          The <option>-H</option> option specified the hypervisor to
+          use for the instance (must be one of the enabled hypervisors
+          on the cluster) and optionally custom parameters for this
+          instance. If not other options are used (i.e. the invocation
+          is just <userinput>-H
+          <replaceable>NAME</replaceable></userinput>) the instance
+          will inherit the cluster options. The defaults below show
+          the cluster defaults at cluster creation time.
         </para>
 
         <para>
+          The possible hypervisor options are as follows:
           <variablelist>
             <varlistentry>
-              <term>a</term>
+              <term>boot_order</term>
               <listitem>
+                <simpara>Valid for the Xen HVM and KVM
+                hypervisors.</simpara>
+
+                <simpara>A string value denoting the boot order. This
+                has different meaning for the Xen HVM hypervisor and
+                for the KVM one.</simpara>
+
+                <simpara>
+                  For Xen HVM, The boot order is a string of letters
+                  listing the boot devices, with valid device letters
+                  being:
+                </simpara>
+                  <variablelist>
+                    <varlistentry>
+                      <term>a</term>
+                      <listitem>
+                        <para>
+                          floppy drive
+                        </para>
+                      </listitem>
+                    </varlistentry>
+                    <varlistentry>
+                      <term>c</term>
+                      <listitem>
+                        <para>
+                          hard disk
+                        </para>
+                      </listitem>
+                    </varlistentry>
+                    <varlistentry>
+                      <term>d</term>
+                      <listitem>
+                        <para>
+                          CDROM drive
+                        </para>
+                      </listitem>
+                    </varlistentry>
+                    <varlistentry>
+                      <term>n</term>
+                      <listitem>
+                        <para>
+                          network boot (PXE)
+                        </para>
+                      </listitem>
+                    </varlistentry>
+                  </variablelist>
+                <simpara>
+                  The default is not to set an HVM boot order which is
+                  interpreted as 'dc'.
+                </simpara>
+
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>cdrom_image_path</term>
+              <listitem>
+                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
+
+                <simpara>The path to a CDROM image to attach to the
+                instance.</simpara>
+
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic_type</term>
+              <listitem>
+                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
+
                 <para>
-                  floppy drive
+                  This parameter determines the way the network cards
+                  are presented to the instance. The possible options are:
+                  <simplelist>
+                    <member>rtl8139 (default for Xen HVM) (HVM & KVM)</member>
+                    <member>ne2k_isa (HVM & KVM)</member>
+                    <member>ne2k_pci (HVM & KVM)</member>
+                    <member>i82551 (KVM)</member>
+                    <member>i82557b (KVM)</member>
+                    <member>i82559er (KVM)</member>
+                    <member>pcnet (KVM)</member>
+                    <member>e1000 (KVM)</member>
+                    <member>paravirtual (default for KVM) (HVM & KVM)</member>
+                  </simplelist>
                 </para>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term>c</term>
+              <term>disk_type</term>
               <listitem>
+                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
+
                 <para>
-                  hard disk
+                  This parameter determines the way the disks are
+                  presented to the instance. The possible options are:
+                  <simplelist>
+                    <member>ioemu (default for HVM & KVM) (HVM & KVM)</member>
+                    <member>ide (HVM & KVM)</member>
+                    <member>scsi (KVM)</member>
+                    <member>sd (KVM)</member>
+                    <member>mtd (KVM)</member>
+                    <member>pflash (KVM)</member>
+                  </simplelist>
                 </para>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term>d</term>
+              <term>vnc_bind_address</term>
               <listitem>
+                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
+
+                <para>Specifies the address that the VNC listener for
+                this instance should bind to. Valid values are IPv4
+                addresses. Use the address 0.0.0.0 to bind to all
+                available interfaces (this is the default) or specify
+                the address of one of the interfaces on the node to
+                restrict listening to that interface.</para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>vnc_tls</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+
+                <simpara>A boolean option that controls whether the
+                VNC connection is secured with TLS.</simpara>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>vnc_x509_path</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+
+                <para>If <option>vnc_tls</option> is enabled, this
+                options specifies the path to the x509 certificate to
+                use.</para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>vnc_x509_verify</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>acpi</term>
+              <listitem>
+                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
+
                 <para>
-                  CDROM drive
+                  A boolean option that specifies if the hypervisor
+                  should enable ACPI support for this instance. By
+                  default, ACPI is disabled.
                 </para>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>n</term>
+              <term>pae</term>
               <listitem>
+                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
+
                 <para>
-                  network boot (PXE)
+                  A boolean option that specifies if the hypervisor
+                  should enabled PAE support for this instance. The
+                  default is false, disabling PAE support.
                 </para>
               </listitem>
             </varlistentry>
-          </variablelist>
-        </para>
 
-        <para>
-          The default is not to set an HVM boot order which is
-          interpreted as 'dc'. This option, like all options starting
-          with 'hvm', is only relevant for Xen HVM instances and
-          ignored by all other instance types.
-        </para>
+            <varlistentry>
+              <term>kernel_path</term>
+              <listitem>
+                <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
 
-        <para>
-          The <option>--hvm-acpi</option> option specifies if Xen
-          should enable ACPI support for this HVM instance. Valid
-          values are true or false. The default value is false,
-          disabling ACPI support for this instance.
-        </para>
+                <para>
+                  This option specifies the path (on the node) to the
+                  kernel to boot the instance with. Xen PVM instances
+                  always require this, while for KVM if this option is
+                  empty, it will cause the machine to load the kernel
+                  from its disks.
+                </para>
+              </listitem>
+            </varlistentry>
 
-        <para>
-          The <option>--hvm-pae</option> option specifies if Xen
-          should enabled PAE support for this HVM instance. Valid
-          values are true or false. The default is false, disabling
-          PAE support for this instance.
-        </para>
+            <varlistentry>
+              <term>initrd_path</term>
+              <listitem>
+                <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
 
-        <para>
-          The <option>--hvm-cdrom-image-path</option> option specifies the
-          path to the file Xen uses to emulate a virtual CDROM drive
-          for this HVM instance. Valid values are either an
-          absolute path to an existing file or None, which disables
-          virtual CDROM support for this instance. The default is
-          None, disabling virtual CDROM support.
-        </para>
+                <para>
+                  This option specifies the path (on the node) to the
+                  initrd to boot the instance with. Xen PVM instances
+                  can use this always, while for KVM if this option is
+                  only used if the <option>kernel_path</option> option
+                  is also specified.
+                </para>
+              </listitem>
+            </varlistentry>
 
-        <para>
-          The <option>--hvm-nic-type</option> specifies the NIC type
-          Xen should use for this HVM instance. Valid choices are
-          rtl8139, ne2k_pci, ne2k_isa and paravirtual with rtl8139
-          as the default. The paravirtual setting is intended for use
-          with the GPL PV drivers inside HVM Windows instances.
-        </para>
+            <varlistentry>
+              <term>root_path</term>
+              <listitem>
+                <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
 
-        <para>
-          The <option>--hvm-disk-type</option> specifies the disk type
-          Xen should use for the HVM instance. Valid choices are ioemu
-          and paravirtual with ioemu as the default. The paravirtual
-          setting is intended for use with the GPL PV drivers inside
-          HVM Windows instances.
+                <para>
+                  This options specifies the name of the root
+                  device. This is always needed for Xen PVM, while for
+                  KVM it is only used if the
+                  <option>kernel_path</option> option is also
+                  specified.
+                </para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>serial_console</term>
+              <listitem>
+                <simpara>Valid for the KVM hypervisor.</simpara>
+
+                <simpara>This boolean option specifies whether to
+                emulate a serial console for the instance.</simpara>
+              </listitem>
+            </varlistentry>
+          </variablelist>
         </para>
 
         <para>
-          The <option>--vnc-bind-address</option> option specifies the
-          address that the VNC listener for this instance should bind
-          to. Valid values are IPv4 addresses. Use the address 0.0.0.0
-          to bind to all available interfaces (this is the default)
-          or specify the address of one of the interfaces on the node
-          to restrict listening to that interface.
         </para>
 
         <para>
         </para>
 
         <para>
-          The <option>--kernel</option> option allows the instance to
-          use a custom kernel (if a filename is passed) or to use the
-          default kernel (<filename>@CUSTOM_XEN_KERNEL@</filename>), if the
-          string <constant>default</constant> is passed.
-        </para>
-
-        <para>
-          The <option>--initrd</option> option is similar: it allows
-          the instance to use a custom initrd (if a filename is
-          passed) or to use the default initrd
-          (<filename>@CUSTOM_XEN_INITRD@</filename>), if the string
-          <constant>default</constant> is passed, or to disable the
-          use of an initrd, if the string <constant>none</constant> is
-          passed. Note that in the case the instance is set to use the
-          default initrd and it doesn't exist, it will be silently
-          ignored; if the instance is set to use a custom initrd and
-          it doesn't exist, this will be treated as an error and will
-          prevent the startup of the instance.
-        </para>
-
-        <para>
           The <option>-t</option> options specifies the disk layout type for
           the instance. The available choices are:
           <variablelist>
             <varlistentry>
               <term>loop</term>
               <listitem>
-                <para>Kernel loopback driver.</para>
+                <para>
+                  Kernel loopback driver. This driver uses loopback
+                  devices to access the filesystem within the
+                  file. However, running I/O intensive applications in
+                  your instance using the loop driver might result in
+                  slowdowns.  Furthermore, if you use the loopback
+                  driver consider increasing the maximum amount of
+                  loopback devices (on most systems it's 8) using the
+                  max_loop param.
+                </para>
               </listitem>
             </varlistentry>
             <varlistentry>
               <term>blktap</term>
               <listitem>
-                <para>blktap driver.</para>
+                <para>The blktap driver (for Xen hypervisors). In
+                order to be able to use the blktap driver you should
+                check if the 'blktapctrl' user space disk agent is
+                running (usually automatically started via xend). This
+                user-level disk I/O interface has the advantage of
+                better performance. Especially if you use a network
+                file system (e.g. NFS) to store your instances this is
+                the recommended choice.
+                </para>
               </listitem>
             </varlistentry>
           </variablelist>
         </para>
 
         <para>
-          The loop driver uses loopback devices to access the filesystem
-          within the file. However, running I/O intensive applications
-          in your instance using the loop driver might result in slowdowns.
-          Furthermore, if you use the loopback driver consider increasing
-          the maximum amount of loopback devices (on most systems it's 8)
-          using the max_loop param.
-        </para>
-
-        <para>
-          In order to be able to use the blktap driver you should check
-          if the 'blktapctrl' user space disk agent is running (usually
-          automatically started via xend). This user-level disk I/O
-          interface has the advantage of better performance. Especially
-          if you use a network file system (e.g. NFS) to store your instances
-          this is the recommended choice.
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
         </para>
 
         <para>
           Example:
           <screen>
-# gnt-instance add -t file -s 30g -m 512 -o debian-etch \
+# gnt-instance add -t file --disk 0:size=30g -B memory=512 -o debian-etch \
   -n node1.example.com --file-storage-dir=mysubdir instance1.example.com
-# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \
+# gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \
   -n node1.example.com instance1.example.com
-# gnt-instance add -t drbd -s 30g -m 512 -o debian-etch \
+# gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \
   -n node1.example.com:node2.example.com instance2.example.com
           </screen>
         </para>
       </refsect3>
 
       <refsect3>
+        <title>BATCH-CREATE</title>
+        <cmdsynopsis>
+          <command>batch-create</command>
+          <arg choice="req">instances_file.json</arg>
+        </cmdsynopsis>
+
+        <para>
+          This command (similar to the Ganeti 1.2
+          <command>batcher</command> tool) submits multiple instance
+          creation jobs based on a definition file. The instance
+          configurations do not encompass all the possible options for
+          the <command>add</command> command, but only a subset.
+        </para>
+
+        <para>
+          The instance file should be a valid-formed JSON file,
+          containing a dictionary with instance name and instance
+          parameters. The accepted parameters are:
+
+          <variablelist>
+            <varlistentry>
+              <term>disk_size</term>
+              <listitem>
+                <simpara>The size of the disks of the instance.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>disk_templace</term>
+              <listitem>
+                <simpara>The disk template to use for the instance,
+                the same as in the <command>add</command>
+                command.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>backend</term>
+              <listitem>
+                <simpara>A dictionary of backend parameters.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>hypervisor</term>
+              <listitem>
+                <simpara>A dictionary with a single key (the
+                hypervisor name), and as value the hypervisor
+                options. If not passed, the default hypervisor and
+                hypervisor options will be inherited.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>mac, ip, bridge</term>
+              <listitem>
+                <simpara>Specifications for the one NIC that will be
+                created for the instance.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>primary_node, secondary_node</term>
+              <listitem>
+                <simpara>The primary and optionally the secondary node
+                to use for the instance (in case an iallocator script
+                is not used).</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>iallocator</term>
+              <listitem>
+                <simpara>Instead of specifying the nodes, an
+                iallocator script can be used to automatically compute
+                them.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>start</term>
+              <listitem>
+                <simpara>whether to start the instance</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>ip_check</term>
+              <listitem>
+                <simpara>Skip the check for already-in-use instance;
+                see the description in the <command>add</command>
+                command for details.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>file_storage_dir, file_driver</term>
+              <listitem>
+                <simpara>Configuration for the <literal>file</literal>
+                disk type, see the <command>add</command> command for
+                details.</simpara>
+              </listitem>
+            </varlistentry>
+          </variablelist>
+        </para>
+
+        <para>
+          A simple definition for one instance can be (with most of
+          the parameters taken from the cluster defaults):
+          <screen>
+{
+  "instance3": {
+    "template": "drbd",
+    "os": "debootstrap",
+    "disk_size": ["25G"],
+    "iallocator": "dumb"
+  },
+  "instance5": {
+    "template": "drbd",
+    "os": "debootstrap",
+    "disk_size": ["25G"],
+    "iallocator": "dumb",
+    "hypervisor": "xen-hvm",
+    "hvparams": {"acpi": true},
+    "backend": {"memory": 512}
+  }
+}
+</screen>
+        </para>
+
+        <para>
+          The command will display the job id for each submitted instance, as follows:
+          <screen>
+# gnt-instance batch-create instances.json
+instance3: 11224
+instance5: 11225
+</screen>
+        </para>
+
+      </refsect3>
+
+      <refsect3>
         <title>REMOVE</title>
 
         <cmdsynopsis>
           <command>remove</command>
           <arg>--ignore-failures</arg>
+          <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
         </para>
 
         <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
+        <para>
           Example:
           <screen>
 # gnt-instance remove instance1.example.com
           <arg>--no-headers</arg>
           <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
           <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
+          <arg rep="repeat">instance</arg>
         </cmdsynopsis>
 
         <para>
           Shows the currently configured instances with memory usage,
-          disk usage, the node they are running on, and the CPU time,
-          counted in seconds, used by each instance since its latest
-          restart.
+          disk usage, the node they are running on, and their run
+          status.
         </para>
 
         <para>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term>admin_ram</term>
-              <listitem>
-                <simpara>the desired memory for the instance</simpara>
-              </listitem>
-            </varlistentry>
-            <varlistentry>
               <term>disk_template</term>
               <listitem>
                 <simpara>the disk template of the instance</simpara>
               <term>ip</term>
               <listitem>
                 <simpara>the ip address ganeti recognizes as associated with
-                the instance interface</simpara>
+                the first instance interface</simpara>
               </listitem>
             </varlistentry>
             <varlistentry>
               <term>mac</term>
               <listitem>
-                <simpara>the instance interface MAC address</simpara>
+                <simpara>the first instance interface MAC address</simpara>
               </listitem>
             </varlistentry>
             <varlistentry>
               <term>bridge</term>
               <listitem>
-                <simpara>bridge the instance is connected to
+                <simpara>the bridge of the first instance NIC
                 </simpara>
               </listitem>
             </varlistentry>
             <varlistentry>
               <term>sdb_size</term>
               <listitem>
-                <simpara>the size of the instance's second disk</simpara>
+                <simpara>the size of the instance's second disk, if
+                any</simpara>
               </listitem>
             </varlistentry>
             <varlistentry>
                 <simpara>the so called 'serial number' of the
                 instance; this is a numeric field that is incremented
                 each time the instance is modified, and it can be used
-                to detect modifications</simpara>
+                to track modifications</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>network_port</term>
+              <listitem>
+                <simpara>If the instance has a network port assigned
+                to it (e.g. for VNC connections), this will be shown,
+                otherwise <literal>-</literal> will be
+                displayed.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>beparams</term>
+              <listitem>
+                <simpara>A text format of the entire beparams for the
+                instance. It's more useful to select individual fields
+                from this dictionary, see below.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>disk.count</term>
+              <listitem>
+                <simpara>The number of instance disks.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>disk.size/N</term>
+              <listitem>
+                <simpara>The size of the instance's Nth disk. This is
+                a more generic form of the <literal>sda_size</literal>
+                and <literal>sdb_size</literal> fields.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>disk.sizes</term>
+              <listitem>
+                <simpara>A comma-separated list of the disk sizes for
+                this instance.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>disk_usage</term>
+              <listitem>
+                <simpara>The total disk space used by this instance on
+                each of its nodes. This is not the instance-visible
+                disk size, but the actual disk "cost" of the
+                instance.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic.mac/N</term>
+              <listitem>
+                <simpara>The MAC of the Nth instance NIC.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic.ip/N</term>
+              <listitem>
+                <simpara>The IP address of the Nth instance NIC.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic.bridge/N</term>
+              <listitem>
+                <simpara>The bridge the Nth instance NIC is attached
+                to.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic.macs</term>
+              <listitem>
+                <simpara>A comma-separated list of all the MACs of the
+                instance's NICs.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic.ips</term>
+              <listitem>
+                <simpara>A comma-separated list of all the IP
+                addresses of the instance's NICs.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic.bridges</term>
+              <listitem>
+                <simpara>A comma-separated list of all the bridges of the
+                instance's NICs.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic.count</term>
+              <listitem>
+                <simpara>The number of instance nics.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>hv/<replaceable>NAME</replaceable></term>
+              <listitem>
+                <simpara>The value of the hypervisor parameter called
+                <replaceable>NAME</replaceable>. For details of what
+                hypervisor parameters exist and their meaning, see the
+                <command>add</command> command.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>be/memory</term>
+              <listitem>
+                <simpara>The configured memory for the instance.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>be/vcpus</term>
+              <listitem>
+                <simpara>The configured number of VCPUs for the
+                instance.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>be/auto_balance</term>
+              <listitem>
+                <simpara>Whether the instance is considered in N+1
+                checks.</simpara>
               </listitem>
             </varlistentry>
           </variablelist>
 
         <para>
           If the value of the option starts with the character
-          <constant>+</constant>, the new fields will be added to the
+          <constant>+</constant>, the new field(s) will be added to the
           default list. This allows to quickly see the default list
           plus a few other fields, instead of retyping the entire list
           of fields.
 
         <cmdsynopsis>
           <command>modify</command>
-          <arg choice="opt">-m <replaceable>memsize</replaceable></arg>
-          <arg choice="opt">-p <replaceable>vcpus</replaceable></arg>
-          <arg choice="opt">-i <replaceable>ip</replaceable></arg>
-          <arg choice="opt">-b <replaceable>bridge</replaceable></arg>
-          <arg choice="opt">--mac <replaceable>MAC-address</replaceable></arg>
-          <arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg>
-          <arg>--hvm-acpi <replaceable>ACPI-support</replaceable></arg>
-          <arg>--hvm-pae <replaceable>PAE-support</replaceable></arg>
-          <arg>--hvm-cdrom-image-path
-            <replaceable>cdrom-image-path</replaceable></arg>
-          <arg>--hvm-nic-type <replaceable>NICTYPE</replaceable></arg>
-          <arg>--hvm-disk-type <replaceable>DISKTYPE</replaceable></arg>
-          <arg>--vnc-bind-address
-            <replaceable>vnc-bind-address</replaceable></arg>
-
           <sbr>
-          <arg>--kernel <group choice="req">
-              <arg>default</arg>
-              <arg><replaceable>kernel_path</replaceable></arg>
-            </group></arg>
+          <arg choice="opt">-H <replaceable>HYPERVISOR_PARAMETERS</replaceable></arg>
+          <sbr>
+          <arg choice="opt">-B <replaceable>BACKEND_PARAMETERS</replaceable></arg>
+          <sbr>
+          <group>
+            <arg>--net add<replaceable><optional>:options</optional></replaceable></arg>
+            <arg>--net remove</arg>
+            <arg>--net <replaceable>N:options</replaceable></arg>
+          </group>
+          <sbr>
+          <group>
+            <arg>--disk add:size=<replaceable>SIZE</replaceable></arg>
+            <arg>--disk remove</arg>
+            <arg>--disk <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></arg>
+          </group>
+
           <sbr>
-          <arg>--initrd <group choice="req">
-              <arg>default</arg>
-              <arg>none</arg>
-              <arg><replaceable>initrd_path</replaceable></arg>
-            </group> </arg>
+          <arg>--submit</arg>
           <sbr>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
         <para>
-          Modify the memory size, number of vcpus, ip address, MAC
-          address and/or bridge for an instance.
+          Modifies the memory size, number of vcpus, ip address, MAC
+          address and/or bridge for an instance. It can also add and
+          remove disks and NICs to/from the instance. Note that you
+          need to give at least one of the arguments, otherwise the
+          command complains.
         </para>
 
         <para>
-          The memory size is given in MiB. Note that you need to give
-          at least one of the arguments, otherwise the command
-          complains.
+          The <option>-H</option> option specifies hypervisor options
+          in the form of <userinput>name=value[,...]</userinput>. For details which options can be specified, see the <command>add</command> command.
         </para>
 
         <para>
-          The <option>--kernel</option>, <option>--initrd</option>
-          and <option>--hvm-boot-order</option>
-          options are described in the <command>add</command> command.
+          The <option>--disk
+          add:size=<replaceable>SIZE</replaceable></option> option
+          adds a disk to the instance. The <option>--disk
+          remove</option> will remove the last disk of the
+          instance. The <option>--disk
+          <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></option>
+          option will change the mode of the Nth disk of the instance
+          between read-only (<literal>ro</literal>) and read-write
+          (<literal>rw</literal>).
         </para>
 
         <para>
-          Additionally, the HVM boot order can be reset to the default
-          values by using <option>--hvm-boot-order=default</option>.
+          The <option>--nic
+          add:<replaceable>options</replaceable></option> option will
+          add a new NIC to the instance. The available options are the
+          same as in the <command>add</command> command (mac, ip,
+          bridge). The <option>--nice remove</option> will remove the
+          last NIC of the instance, while the <option>--nic
+          <replaceable>N</replaceable>:<replaceable>options</replaceable></option>
+          option will change the parameters of the Nth instance NIC.
         </para>
 
         <para>
-          The <option>--hvm-acpi</option> option specifies if Xen
-          should enable ACPI support for this HVM instance. Valid
-          values are true or false.
-        </para>
-
-        <para>
-          The <option>--hvm-pae</option> option specifies if Xen
-          should enabled PAE support for this HVM instance. Valid
-          values are true or false.
-        </para>
-
-        <para>
-          The <option>--hvm-cdrom-image-path</option> specifies the
-          path to the file xen uses to emulate a virtual CDROM drive
-          for this HVM instance. Valid values are either an
-          absolute path to an existing file or None, which disables
-          virtual CDROM support for this instance.
-        </para>
-
-        <para>
-          The <option>--hvm-nic-type</option> specifies the NIC type
-          Xen should use for this HVM instance. Valid choices are
-          rtl8139, ne2k_pci, ne2k_isa and paravirtual with rtl8139
-          as the default. The paravirtual setting is intended for use
-          with the GPL PV drivers inside HVM Windows instances.
-        </para>
-
-        <para>
-          The <option>--hvm-disk-type</option> specifies the disk type
-          Xen should use for the HVM instance. Valid choices are ioemu
-          and paravirtual with ioemu as the default. The paravirtual
-          setting is intended for use with the GPL PV drivers inside
-          HVM Windows instances.
-        </para>
-
-        <para>
-          The <option>--vnc-bind-address</option> specifies the
-          address that the VNC listener for this instance should bind
-          to. Valid values are IPv4 addresses. Use the address 0.0.0.0
-          to bind to all available interfaces.
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
         </para>
 
         <para>
           <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
           <arg choice="opt">-f <replaceable>force</replaceable></arg>
           <arg>--select-os</arg>
+          <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
           interactive OS reinstall. The user is prompted to select the OS
           template from the list of available OS templates.
         </para>
+
+        <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
+
       </refsect3>
 
       <refsect3>
         <cmdsynopsis>
           <command>rename</command>
           <arg>--no-ip-check</arg>
+          <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
           <arg choice="req"><replaceable>new_name</replaceable></arg>
         </cmdsynopsis>
           instance is started). The IP test can be skipped if the
           <option>--no-ip-check</option> option is passed.
         </para>
+
+        <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
       </refsect3>
 
     </refsect2>
 
         <cmdsynopsis>
           <command>startup</command>
+          <sbr>
           <arg>--extra=<replaceable>PARAMS</replaceable></arg>
           <arg>--force</arg>
           <sbr>
+          <arg>--force-multiple</arg>
+          <sbr>
           <group choice="opt">
             <arg>--instance</arg>
             <arg>--node</arg>
             <arg>--all</arg>
           </group>
           <sbr>
+          <arg>--submit</arg>
+          <sbr>
           <arg choice="opt"
           rep="repeat"><replaceable>name</replaceable></arg>
         </cmdsynopsis>
         </para>
 
         <para>
+          The <option>--force-multiple</option> will skip the
+          interactive confirmation in the case the more than one
+          instance will be affected.
+        </para>
+
+        <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
+        <para>
           Example:
           <screen>
 # gnt-instance start instance1.example.com
         <cmdsynopsis>
           <command>shutdown</command>
           <sbr>
+          <arg>--force-multiple</arg>
+          <sbr>
           <group choice="opt">
             <arg>--instance</arg>
             <arg>--node</arg>
             <arg>--all</arg>
           </group>
           <sbr>
-
+          <arg>--submit</arg>
+          <sbr>
           <arg choice="opt"
           rep="repeat"><replaceable>name</replaceable></arg>
         </cmdsynopsis>
         </para>
 
         <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
+
+        <para>
           Example:
           <screen>
 # gnt-instance shutdown instance1.example.com
             <arg>--all</arg>
           </group>
           <sbr>
-
+          <arg>--submit</arg>
+          <sbr>
           <arg choice="opt"
           rep="repeat"><replaceable>name</replaceable></arg>
         </cmdsynopsis>
         </para>
 
         <para>
-          Use the <option>--force-multiple</option> option to keep
-          gnt-instance from asking for confirmation when more than one
-          instance is affected.
+          The <option>--force-multiple</option> will skip the
+          interactive confirmation in the case the more than one
+          instance will be affected.
         </para>
 
         <para>
         </cmdsynopsis>
 
         <para>
-          Connects to the console of the given instance. If the instance
-          is not up, an error is returned. Use the <option>--show-cmd</option>
-          option to display the command instead of executing it.
+          Connects to the console of the given instance. If the
+          instance is not up, an error is returned. Use the
+          <option>--show-cmd</option> option to display the command
+          instead of executing it.
         </para>
 
         <para>
-          For HVM instances, this will attempt to connect to the serial
-          console of the instance. To connect to the virtualized
-          "physical" console of a HVM instance, use a VNC client with
-          the connection info from gnt-instance info.
+          For HVM instances, this will attempt to connect to the
+          serial console of the instance. To connect to the
+          virtualized "physical" console of a HVM instance, use a VNC
+          client with the connection info from the
+          <command>info</command> command.
         </para>
 
         <para>
 
         <cmdsynopsis>
           <command>replace-disks</command>
+          <arg>--submit</arg>
           <arg choice="req">-p</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
         <cmdsynopsis>
           <command>replace-disks</command>
-
+          <arg>--submit</arg>
           <arg choice="req">-s</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
         <cmdsynopsis>
           <command>replace-disks</command>
-
+          <arg>--submit</arg>
           <group choice="req">
             <arg>--iallocator <replaceable>name</replaceable></arg>
             <arg>--new-secondary <replaceable>NODE</replaceable></arg>
           otherwise the new secondary node will be the one chosen
           manually via the <option>--new-secondary</option> option.
         </para>
+
+        <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
+        <para>
+          Note that it is not possible to select an offline or drained
+          node as a new secondary.
+        </para>
+
       </refsect3>
 
       <refsect3>
 
         <cmdsynopsis>
           <command>activate-disks</command>
+          <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
         <para>
           successful, the command will show the location and name of
           the block devices:
           <screen>
-node1.example.com:sda:/dev/drbd0
-node1.example.com:sdb:/dev/drbd1
+node1.example.com:disk/0:/dev/drbd0
+node1.example.com:disk/1:/dev/drbd1
           </screen>
 
           In this example, <emphasis>node1.example.com</emphasis> is
           the name of the node on which the devices have been
-          activated. The <emphasis>sda</emphasis> and
-          <emphasis>sdb</emphasis> are the names of the block devices
-          inside the instance. <emphasis>/dev/drbd0</emphasis> and
-          <emphasis>/dev/drbd1</emphasis> are the names of the block
-          devices as visible on the node.
+          activated. The <emphasis>disk/0</emphasis> and
+          <emphasis>disk/1</emphasis> are the Ganeti-names of the
+          instance disks; how they are visible inside the instance is
+          hypervisor-specific. <emphasis>/dev/drbd0</emphasis> and
+          <emphasis>/dev/drbd1</emphasis> are the actual block devices
+          as visible on the node.
+        </para>
+
+        <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
         </para>
 
         <para>
@@ -1165,6 +1628,7 @@ node1.example.com:sdb:/dev/drbd1
 
         <cmdsynopsis>
           <command>deactivate-disks</command>
+          <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
         <para>
@@ -1176,6 +1640,13 @@ node1.example.com:sdb:/dev/drbd1
           breaking the replication.
         </para>
 
+        <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
       </refsect3>
 
       <refsect3>
@@ -1183,6 +1654,7 @@ node1.example.com:sdb:/dev/drbd1
         <cmdsynopsis>
           <command>grow-disk</command>
           <arg>--no-wait-for-sync</arg>
+          <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
           <arg choice="req"><replaceable>disk</replaceable></arg>
           <arg choice="req"><replaceable>amount</replaceable></arg>
@@ -1223,8 +1695,8 @@ node1.example.com:sdb:/dev/drbd1
 
 
         <para>
-          The <replaceable>disk</replaceable> argument is either
-          <literal>sda</literal> or <literal>sdb</literal>. The
+          The <replaceable>disk</replaceable> argument is the index of
+          the instance disk to grow. The
           <replaceable>amount</replaceable> argument is given either
           as a number (and it represents the amount to increase the
           disk with in mebibytes) or can be given similar to the
@@ -1245,15 +1717,22 @@ node1.example.com:sdb:/dev/drbd1
           <option>--no-wait-for-sync</option> option.
         </para>
 
+        <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
 
-        <para>Example (increase sda for instance1 by 16GiB):
+        <para>Example (increase the first disk for instance1 by 16GiB):
           <screen>
-# gnt-instance grow-disk instance1.example.com sda 16g
+# gnt-instance grow-disk instance1.example.com 0 16g
           </screen>
         </para>
 
         <para>
-          Also note that disk shrinking will not be supported; use
+          Also note that disk shrinking is not supported; use
           <command>gnt-backup export</command> and then
           <command>gnt-backup import</command> to reduce the disk size
           of an instance.
@@ -1272,6 +1751,7 @@ node1.example.com:sdb:/dev/drbd1
           <command>failover</command>
           <arg>-f</arg>
           <arg>--ignore-consistency</arg>
+          <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
@@ -1293,6 +1773,13 @@ node1.example.com:sdb:/dev/drbd1
         </para>
 
         <para>
+          The <option>--submit</option> option is used to send the job to
+          the master daemon but not wait for its completion. The job
+          ID will be shown so that it can be examined via
+          <command>gnt-job info</command>.
+        </para>
+
+        <para>
           Example:
           <screen>
 # gnt-instance failover instance1.example.com
@@ -1300,6 +1787,84 @@ node1.example.com:sdb:/dev/drbd1
         </para>
       </refsect3>
 
+      <refsect3>
+        <title>MIGRATE</title>
+
+        <cmdsynopsis>
+          <command>migrate</command>
+          <arg>-f</arg>
+          <arg choice="req">--cleanup</arg>
+          <arg choice="req"><replaceable>instance</replaceable></arg>
+        </cmdsynopsis>
+
+        <cmdsynopsis>
+          <command>migrate</command>
+          <arg>-f</arg>
+          <arg>--non-live</arg>
+          <arg choice="req"><replaceable>instance</replaceable></arg>
+        </cmdsynopsis>
+
+        <para>
+          Migrate will move the instance to its secondary node without
+          shutdown. It only works for instances having the drbd8 disk
+          template type.
+        </para>
+
+        <para>
+          The migration command needs a perfectly healthy instance, as
+          we rely on the dual-master capability of drbd8 and the disks
+          of the instance are not allowed to be degraded.
+        </para>
+
+        <para>
+          The <option>--non-live</option> option will switch (for the
+          hypervisors that support it) between a "fully live"
+          (i.e. the interruption is as minimal as possible) migration
+          and one in which the instance is frozen, its state saved and
+          transported to the remote node, and then resumed there. This
+          all depends on the hypervisor support for two different
+          methods. In any case, it is not an error to pass this
+          parameter (it will just be ignored if the hypervisor doesn't
+          support it).
+        </para>
+
+        <para>
+          If the <option>--cleanup</option> option is passed, the
+          operation changes from migration to attempting recovery from
+          a failed previous migration. In this mode, ganeti checks if
+          the instance runs on the correct node (and updates its
+          configuration if not) and ensures the instances's disks are
+          configured correctly. In this mode, the
+          <option>--non-live</option> option is ignored.
+        </para>
+
+        <para>
+          The option <option>-f</option> will skip the prompting for
+          confirmation.
+        </para>
+        <para>
+          Example (and expected output):
+          <screen>
+# gnt-instance migrate instance1
+Migrate will happen to the instance instance1. Note that migration is
+**experimental** in this version. This might impact the instance if
+anything goes wrong. Continue?
+y/[n]/?: y
+* checking disk consistency between source and target
+* ensuring the target is in secondary mode
+* changing disks into dual-master mode
+ - INFO: Waiting for instance instance1 to sync disks.
+ - INFO: Instance instance1's disks are in sync.
+* migrating instance to node2.example.com
+* changing the instance's disks on source node to secondary
+ - INFO: Waiting for instance instance1 to sync disks.
+ - INFO: Instance instance1's disks are in sync.
+* changing the instance's disks to single-master
+#
+          </screen>
+        </para>
+      </refsect3>
+
     </refsect2>
 
     <refsect2>
diff --git a/man/gnt-job.sgml b/man/gnt-job.sgml
new file mode 100644 (file)
index 0000000..bf81ec7
--- /dev/null
@@ -0,0 +1,255 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>February 12, 2009</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhucpackage "<refentrytitle>gnt-job</refentrytitle>">
+  <!ENTITY dhpackage   "gnt-job">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+  <!ENTITY footer SYSTEM "footer.sgml">
+]>
+
+<refentry>
+  <refentryinfo>
+    <copyright>
+      <year>2008</year>
+      <year>2009</year>
+      <holder>Google Inc.</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+    <refmiscinfo>ganeti 2.0</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>job commands</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage; </command>
+
+      <arg choice="req">command</arg>
+      <arg>arguments...</arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>
+      The <command>&dhpackage;</command> is used for examining and
+      manipulating the job queue.
+    </para>
+
+  </refsect1>
+  <refsect1>
+    <title>COMMANDS</title>
+
+    <refsect2>
+      <title>ARCHIVE</title>
+      <cmdsynopsis>
+        <command>archive</command>
+
+        <arg choice="req" rep="repeat">id</arg>
+      </cmdsynopsis>
+
+      <para>This command can be used to archive job by their IDs. Only
+      jobs that have finished execution (i.e either
+      <emphasis>success</emphasis>, <emphasis>error</emphasis> or
+      <emphasis>canceled</emphasis> jobs).</para>
+
+    </refsect2>
+
+    <refsect2>
+      <title>AUTOARCHIVE</title>
+      <cmdsynopsis>
+        <command>autoarchive</command>
+        <group choice="req">
+          <arg><replaceable>age</replaceable></arg>
+          <arg>all</arg>
+        </group>
+      </cmdsynopsis>
+
+      <para>
+        Archive jobs by their age. This command can archive jobs older
+        than <replaceable>age</replaceable> seconds, or alternatively
+        all finished jobs can be archived if the string <literal>all
+        </literal> is passed.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>CANCEL</title>
+      <cmdsynopsis>
+        <command>cancel</command>
+        <arg choice="req"><replaceable>id</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        Cancel the job identified by the given
+        <replaceable>id</replaceable>. Only jobs that have not yet
+        started to run can be canceled; that is, jobs in either the
+        <emphasis>queued</emphasis> or <emphasis>waiting</emphasis>
+        state.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>INFO</title>
+      <cmdsynopsis>
+        <command>cancel</command>
+        <arg choice="req" rep="repeat"><replaceable>id</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        Show detailed information about the given job id(s). If no job
+        id is given, all jobs are examined (warning, this is a lot of
+        information).
+      </para>
+
+    </refsect2>
+
+    <refsect2>
+      <title>LIST</title>
+      <cmdsynopsis>
+        <command>list</command>
+        <arg>--no-headers</arg>
+        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
+        <sbr>
+        <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
+        <sbr>
+      </cmdsynopsis>
+
+      <para>
+        Lists the jobs and their status. By default, the job id, job
+        status, and a small job description is listed, but additional
+        parameters can be selected.
+      </para>
+
+      <para>
+        The <option>--no-headers</option> option will skip the initial
+        header line. The <option>--separator</option> option takes an
+        argument which denotes what will be used between the output
+        fields. Both these options are to help scripting.
+      </para>
+
+      <para>
+        The <option>-o</option> option takes a comma-separated list of
+        output fields. The available fields and their meaning are:
+        <variablelist>
+          <varlistentry>
+            <term>id</term>
+            <listitem>
+              <simpara>the job id</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>status</term>
+            <listitem>
+              <simpara>the status of the job</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>received_ts</term>
+            <listitem>
+              <simpara>the timestamp the job was received</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>start_ts</term>
+            <listitem>
+              <simpara>the timestamp when the job was started</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>end_ts</term>
+            <listitem>
+              <simpara>the timestamp when the job was ended</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>summary</term>
+            <listitem>
+              <simpara>a summary of the opcodes that define the job</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>ops</term>
+            <listitem>
+              <simpara>the list of opcodes defining the job</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>opresult</term>
+            <listitem>
+              <simpara>the list of opcode results</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>opstatus</term>
+            <listitem>
+              <simpara>the list of opcode statuses</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>oplog</term>
+            <listitem>
+              <simpara>the list of opcode logs</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>opstart</term>
+            <listitem>
+              <simpara>the list of opcode start times</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>opend</term>
+            <listitem>
+              <simpara>the list of opcode end times</simpara>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </para>
+
+      <para>
+        If the value of the option starts with the character
+        <constant>+</constant>, the new fields will be added to the
+        default list. This allows to quickly see the default list plus
+        a few other fields, instead of retyping the entire list of
+        fields.
+      </para>
+
+    </refsect2>
+  </refsect1>
+
+  &footer;
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
index 5b1b468..62355f0 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>June 20, 2007</date>">
+  <!ENTITY dhdate      "<date>February 12, 2009</date>">
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
@@ -21,6 +21,7 @@
       <year>2006</year>
       <year>2007</year>
       <year>2008</year>
+      <year>2009</year>
       <holder>Google Inc.</holder>
     </copyright>
     &dhdate;
@@ -29,7 +30,7 @@
     &dhucpackage;
 
     &dhsection;
-    <refmiscinfo>ganeti 1.2</refmiscinfo>
+    <refmiscinfo>ganeti 2.0</refmiscinfo>
   </refmeta>
   <refnamediv>
     <refname>&dhpackage;</refname>
       </para>
 
       <para>
-        In case you're readding a node after hardware failure, you
-        can use the <option>--readd</option> parameter.
+        In case you're readding a node after hardware failure, you can
+        use the <option>--readd</option> parameter. In this case, you
+        don't need to pass the secondary IP again, it will reused from
+        the cluster. Also, the <literal>drained</literal> and
+        <literal>offline</literal> flags of the node will be cleared
+        before re-adding it.
       </para>
 
       <para>
       <cmdsynopsis>
         <command>evacuate</command>
         <arg>-f</arg>
-        <arg choice="req"><replaceable>source_node</replaceable></arg>
-        <arg choice="req"><replaceable>destination_node</replaceable></arg>
+        <group>
+          <arg>--iallocator <replaceable>NAME</replaceable></arg>
+          <arg>--new-secondary <replaceable>destination_node</replaceable></arg>
+        </group>
+        <arg choice="req"><replaceable>node</replaceable></arg>
       </cmdsynopsis>
 
       <para>
-        This command will change the secondary node from the source
-        node to the destination node for all instances having the
-        source node as secondary. It works only for instances having
-        a drbd disk template.
+        This command will move all secondary instances away from the
+        given node. It works only for instances having a drbd disk
+        template.
+      </para>
+
+      <para>
+        The new location for the instances can be specified in two ways:
+        <itemizedlist>
+          <listitem>
+            <simpara>as a single node for all instances, via the
+            <option>--new-secondary</option> option</simpara>
+          </listitem>
+          <listitem>
+            <simpara>or via the <option>--iallocator</option> option,
+            giving a script name as parameter, so each instance will
+            be in turn placed on the (per the script) optimal
+            node</simpara>
+          </listitem>
+        </itemizedlist>
       </para>
 
       <para>
         Example:
         <screen>
-          # gnt-node evacuate node1.example.com node2.example.com
+          # gnt-node evacuate -I dumb node3.example.com
         </screen>
       </para>
     </refsect2>
 
       <cmdsynopsis>
         <command>list</command>
+        <arg>--sync</arg>
+        <sbr>
         <arg>--no-headers</arg>
         <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
+        <sbr>
+        <arg>--units=<replaceable>UNITS</replaceable></arg>
         <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
+        <sbr>
+        <arg rep="repeat">node</arg>
       </cmdsynopsis>
 
       <para>
-        Lists the nodes in the cluster. If you give the
-        <option>--ip-info</option> option, the output contains just
-        the node name, primary ip and secondary ip. In case the
-        secondary ip is the same as the primary one, it will be listed
-        as <emphasis>"-"</emphasis>.
+        Lists the nodes in the cluster.
       </para>
 
       <para>
       </para>
 
       <para>
+        The units used to display the numeric values in the output
+        varies, depending on the options given. By default, the values
+        will be formatted in the most appropriate unit. If the
+        <option>--separator</option> option is given, then the values
+        are shown in mebibytes to allow parsing by scripts. In both
+        cases, the <option>--units</option> option can be used to
+        enforce a given output unit.
+      </para>
+
+      <para>
+        By default, the query of nodes will be done in parallel with
+        any running jobs. This might give inconsistent results for the
+        free disk/memory. The <option>--sync</option> can be used to
+        grab locks for all the nodes and ensure consistent view of the
+        cluster (but this might stall the query for a long time).
+      </para>
+
+      <para>
         The <option>-o</option> option takes a comma-separated list of
         output fields. The available fields and their meaning are:
         <variablelist>
               modifications</simpara>
             </listitem>
           </varlistentry>
+          <varlistentry>
+            <term>ctotal</term>
+            <listitem>
+              <simpara>the toal number of logical processors</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>cnodes</term>
+            <listitem>
+              <simpara>the number of NUMA domains on the node, if the
+              hypervisor can export this information</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>csockets</term>
+            <listitem>
+              <simpara>the number of physical CPU sockets, if the
+              hypervisor can export this information</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>master_candidate</term>
+            <listitem>
+              <simpara>whether the node is a master candidate or not</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>drained</term>
+            <listitem>
+              <simpara>whether the node is drained or not</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>offline</term>
+            <listitem>
+              <simpara>whether the node is offline or not</simpara>
+            </listitem>
+          </varlistentry>
         </variablelist>
       </para>
 
 
       <para>
         Note that some of this fields are known from the configuration
-        of the cluster (<simplelist type="inline">
+        of the cluster (e.g. <simplelist type="inline">
         <member>name</member> <member>pinst</member>
         <member>sinst</member> <member>pip</member>
         <member>sip</member> </simplelist> and thus the master does
         details, the mtotal, mnode and mfree may have slighly varying
         meanings. For example, some solutions share the node memory
         with the pool of memory used for instances
-        (<acronym>UML</acronym>), whereas others have separate memory
+        (<acronym>KVM</acronym>), whereas others have separate memory
         for the node and for the instances (Xen).
       </para>
+
+      <para>
+        If no node names are given, then all nodes are
+        queried. Otherwise, only the given nodes will be listed.
+      </para>
     </refsect2>
 
     <refsect2>
     </refsect2>
 
     <refsect2>
+      <title>MIGRATE</title>
+      <cmdsynopsis>
+        <command>migrate</command>
+        <arg>-f</arg>
+        <arg>--non-live</arg>
+        <arg choice="req"><replaceable>node</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        This command will migrate all instances having the given
+        node as primary to their secondary nodes. This works only for
+        instances having a drbd disk template.
+      </para>
+
+      <para>
+        As for the <command>gnt-instance migrate</command> command,
+        the <option>--no-live</option> option can be given to do a
+        non-live migration.
+      </para>
+
+      <para>
+        Example:
+        <screen>
+          # gnt-node migrate node1.example.com
+        </screen>
+      </para>
+
+    </refsect2>
+
+    <refsect2>
       <title>REMOVE</title>
 
       <cmdsynopsis>
       </para>
 
       <para>
+        The units used to display the numeric values in the output
+        varies, depending on the options given. By default, the values
+        will be formatted in the most appropriate unit. If the
+        <option>--separator</option> option is given, then the values
+        are shown in mebibytes to allow parsing by scripts. In both
+        cases, the <option>--units</option> option can be used to
+        enforce a given output unit.
+      </para>
+
+      <para>
         The <option>-o</option> option takes a comma-separated list of
         output fields. The available fields and their meaning are:
         <variablelist>
index 0f41d64..3432a3d 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>August 10, 2006</date>">
+  <!ENTITY dhdate      "<date>February 12, 2009</date>">
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
@@ -20,6 +20,8 @@
     <copyright>
       <year>2006</year>
       <year>2007</year>
+      <year>2008</year>
+      <year>2009</year>
       <holder>Google Inc.</holder>
     </copyright>
     &dhdate;
@@ -28,7 +30,7 @@
     &dhucpackage;
 
     &dhsection;
-    <refmiscinfo>ganeti 1.2</refmiscinfo>
+    <refmiscinfo>ganeti 2.0</refmiscinfo>
   </refmeta>
   <refnamediv>
     <refname>&dhpackage;</refname>