Ensure RpcResult has “payload” attribute
[ganeti-local] / man / gnt-instance.sgml
index ff8b52e..a404521 100644 (file)
         <para>
           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.
+          but depending on the bridge/routing setup, need not be in
+          the same network as the nodes in the cluster.
         </para>
 
         <para>
         <para>
           The NICs of the instances can be specified via the
           <option>--net</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):
+          created for the instance, with a random MAC, and set
+          up according the the cluster level nic parameters.
+          Each NIC can take these parameters (all optional):
           <variablelist>
             <varlistentry>
               <term>mac</term>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term>bridge</term>
+              <term>mode</term>
               <listitem>
-                <simpara>specifies the bridge to attach this NIC
-                  to</simpara>
+                <simpara>specifies the connection mode for this nic:
+                  routed or bridged.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>link</term>
+              <listitem>
+                <simpara>in bridged mode specifies the bridge to attach
+                  this NIC to, in routed mode it's intended to
+                  differentiate between different routing tables/instance
+                  groups (but the meaning is dependent on the network
+                  script, see gnt-cluster(8) for more details)</simpara>
               </listitem>
             </varlistentry>
           </variablelist>
+          Of these "mode" and "link" are nic parameters, and inherit their
+          default at cluster level.
         </para>
 
         <para>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term>mac, ip, bridge</term>
+              <term>mac, ip, mode, link</term>
               <listitem>
                 <simpara>Specifications for the one NIC that will be
-                created for the instance.</simpara>
+                created for the instance. 'bridge' is also accepted
+                as a backwards compatibile key.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nics</term>
+              <listitem>
+                <simpara>List of nics that will be created for the
+                instance. Each entry should be a dict, with mac, ip, mode
+                and link as possible keys. Please don't provide the "mac,
+                ip, mode, link" parent keys if you use this method for
+                specifying nics.</simpara>
               </listitem>
             </varlistentry>
             <varlistentry>
@@ -762,6 +785,7 @@ instance5: 11225
         <cmdsynopsis>
           <command>remove</command>
           <arg>--ignore-failures</arg>
+          <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
           <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
@@ -784,6 +808,13 @@ instance5: 11225
         </para>
 
         <para>
+          The <option>--shutdown-timeout</option> is used to specify how
+          much time to wait before forcing the shutdown (xm destroy in xen,
+          killing the kvm process, for kvm). By default two minutes are
+          given to each instance to stop.
+        </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
@@ -912,10 +943,18 @@ instance5: 11225
                 <simpara>the first instance interface MAC address</simpara>
               </listitem>
             </varlistentry>
+
             <varlistentry>
-              <term>bridge</term>
+              <term>mode</term>
               <listitem>
-                <simpara>the bridge of the first instance NIC
+                <simpara>the mode of the first instance NIC
+                (routed or bridged)</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>link</term>
+              <listitem>
+                <simpara>the link of the first instance NIC
                 </simpara>
               </listitem>
             </varlistentry>
@@ -956,6 +995,45 @@ instance5: 11225
               </listitem>
             </varlistentry>
             <varlistentry>
+              <term>ctime</term>
+              <listitem>
+                <para>
+                  the creation time of the instance; note that this
+                  field contains spaces and as such it's harder to
+                  parse
+                </para>
+                <para>
+                  if this attribute is not present (e.g. when
+                  upgrading from older versions), then "N/A" will be
+                  shown instead
+                </para>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>mtime</term>
+              <listitem>
+                <para>
+                  the last modification time of the instance; note
+                  that this field contains spaces and as such it's
+                  harder to parse
+                </para>
+                <para>
+                  if this attribute is not present (e.g. when
+                  upgrading from older versions), then "N/A" will be
+                  shown instead
+                </para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term>uuid</term>
+              <listitem>
+                <simpara>Show the UUID of the instance (generated
+                automatically by Ganeti)</simpara>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
               <term>network_port</term>
               <listitem>
                 <simpara>If the instance has a network port assigned
@@ -1015,10 +1093,15 @@ instance5: 11225
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term>nic.bridge/N</term>
+              <term>nic.mode/N</term>
               <listitem>
-                <simpara>The bridge the Nth instance NIC is attached
-                to.</simpara>
+                <simpara>The mode of the Nth instance NIC</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>nic.link/N</term>
+              <listitem>
+                <simpara>The link of the Nth instance NIC</simpara>
               </listitem>
             </varlistentry>
             <varlistentry>
@@ -1036,13 +1119,20 @@ instance5: 11225
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term>nic.bridges</term>
+              <term>nic.modes</term>
               <listitem>
-                <simpara>A comma-separated list of all the bridges of the
+                <simpara>A comma-separated list of all the modes of the
                 instance's NICs.</simpara>
               </listitem>
             </varlistentry>
             <varlistentry>
+              <term>nic.links</term>
+              <listitem>
+                <simpara>A comma-separated list of all the link parameters
+                of the instance's NICs.</simpara>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
               <term>nic.count</term>
               <listitem>
                 <simpara>The number of instance nics.</simpara>
@@ -1176,10 +1266,10 @@ instance5: 11225
 
         <para>
           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.
+          address and/or nic parameters 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>
@@ -1203,8 +1293,8 @@ instance5: 11225
           The <option>--net
           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>--net remove</option> will remove the
+          same as in the <command>add</command> command (mac, ip, link,
+          mode). The <option>--net remove</option> will remove the
           last NIC of the instance, while the <option>--net
           <replaceable>N</replaceable>:<replaceable>options</replaceable></option>
           option will change the parameters of the Nth instance NIC.
@@ -1229,32 +1319,48 @@ instance5: 11225
         <cmdsynopsis>
           <command>reinstall</command>
           <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
-          <arg choice="opt">-f <replaceable>force</replaceable></arg>
           <arg>--select-os</arg>
+          <arg choice="opt">-f <replaceable>force</replaceable></arg>
+          <arg>--force-multiple</arg>
+          <sbr>
+          <group choice="opt">
+            <arg>--instance</arg>
+            <arg>--node</arg>
+            <arg>--primary</arg>
+            <arg>--secondary</arg>
+            <arg>--all</arg>
+          </group>
           <arg>--submit</arg>
-          <arg choice="req"><replaceable>instance</replaceable></arg>
+          <arg choice="opt" rep="repeat"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
         <para>
-          Reinstalls the operating system on the given instance. The
-          instance must be stopped when running this command. If the
+          Reinstalls the operating system on the given instance(s). The
+          instance(s) must be stopped when running this command. If the
           <option>--os-type</option> is specified, the operating
           system is changed.
         </para>
 
         <para>
-          Since reinstall is potentially dangerous command, the user
-          will be required to confirm this action, unless the
-          <option>-f</option> flag is passed.
-        </para>
-
-        <para>
           The <option>--select-os</option> option switches to an
           interactive OS reinstall. The user is prompted to select the OS
           template from the list of available OS templates.
         </para>
 
         <para>
+          Since this is a potentially dangerous command, the user will
+          be required to confirm this action, unless the
+          <option>-f</option> flag is passed. When multiple instances
+          are selected (either by passing multiple arguments or by
+          using the <option>--node</option>,
+          <option>--primary</option>, <option>--secondary</option> or
+          <option>--all</option> options), the user must pass both the
+          <option>--force</option> and
+          <option>--force-multiple</option> options to skip the
+          interactive confirmation.
+        </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
@@ -1428,6 +1534,8 @@ instance5: 11225
         <cmdsynopsis>
           <command>shutdown</command>
           <sbr>
+          <arg>--timeout=<replaceable>N</replaceable></arg>
+          <sbr>
           <arg>--force-multiple</arg>
           <sbr>
           <group choice="opt">
@@ -1452,6 +1560,13 @@ instance5: 11225
         </para>
 
         <para>
+          The <option>--timeout</option> is used to specify how much time to
+          wait before forcing the shutdown (xm destroy in xen, killing the kvm
+          process, for kvm). By default two minutes are given to each instance
+          to stop.
+        </para>
+
+        <para>
           The <option>--instance</option>, <option>--node</option>,
           <option>--primary</option>, <option>--secondary</option> and
           <option>--all</option> options are similar as for the
@@ -1486,6 +1601,8 @@ instance5: 11225
           <sbr>
           <arg>--ignore-secondaries</arg>
           <sbr>
+          <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
+          <sbr>
           <arg>--force-multiple</arg>
           <sbr>
           <group choice="opt">
@@ -1527,6 +1644,13 @@ instance5: 11225
         </para>
 
         <para>
+          The <option>--shutdown-timeout</option> is used to specify how
+          much time to wait before forcing the shutdown (xm destroy in xen,
+          killing the kvm process, for kvm). By default two minutes are
+          given to each instance to stop.
+        </para>
+
+        <para>
           The <option>--force-multiple</option> will skip the
           interactive confirmation in the case the more than one
           instance will be affected.
@@ -1607,6 +1731,13 @@ instance5: 11225
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
+        <cmdsynopsis>
+          <command>replace-disks</command>
+          <arg>--submit</arg>
+          <arg choice="req">--auto</arg>
+          <arg choice="req"><replaceable>instance</replaceable></arg>
+        </cmdsynopsis>
+
         <para>
           This command is a generalized form for replacing disks. It
           is currently only valid for the mirrored (DRBD) disk
@@ -1638,6 +1769,15 @@ instance5: 11225
         </para>
 
         <para>
+          The fourth form (when using <option>--auto</option>) will
+          automatically determine which disks of an instance are faulty and
+          replace them within the same node. The <option>--auto</option>
+          option works only when an instance has only faulty disks on
+          either the primary or secondary node; it doesn't work when
+          both sides have faulty disks.
+        </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
@@ -1657,6 +1797,7 @@ instance5: 11225
         <cmdsynopsis>
           <command>activate-disks</command>
           <arg>--submit</arg>
+          <arg>--ignore-size</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
         <para>
@@ -1686,6 +1827,16 @@ node1.example.com:disk/1:/dev/drbd1
         </para>
 
         <para>
+          The <option>--ignore-size</option> option can be used to
+          activate disks ignoring the currently configured size in
+          Ganeti. This can be used in cases where the configuration
+          has gotten out of sync with the real-world (e.g. after a
+          partially-failed grow-disk operation or due to rounding in
+          LVM devices). This should not be used in normal cases, but
+          only when activate-disks fails without it.
+        </para>
+
+        <para>
           Note that it is safe to run this command while the instance
           is already running.
         </para>
@@ -1807,6 +1958,39 @@ node1.example.com:disk/1:/dev/drbd1
         </para>
       </refsect3>
 
+      <refsect3>
+        <title>RECREATE-DISKS</title>
+
+        <cmdsynopsis>
+          <command>recreate-disks</command>
+          <arg>--submit</arg>
+          <arg>--disks=<option>indices</option></arg>
+          <arg choice="req"><replaceable>instance</replaceable></arg>
+        </cmdsynopsis>
+        <para>
+          Recreates the disks of the given instance, or only a subset
+          of the disks (if the option <option>disks</option> is
+          passed, which must be a comma-separated list of disk
+          indices, starting from zero).
+        </para>
+
+        <para>
+          Note that this functionality should only be used for missing
+          disks; if any of the given disks already exists, the
+          operation will fail. While this is suboptimal,
+          recreate-disks should hopefully not be needed in normal
+          operation and as such the impact of this is low.
+        </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>
 
     <refsect2>
@@ -1819,6 +2003,7 @@ node1.example.com:disk/1:/dev/drbd1
           <command>failover</command>
           <arg>-f</arg>
           <arg>--ignore-consistency</arg>
+          <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
           <arg>--submit</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
@@ -1841,6 +2026,13 @@ node1.example.com:disk/1:/dev/drbd1
         </para>
 
         <para>
+          The <option>--shutdown-timeout</option> is used to specify how
+          much time to wait before forcing the shutdown (xm destroy in xen,
+          killing the kvm process, for kvm). By default two minutes are
+          given to each instance to stop.
+        </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
@@ -1933,6 +2125,52 @@ y/[n]/?: y
         </para>
       </refsect3>
 
+      <refsect3>
+        <title>MOVE</title>
+
+        <cmdsynopsis>
+          <command>move</command>
+          <arg>-f</arg>
+          <arg>-n <replaceable>node</replaceable></arg>
+          <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
+          <arg>--submit</arg>
+          <arg choice="req"><replaceable>instance</replaceable></arg>
+        </cmdsynopsis>
+
+        <para>
+          Move will move the instance to an arbitrary node in the
+          cluster. This works only for instances having a plain or
+          file disk template.
+        </para>
+
+        <para>
+          Note that since this operation is done via data copy, it
+          will take a long time for big disks (similar to
+          replace-disks for a drbd instance).
+        </para>
+
+        <para>
+          The <option>--shutdown-timeout</option> is used to specify how
+          much time to wait before forcing the shutdown (xm destroy in xen,
+          killing the kvm process, for kvm). By default two minutes are
+          given to each instance to stop.
+        </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 move -n node3.example.com instance1.example.com
+          </screen>
+        </para>
+      </refsect3>
+
     </refsect2>
 
     <refsect2>