Commit e1ff0de1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Convert two more 'sh' highlight styles to 'shell-example'

This is straightforward; only one shell example remained, but as we
process the man pages via pandoc and not sphinx, it's not actually
used, we leave it as such for now.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarHelga Velroyen <>
parent 1bf1ce3f
Upgrade notes
.. highlight:: sh
.. highlight:: shell-example
This document details the steps needed to upgrade a cluster to newer versions
of Ganeti.
......@@ -10,7 +10,7 @@ As a general rule the node daemons need to be restarted after each software
upgrade; if using the provided example init.d script, this means running the
following command on all nodes::
/etc/init.d/ganeti restart
$ /etc/init.d/ganeti restart
2.1 and above
......@@ -28,40 +28,40 @@ To run commands on all nodes, the `distributed shell (dsh)
#. Ensure no jobs are running (master node only)::
gnt-job list
$ gnt-job list
#. Stop all daemons on all nodes::
/etc/init.d/ganeti stop
$ /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
$ tar czf /var/lib/ganeti-$(date +\%FT\%T).tar.gz -C /var/lib ganeti
#. Install new Ganeti version on all nodes
#. Run cfgupgrade on the master node::
/usr/lib/ganeti/tools/cfgupgrade --verbose --dry-run
/usr/lib/ganeti/tools/cfgupgrade --verbose
$ /usr/lib/ganeti/tools/cfgupgrade --verbose --dry-run
$ /usr/lib/ganeti/tools/cfgupgrade --verbose
(``cfgupgrade`` supports a number of parameters, run it with
``--help`` for more information)
#. Restart daemons on all nodes::
/etc/init.d/ganeti restart
$ /etc/init.d/ganeti restart
#. Re-distribute configuration (master node only)::
gnt-cluster redist-conf
$ gnt-cluster redist-conf
#. Restart daemons again on all nodes::
/etc/init.d/ganeti restart
$ /etc/init.d/ganeti restart
#. Verify cluster (master node only)::
gnt-cluster verify
$ gnt-cluster verify
2.0 releases
......@@ -114,82 +114,82 @@ Execution (all steps are required in the order given):
#. Make a backup of the current configuration, for safety::
cp -a /var/lib/ganeti /var/lib/ganeti-1.2.backup
$ cp -a /var/lib/ganeti /var/lib/ganeti-1.2.backup
#. Stop all instances::
gnt-instance stop --all
$ gnt-instance stop --all
#. Make sure no DRBD device are in use, the following command should show no
active minors::
gnt-cluster command grep cs: /proc/drbd \| grep -v cs:Unconf
$ gnt-cluster command grep cs: /proc/drbd | grep -v cs:Unconf
#. Stop the node daemons and rapi daemon on all nodes (note: should be logged
in not via the cluster name, but the master node name, as the command below
will remove the cluster ip from the master node)::
gnt-cluster command /etc/init.d/ganeti stop
$ gnt-cluster command /etc/init.d/ganeti stop
#. Install the new software on all nodes, either from packaging (if available)
or from sources; the master daemon will not start but give error messages
about wrong configuration file, which is normal
#. Upgrade the configuration file::
/usr/lib/ganeti/tools/cfgupgrade12 -v --dry-run
/usr/lib/ganeti/tools/cfgupgrade12 -v
$ /usr/lib/ganeti/tools/cfgupgrade12 -v --dry-run
$ /usr/lib/ganeti/tools/cfgupgrade12 -v
#. Make sure ``ganeti-noded`` is running on all nodes (and start it if
#. Start the master daemon::
$ ganeti-masterd
#. Check that a simple node-list works::
gnt-node list
$ gnt-node list
#. Redistribute updated configuration to all nodes::
gnt-cluster redist-conf
gnt-cluster copyfile /var/lib/ganeti/known_hosts
$ gnt-cluster redist-conf
$ gnt-cluster copyfile /var/lib/ganeti/known_hosts
#. Optional: if needed, install RAPI-specific certificates under
:file:`/var/lib/ganeti/rapi.pem` and run::
gnt-cluster copyfile /var/lib/ganeti/rapi.pem
$ gnt-cluster copyfile /var/lib/ganeti/rapi.pem
#. Run a cluster verify, this should show no problems::
gnt-cluster verify
$ gnt-cluster verify
#. Remove some obsolete files::
gnt-cluster command rm /var/lib/ganeti/ssconf_node_pass
gnt-cluster command rm /var/lib/ganeti/ssconf_hypervisor
$ gnt-cluster command rm /var/lib/ganeti/ssconf_node_pass
$ gnt-cluster command rm /var/lib/ganeti/ssconf_hypervisor
#. Update the xen pvm (if this was a pvm cluster) setting for 1.2
gnt-cluster modify -H xen-pvm:root_path=/dev/sda
$ gnt-cluster modify -H xen-pvm:root_path=/dev/sda
#. Depending on your setup, you might also want to reset the initrd parameter::
gnt-cluster modify -H xen-pvm:initrd_path=/boot/initrd-2.6-xenU
$ gnt-cluster modify -H xen-pvm:initrd_path=/boot/initrd-2.6-xenU
#. Reset the instance autobalance setting to default::
for i in $(gnt-instance list -o name --no-headers); do \
gnt-instance modify -B auto_balance=default $i; \
$ for i in $(gnt-instance list -o name --no-headers); do \
gnt-instance modify -B auto_balance=default $i; \
#. Optional: start the RAPI demon::
$ ganeti-rapi
#. Restart instances::
gnt-instance start --force-multiple --all
$ gnt-instance start --force-multiple --all
At this point, ``gnt-cluster verify`` should show no errors and the migration
is complete.
......@@ -250,7 +250,7 @@ Beta 2 switched the config file format to JSON. Steps to upgrade:
#. Make a backup copy of the config file
#. Upgrade the config file using the following command::
/usr/share/ganeti/cfgupgrade --verbose /var/lib/ganeti/
$ /usr/share/ganeti/cfgupgrade --verbose /var/lib/ganeti/
#. Start the daemons and run ``gnt-cluster info``, ``gnt-node list`` and
``gnt-instance list`` to check if the upgrade process finished successfully
......@@ -243,15 +243,15 @@ Ganeti includes a standalone RAPI client, ``lib/rapi/``.
.. highlight:: sh
.. highlight:: shell-example
Using wget::
wget -q -O - https://CLUSTERNAME:5080/2/info
$ wget -q -O - https://%CLUSTERNAME%:5080/2/info
or curl::
curl https://CLUSTERNAME:5080/2/info
$ curl https://%CLUSTERNAME%:5080/2/info
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment