@@ -227,12 +227,29 @@ Seed Hypervisor firewalld Configuration
227
227
# - state: enabled
228
228
seed_hypervisor_firewalld_rules : " {{ stackhpc_firewalld_rules }}"
229
229
230
+ Kolla-Ansible configuration
231
+ ---------------------------
232
+
233
+ Ensure Kolla Ansible opens up ports in firewalld for services on the public
234
+ API network:
235
+
236
+ .. code-block :: yaml
237
+ :caption : ` ` etc/kayobe/kolla/globals.yml``
238
+
239
+ enable_external_api_firewalld : true
240
+ external_api_firewalld_zone : " {{ public_net_name | net_zone }}"
241
+
242
+ Ensure every network in ``networks.yml `` has a zone defined. The standard
243
+ configuration is to set the internal network zone to ``trusted `` and every
244
+ other zone to the name of the network. See
245
+ ``etc/kayobe/environments/ci-multinode/networks.yml `` for a practical example.
246
+
230
247
Custom rules
231
248
------------
232
249
233
250
Custom firewalld rules can be added to ``stackhpc_firewalld_rules_extra ``
234
251
235
- The variable is a list of firewall rules to apply. Each item is a dict
252
+ The variable is a list of firewall rules to apply. Each item is a dictionary
236
253
containing arguments to pass to the firewalld module. The variable can be
237
254
defined as a group var or host var in the kayobe inventory.
238
255
@@ -314,13 +331,20 @@ It is strongly recommended that you dry-run the changes using ``--diff`` and
314
331
315
332
kayobe overcloud host configure -t firewall --diff --check
316
333
334
+ Baseline checks
335
+ ^^^^^^^^^^^^^^^
336
+
337
+ Before applying, it is a good idea to take note of any actively firing alerts
338
+ and run Tempest to gather a baseline. See the :doc: `Tempest
339
+ </operations/tempest>` page for more details.
340
+
317
341
Applying changes
318
342
----------------
319
343
320
344
Before applying these changes, you should be completely sure you are not going
321
345
to lock yourself out of any hosts. If you are deploying these changes to a test
322
- environment, it might be appropriate to set a password on the stack user so
323
- that you can access the host through a BMC or horizon console.
346
+ environment, consider setting a password on the stack user so that you can
347
+ access the host through a BMC or other virtual console.
324
348
325
349
The following Kayobe command can be used to set a password on all overcloud
326
350
hosts:
@@ -329,6 +353,15 @@ hosts:
329
353
330
354
kayobe overcloud host command run --command " echo 'stack:super-secret-password' | sudo chpasswd" --show-output
331
355
356
+ Alternatively, create a cron job to stop the firewall after some time. If the
357
+ firewall rules block connectivity, you will still be able to get in after the
358
+ job triggers. If the host is still accessible, remove the job. The following
359
+ cron job will stop the firewall service every 10 minutes.
360
+
361
+ .. code-block ::
362
+
363
+ */10 * * * * sudo systemctl stop firewalld
364
+
332
365
Changes should be applied to controllers one at a time to ensure connectivity
333
366
is not lost.
334
367
@@ -352,6 +385,22 @@ configure`` commands to apply the firewall changes:
352
385
# For the rest of the Overcloud hosts
353
386
kayobe overcloud host configure -t network,firewall
354
387
388
+ Debugging
389
+ ---------
390
+
391
+ To test the changes, first check for any firing alerts, then try simple smoke
392
+ tests (create a VM, list OpenStack endpoints etc.), then run Tempest.
393
+
394
+ If the firewall configuration is causing errors, it is often useful to log
395
+ blocked packets.
396
+
397
+ .. code-block :: bash
398
+
399
+ sudo sed -i s/LogDenied=off/LogDenied=all/g /etc/firewalld/firewalld.conf
400
+ sudo systemctl restart firewalld
401
+
402
+ Dropped packets will be logged to ``dmesg ``.
403
+
355
404
How it works
356
405
============
357
406
0 commit comments