More sane handling of errors during failover
[ganeti-local] / man / gnt-instance.sgml
index c2a3f5f..39ab31c 100644 (file)
 
         <cmdsynopsis>
           <command>remove</command>
+          <arg>--ignore-failures</arg>
           <arg choice="req"><replaceable>instance</replaceable></arg>
         </cmdsynopsis>
 
           you are not sure if you use an instance again, use
           <command>shutdown</command> first and leave it in the
           shutdown state for a while.
+
+        </para>
+
+        <para>
+          The <option>--ignore-failures</option> option will cause the
+          removal to proceed even in the presence of errors during the
+          removal of the instance (e.g. during the shutdown or the
+          disk removal). If this option is not given, the command will
+          stop at the first error.
         </para>
 
         <para>
         </para>
       </refsect3>
 
+      <refsect3>
+        <title>RENAME</title>
+
+        <cmdsynopsis>
+          <command>rename</command>
+          <arg>--no-ip-check</arg>
+          <arg choice="req"><replaceable>instance</replaceable></arg>
+          <arg choice="req"><replaceable>new_name</replaceable></arg>
+        </cmdsynopsis>
+
+        <para>
+          Renames the given instance. The instance must be stopped
+          when running this command. The requirements for the new name
+          are the same as for adding an instance: the new name must be
+          resolvable and the IP it resolves to must not be reachable
+          (in order to prevent duplicate IPs the next time the
+          instance is started). The IP test can be skipped if the
+          <option>--no-ip-check</option> option is passed.
+        </para>
+      </refsect3>
+
     </refsect2>
 
     <refsect2>
           <option>--primary</option>, <option>--secondary</option> and
           <option>--all</option> options are similar as for the
           <command>startup</command> command and they influence the
-          actual instances being shutodnw.
+          actual instances being shutdown.
         </para>
 
         <para>
       </refsect3>
 
       <refsect3>
+        <title>REBOOT</title>
+
+        <cmdsynopsis>
+          <command>reboot</command>
+          <sbr>
+          <arg>--extra=<replaceable>PARAMS</replaceable></arg>
+          <sbr>
+          <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
+          <sbr>
+          <arg>--ignore-secondaries</arg>
+          <sbr>
+          <arg>--force-multiple</arg>
+          <sbr>
+          <group choice="opt">
+            <arg>--instance</arg>
+            <arg>--node</arg>
+            <arg>--primary</arg>
+            <arg>--secondary</arg>
+            <arg>--all</arg>
+          </group>
+          <sbr>
+
+          <arg choice="opt"
+          rep="repeat"><replaceable>name</replaceable></arg>
+        </cmdsynopsis>
+
+        <para>
+          Reboots one or more instances. The type of reboot depends on
+          the value of <option>--type</option>. A soft reboot does a
+          hypervisor reboot, a hard reboot does a instance stop,
+          recreates the hypervisor config for the instance and
+          starts the instance. A full reboot does the equivalent
+          of <command>gnt-instance shutdown &amp;&amp; gnt-instance
+          startup</command>. The default is soft reboot.
+        </para>
+
+        <para>
+          For the hard reboot the option
+          <option>--ignore-secondaries</option> ignores errors for the
+          secondary node while re-assembling the instance disks.
+        </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
+          <command>startup</command> command and they influence the
+          actual instances being rebooted.
+        </para>
+        
+        <para>
+          Use the <option>--force-multiple</option> to keep
+          gnt-instance from asking for confirmation when more than one
+          instance is affected.
+        </para>
+
+        <para>
+          Example:
+          <screen>
+# gnt-instance reboot instance1.example.com
+# gnt-instance reboot --type=full instance1.example.com
+          </screen>
+        </para>
+      </refsect3>
+
+      <refsect3>
         <title>CONSOLE</title>
         <cmdsynopsis>
           <command>console</command>
@@ -716,7 +813,10 @@ node1.example.com:sdb:/dev/md1
           disks before failing over the instance. If you are trying to
           migrate instances off a dead node, this will fail. Use the
           <option>--ignore-consistency</option> option for this
-          purpose.
+          purpose. Note that this option can be dangerous as errors in
+          shutting down the instance will be ignored, resulting in
+          possibly having the instance running on two machines in
+          parallel (on disconnected DRBD drives).
         </para>
 
         <para>
@@ -729,6 +829,70 @@ node1.example.com:sdb:/dev/md1
 
     </refsect2>
 
+    <refsect2>
+      <title>TAGS</title>
+
+    <refsect3>
+        <title>ADD-TAGS</title>
+
+        <cmdsynopsis>
+          <command>add-tags</command>
+          <arg choice="opt">--from <replaceable>file</replaceable></arg>
+          <arg choice="req"><replaceable>instancename</replaceable></arg>
+          <arg choice="req"
+            rep="repeat"><replaceable>tag</replaceable></arg>
+        </cmdsynopsis>
+
+        <para>
+          Add tags to the given instance. If any of the tags contains
+          invalid characters, the entire operation will abort.
+        </para>
+        <para>
+          If the <option>--from</option> option is given, the list of
+          tags will be extended with the contents of that file (each
+          line becomes a tag). In this case, there is not need to pass
+          tags on the command line (if you do, both sources will be
+          used). A file name of - will be interpreted as stdin.
+        </para>
+      </refsect3>
+
+      <refsect3>
+        <title>LIST-TAGS</title>
+
+        <cmdsynopsis>
+          <command>list-tags</command>
+          <arg choice="req"><replaceable>instancename</replaceable></arg>
+        </cmdsynopsis>
+
+        <para>List the tags of the given instance.</para>
+      </refsect3>
+
+      <refsect3>
+        <title>REMOVE-TAGS</title>
+        <cmdsynopsis>
+          <command>remove-tags</command>
+          <arg choice="opt">--from <replaceable>file</replaceable></arg>
+          <arg choice="req"><replaceable>instancename</replaceable></arg>
+          <arg choice="req"
+            rep="repeat"><replaceable>tag</replaceable></arg>
+        </cmdsynopsis>
+
+        <para>
+          Remove tags from the given instance. If any of the tags are
+          not existing on the node, the entire operation will abort.
+        </para>
+
+        <para>
+          If the <option>--from</option> option is given, the list of
+          tags will be extended with the contents of that file (each
+          line becomes a tag). In this case, there is not need to pass
+          tags on the command line (if you do, both sources will be
+          used). A file name of - will be interpreted as stdin.
+        </para>
+      </refsect3>
+
+    </refsect2>
+
   </refsect1>
 
   &footer;