Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
=========================
Adding and removing hosts
=========================
This page discusses how to add and remove nodes from an existing cluster. The
procedure differs depending on the type of nodes being added or removed, which
services are running, and how they are configured. Here we will consider two
types of nodes - controllers and compute nodes. Other types of nodes will need
consideration.
Any procedure being used should be tested before being applied in a production
environment.
Adding new hosts
================
.. _adding-new-controllers:
Adding new controllers
----------------------
The :doc:`bootstrap-servers command
</reference/deployment-and-bootstrapping/bootstrap-servers>` can be used to
prepare the new hosts that are being added to the system. It adds an entry to
``/etc/hosts`` for the new hosts, and some services, such as RabbitMQ, require
entries to exist for all controllers on every controller. If using a
``--limit`` argument, ensure that all controllers are included, e.g. via
``--limit control``. Be aware of the :ref:`potential issues <rebootstrapping>`
with running ``bootstrap-servers`` on an existing system.
.. code-block:: console
kolla-ansible -i <inventory> bootstrap-servers [ --limit <limit> ]
Pull down container images to the new hosts. The ``--limit`` argument may be
used and only needs to include the new hosts.
.. code-block:: console
kolla-ansible -i <inventory> pull [ --limit <limit> ]
Deploy containers to the new hosts. If using a ``--limit`` argument, ensure
that all controllers are included, e.g. via ``--limit control``.
.. code-block:: console
kolla-ansible -i <inventory> deploy [ --limit <limit> ]
The new controllers are now deployed. It is recommended to perform testing
of the control plane at this point to verify that the new controllers are
functioning correctly.
Some resources may not be automatically balanced onto the new controllers. It
may be helpful to manually rebalance these resources onto the new controllers.
Examples include networks hosted by Neutron DHCP agent, and routers hosted by
Neutron L3 agent. The `removing-existing-controllers`_ section provides an
example of how to do this.
.. _adding-new-compute-nodes:
Adding new compute nodes
------------------------
The :doc:`bootstrap-servers command
</reference/deployment-and-bootstrapping/bootstrap-servers>`, can be used to
prepare the new hosts that are being added to the system. Be aware of the
:ref:`potential issues <rebootstrapping>` with running ``bootstrap-servers`` on
an existing system.
.. code-block:: console
kolla-ansible -i <inventory> bootstrap-servers [ --limit <limit> ]
Pull down container images to the new hosts. The ``--limit`` argument may be
used and only needs to include the new hosts.
.. code-block:: console
kolla-ansible -i <inventory> pull [ --limit <limit> ]
Deploy containers on the new hosts. The ``--limit`` argument may be used and
only needs to include the new hosts.
.. code-block:: console
kolla-ansible -i <inventory> deploy [ --limit <limit> ]
The new compute nodes are now deployed. It is recommended to perform
testing of the compute nodes at this point to verify that they are functioning
correctly.
Server instances are not automatically balanced onto the new compute nodes. It
may be helpful to live migrate some server instances onto the new hosts.
.. code-block:: console
openstack server migrate <server> --live-migration --host <target host> --os-compute-api-version 2.30
Alternatively, a service such as :watcher-doc:`Watcher </>` may be used to do
this automatically.
Removing existing hosts
=======================
.. _removing-existing-controllers:
Removing existing controllers
-----------------------------
When removing controllers or other hosts running clustered services, consider
whether enough hosts remain in the cluster to form a quorum. For example, in a
system with 3 controllers, only one should be removed at a time. Consider also
the effect this will have on redundancy.
Before removing existing controllers from a cluster, it is recommended to move
resources they are hosting. Here we will cover networks hosted by Neutron DHCP
agent and routers hosted by Neutron L3 agent. Other actions may be necessary,
depending on your environment and configuration.
For each host being removed, find Neutron routers on that host and move them.
Disable the L3 agent. For example:
.. code-block:: console
l3_id=$(openstack network agent list --host <host> --agent-type l3 -f value -c ID)
target_l3_id=$(openstack network agent list --host <target host> --agent-type l3 -f value -c ID)
openstack router list --agent $l3_id -f value -c ID | while read router; do
openstack network agent remove router $l3_id $router --l3
openstack network agent add router $target_l3_id $router --l3
done
openstack network agent set $l3_id --disable
Repeat for DHCP agents:
.. code-block:: console
dhcp_id=$(openstack network agent list --host <host> --agent-type dhcp -f value -c ID)
target_dhcp_id=$(openstack network agent list --host <target host> --agent-type dhcp -f value -c ID)
openstack network list --agent $dhcp_id -f value -c ID | while read network; do
openstack network agent remove network $dhcp_id $network --dhcp
openstack network agent add network $target_dhcp_id $network --dhcp
done
Stop all services running on the hosts being removed:
.. code-block:: console
kolla-ansible -i <inventory> stop --yes-i-really-really-mean-it [ --limit <limit> ]
Remove the hosts from the Ansible inventory.
Reconfigure the remaining controllers to update the membership of clusters such
as MariaDB and RabbitMQ. Use a suitable limit, such as ``--limit control``.
.. code-block:: console
kolla-ansible -i <inventory> deploy [ --limit <limit> ]
Perform testing to verify that the remaining cluster hosts are operating
correctly.
For each host, clean up its services:
.. code-block:: console
openstack network agent list --host <host> -f value -c ID | while read id; do
openstack network agent delete $id
done
openstack compute service list --os-compute-api-version 2.53 --host <host> -f value -c ID | while read id; do
openstack compute service delete --os-compute-api-version 2.53 $id
done
.. _removing-existing-compute-nodes:
Removing existing compute nodes
-------------------------------
When removing compute nodes from a system, consider whether there is capacity
to host the running workload on the remaining compute nodes. Include overhead
for failures that may occur.
Before removing compute nodes from a system, it is recommended to migrate or
destroy any instances that they are hosting.
For each host, disable the compute service to ensure that no new instances are
scheduled to it.
.. code-block:: console
openstack compute service set <host> nova-compute --disable
If possible, live migrate instances to another host.
.. code-block:: console
openstack server list --host <host> -f value -c ID | while read server; do
openstack server migrate --live-migration $server
done
Verify that the migrations were successful.
Stop all services running on the hosts being removed:
.. code-block:: console
kolla-ansible -i <inventory> stop --yes-i-really-really-mean-it [ --limit <limit> ]
Remove the hosts from the Ansible inventory.
Perform testing to verify that the remaining cluster hosts are operating
correctly.
For each host, clean up its services:
.. code-block:: console
openstack network agent list --host <host> -f value -c ID | while read id; do
openstack network agent delete $id
done
openstack compute service list --os-compute-api-version 2.53 --host <host> -f value -c ID | while read id; do
openstack compute service delete --os-compute-api-version 2.53 $id
done