1 |
1 |
Upgrade notes
|
2 |
2 |
=============
|
3 |
3 |
|
4 |
|
.. highlight:: sh
|
|
4 |
.. highlight:: shell-example
|
5 |
5 |
|
6 |
6 |
This document details the steps needed to upgrade a cluster to newer versions
|
7 |
7 |
of Ganeti.
|
... | ... | |
10 |
10 |
upgrade; if using the provided example init.d script, this means running the
|
11 |
11 |
following command on all nodes::
|
12 |
12 |
|
13 |
|
/etc/init.d/ganeti restart
|
|
13 |
$ /etc/init.d/ganeti restart
|
14 |
14 |
|
15 |
15 |
|
16 |
16 |
2.1 and above
|
... | ... | |
28 |
28 |
|
29 |
29 |
#. Ensure no jobs are running (master node only)::
|
30 |
30 |
|
31 |
|
gnt-job list
|
|
31 |
$ gnt-job list
|
32 |
32 |
|
33 |
33 |
#. Stop all daemons on all nodes::
|
34 |
34 |
|
35 |
|
/etc/init.d/ganeti stop
|
|
35 |
$ /etc/init.d/ganeti stop
|
36 |
36 |
|
37 |
37 |
#. Backup old configuration (master node only)::
|
38 |
38 |
|
39 |
|
tar czf /var/lib/ganeti-$(date +%FT%T).tar.gz -C /var/lib ganeti
|
|
39 |
$ tar czf /var/lib/ganeti-$(date +\%FT\%T).tar.gz -C /var/lib ganeti
|
40 |
40 |
|
41 |
41 |
#. Install new Ganeti version on all nodes
|
42 |
42 |
#. Run cfgupgrade on the master node::
|
43 |
43 |
|
44 |
|
/usr/lib/ganeti/tools/cfgupgrade --verbose --dry-run
|
45 |
|
/usr/lib/ganeti/tools/cfgupgrade --verbose
|
|
44 |
$ /usr/lib/ganeti/tools/cfgupgrade --verbose --dry-run
|
|
45 |
$ /usr/lib/ganeti/tools/cfgupgrade --verbose
|
46 |
46 |
|
47 |
47 |
(``cfgupgrade`` supports a number of parameters, run it with
|
48 |
48 |
``--help`` for more information)
|
49 |
49 |
|
50 |
50 |
#. Restart daemons on all nodes::
|
51 |
51 |
|
52 |
|
/etc/init.d/ganeti restart
|
|
52 |
$ /etc/init.d/ganeti restart
|
53 |
53 |
|
54 |
54 |
#. Re-distribute configuration (master node only)::
|
55 |
55 |
|
56 |
|
gnt-cluster redist-conf
|
|
56 |
$ gnt-cluster redist-conf
|
57 |
57 |
|
58 |
58 |
#. Restart daemons again on all nodes::
|
59 |
59 |
|
60 |
|
/etc/init.d/ganeti restart
|
|
60 |
$ /etc/init.d/ganeti restart
|
61 |
61 |
|
62 |
62 |
#. Verify cluster (master node only)::
|
63 |
63 |
|
64 |
|
gnt-cluster verify
|
|
64 |
$ gnt-cluster verify
|
65 |
65 |
|
66 |
66 |
|
67 |
67 |
2.0 releases
|
... | ... | |
114 |
114 |
|
115 |
115 |
#. Make a backup of the current configuration, for safety::
|
116 |
116 |
|
117 |
|
cp -a /var/lib/ganeti /var/lib/ganeti-1.2.backup
|
|
117 |
$ cp -a /var/lib/ganeti /var/lib/ganeti-1.2.backup
|
118 |
118 |
|
119 |
119 |
#. Stop all instances::
|
120 |
120 |
|
121 |
|
gnt-instance stop --all
|
|
121 |
$ gnt-instance stop --all
|
122 |
122 |
|
123 |
123 |
#. Make sure no DRBD device are in use, the following command should show no
|
124 |
124 |
active minors::
|
125 |
125 |
|
126 |
|
gnt-cluster command grep cs: /proc/drbd \| grep -v cs:Unconf
|
|
126 |
$ gnt-cluster command grep cs: /proc/drbd | grep -v cs:Unconf
|
127 |
127 |
|
128 |
128 |
#. Stop the node daemons and rapi daemon on all nodes (note: should be logged
|
129 |
129 |
in not via the cluster name, but the master node name, as the command below
|
130 |
130 |
will remove the cluster ip from the master node)::
|
131 |
131 |
|
132 |
|
gnt-cluster command /etc/init.d/ganeti stop
|
|
132 |
$ gnt-cluster command /etc/init.d/ganeti stop
|
133 |
133 |
|
134 |
134 |
#. Install the new software on all nodes, either from packaging (if available)
|
135 |
135 |
or from sources; the master daemon will not start but give error messages
|
136 |
136 |
about wrong configuration file, which is normal
|
137 |
137 |
#. Upgrade the configuration file::
|
138 |
138 |
|
139 |
|
/usr/lib/ganeti/tools/cfgupgrade12 -v --dry-run
|
140 |
|
/usr/lib/ganeti/tools/cfgupgrade12 -v
|
|
139 |
$ /usr/lib/ganeti/tools/cfgupgrade12 -v --dry-run
|
|
140 |
$ /usr/lib/ganeti/tools/cfgupgrade12 -v
|
141 |
141 |
|
142 |
142 |
#. Make sure ``ganeti-noded`` is running on all nodes (and start it if
|
143 |
143 |
not)
|
144 |
144 |
#. Start the master daemon::
|
145 |
145 |
|
146 |
|
ganeti-masterd
|
|
146 |
$ ganeti-masterd
|
147 |
147 |
|
148 |
148 |
#. Check that a simple node-list works::
|
149 |
149 |
|
150 |
|
gnt-node list
|
|
150 |
$ gnt-node list
|
151 |
151 |
|
152 |
152 |
#. Redistribute updated configuration to all nodes::
|
153 |
153 |
|
154 |
|
gnt-cluster redist-conf
|
155 |
|
gnt-cluster copyfile /var/lib/ganeti/known_hosts
|
|
154 |
$ gnt-cluster redist-conf
|
|
155 |
$ gnt-cluster copyfile /var/lib/ganeti/known_hosts
|
156 |
156 |
|
157 |
157 |
#. Optional: if needed, install RAPI-specific certificates under
|
158 |
158 |
:file:`/var/lib/ganeti/rapi.pem` and run::
|
159 |
159 |
|
160 |
|
gnt-cluster copyfile /var/lib/ganeti/rapi.pem
|
|
160 |
$ gnt-cluster copyfile /var/lib/ganeti/rapi.pem
|
161 |
161 |
|
162 |
162 |
#. Run a cluster verify, this should show no problems::
|
163 |
163 |
|
164 |
|
gnt-cluster verify
|
|
164 |
$ gnt-cluster verify
|
165 |
165 |
|
166 |
166 |
#. Remove some obsolete files::
|
167 |
167 |
|
168 |
|
gnt-cluster command rm /var/lib/ganeti/ssconf_node_pass
|
169 |
|
gnt-cluster command rm /var/lib/ganeti/ssconf_hypervisor
|
|
168 |
$ gnt-cluster command rm /var/lib/ganeti/ssconf_node_pass
|
|
169 |
$ gnt-cluster command rm /var/lib/ganeti/ssconf_hypervisor
|
170 |
170 |
|
171 |
171 |
#. Update the xen pvm (if this was a pvm cluster) setting for 1.2
|
172 |
172 |
compatibility::
|
173 |
173 |
|
174 |
|
gnt-cluster modify -H xen-pvm:root_path=/dev/sda
|
|
174 |
$ gnt-cluster modify -H xen-pvm:root_path=/dev/sda
|
175 |
175 |
|
176 |
176 |
#. Depending on your setup, you might also want to reset the initrd parameter::
|
177 |
177 |
|
178 |
|
gnt-cluster modify -H xen-pvm:initrd_path=/boot/initrd-2.6-xenU
|
|
178 |
$ gnt-cluster modify -H xen-pvm:initrd_path=/boot/initrd-2.6-xenU
|
179 |
179 |
|
180 |
180 |
#. Reset the instance autobalance setting to default::
|
181 |
181 |
|
182 |
|
for i in $(gnt-instance list -o name --no-headers); do \
|
183 |
|
gnt-instance modify -B auto_balance=default $i; \
|
184 |
|
done
|
|
182 |
$ for i in $(gnt-instance list -o name --no-headers); do \
|
|
183 |
gnt-instance modify -B auto_balance=default $i; \
|
|
184 |
done
|
185 |
185 |
|
186 |
186 |
#. Optional: start the RAPI demon::
|
187 |
187 |
|
188 |
|
ganeti-rapi
|
|
188 |
$ ganeti-rapi
|
189 |
189 |
|
190 |
190 |
#. Restart instances::
|
191 |
191 |
|
192 |
|
gnt-instance start --force-multiple --all
|
|
192 |
$ gnt-instance start --force-multiple --all
|
193 |
193 |
|
194 |
194 |
At this point, ``gnt-cluster verify`` should show no errors and the migration
|
195 |
195 |
is complete.
|
... | ... | |
250 |
250 |
#. Make a backup copy of the config file
|
251 |
251 |
#. Upgrade the config file using the following command::
|
252 |
252 |
|
253 |
|
/usr/share/ganeti/cfgupgrade --verbose /var/lib/ganeti/config.data
|
|
253 |
$ /usr/share/ganeti/cfgupgrade --verbose /var/lib/ganeti/config.data
|
254 |
254 |
|
255 |
255 |
#. Start the daemons and run ``gnt-cluster info``, ``gnt-node list`` and
|
256 |
256 |
``gnt-instance list`` to check if the upgrade process finished successfully
|