Merge branch 'stable-2.9' into stable-2.10
[ganeti-local] / UPGRADE
diff --git a/UPGRADE b/UPGRADE
index 61e1b9c..aef642c 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -30,6 +30,10 @@ To run commands on all nodes, the `distributed shell (dsh)
 
     $ gnt-job list
 
+#. Pause the watcher for an hour (master node only)::
+
+    $ gnt-cluster watcher pause 1h
+
 #. Stop all daemons on all nodes::
 
     $ /etc/init.d/ganeti stop
@@ -38,6 +42,10 @@ To run commands on all nodes, the `distributed shell (dsh)
 
     $ tar czf /var/lib/ganeti-$(date +\%FT\%T).tar.gz -C /var/lib ganeti
 
+    (``/var/lib/ganeti`` can also contain exported instances, so make sure to
+    backup only files you are interested in. Use ``--exclude export`` for
+    example)
+
 #. Install new Ganeti version on all nodes
 #. Run cfgupgrade on the master node::
 
@@ -47,6 +55,18 @@ To run commands on all nodes, the `distributed shell (dsh)
    (``cfgupgrade`` supports a number of parameters, run it with
    ``--help`` for more information)
 
+#. Upgrade the directory permissions on all nodes::
+
+    $ /usr/lib/ganeti/ensure-dirs --full-run
+
+#. Create the (missing) required users and make users part of the required
+   groups on all nodes::
+
+    $ /usr/lib/ganeti/tools/users-setup
+
+   This will ask for confirmation. To execute directly, add the ``--yes-do-it``
+   option.
+
 #. Restart daemons on all nodes::
 
     $ /etc/init.d/ganeti restart
@@ -55,10 +75,95 @@ To run commands on all nodes, the `distributed shell (dsh)
 
     $ gnt-cluster redist-conf
 
+#. If you use file storage, check that the ``/etc/ganeti/file-storage-paths``
+   is correct on all nodes. For security reasons it's not copied
+   automatically, but it can be copied manually via::
+
+   $ gnt-cluster copyfile /etc/ganeti/file-storage-paths
+
 #. Restart daemons again on all nodes::
 
     $ /etc/init.d/ganeti restart
 
+#. Enable the watcher again (master node only)::
+
+    $ gnt-cluster watcher continue
+
+#. Verify cluster (master node only)::
+
+    $ gnt-cluster verify
+
+Reverting an upgrade
+~~~~~~~~~~~~~~~~~~~~
+
+For going back between revisions (e.g. 2.1.1 to 2.1.0) no manual
+intervention is required, as for upgrades.
+
+Starting from version 2.8, ``cfgupgrade`` supports ``--downgrade``
+option to bring the configuration back to the previous stable version.
+This is useful if you upgrade Ganeti and after some time you run into
+problems with the new version. You can downgrade the configuration
+without losing the changes made since the upgrade. Any feature not
+supported by the old version will be removed from the configuration, of
+course, but you get a warning about it. If there is any new feature and
+you haven't changed from its default value, you don't have to worry
+about it, as it will get the same value whenever you'll upgrade again.
+
+The procedure is similar to upgrading, but please notice that you have to
+revert the configuration **before** installing the old version.
+
+#. Ensure no jobs are running (master node only)::
+
+    $ gnt-job list
+
+#. Pause the watcher for an hour (master node only)::
+
+    $ gnt-cluster watcher pause 1h
+
+#. Stop all daemons on all nodes::
+
+    $ /etc/init.d/ganeti stop
+
+#. Backup old configuration (master node only)::
+
+    $ tar czf /var/lib/ganeti-$(date +\%FT\%T).tar.gz -C /var/lib ganeti
+
+#. Run cfgupgrade on the master node::
+
+    $ /usr/lib/ganeti/tools/cfgupgrade --verbose --downgrade --dry-run
+    $ /usr/lib/ganeti/tools/cfgupgrade --verbose --downgrade
+
+   You may want to copy all the messages about features that have been
+   removed during the downgrade, in case you want to restore them when
+   upgrading again.
+
+#. Install the old Ganeti version on all nodes
+
+   NB: in Ganeti 2.8, the ``cmdlib.py`` file was split into a series of files
+   contained in the ``cmdlib`` directory. If Ganeti is installed from sources
+   and not from a package, while downgrading Ganeti to a pre-2.8
+   version it is important to remember to remove the ``cmdlib`` directory
+   from the directory containing the Ganeti python files (which usually is
+   ``${PREFIX}/lib/python${VERSION}/dist-packages/ganeti``).
+   A simpler upgrade/downgrade procedure will be made available in future
+   versions of Ganeti.
+
+#. Restart daemons on all nodes::
+
+    $ /etc/init.d/ganeti restart
+
+#. Re-distribute configuration (master node only)::
+
+    $ gnt-cluster redist-conf
+
+#. Restart daemons again on all nodes::
+
+    $ /etc/init.d/ganeti restart
+
+#. Enable the watcher again (master node only)::
+
+    $ gnt-cluster watcher continue
+
 #. Verify cluster (master node only)::
 
     $ gnt-cluster verify