Skip to content

Commit 00d5452

Browse files
committed
Update firewall docs post-EIDF
1 parent 4cb67ff commit 00d5452

File tree

1 file changed

+52
-3
lines changed

1 file changed

+52
-3
lines changed

doc/source/configuration/firewall.rst

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,29 @@ Seed Hypervisor firewalld Configuration
227227
# - state: enabled
228228
seed_hypervisor_firewalld_rules: "{{ stackhpc_firewalld_rules }}"
229229
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+
230247
Custom rules
231248
------------
232249

233250
Custom firewalld rules can be added to ``stackhpc_firewalld_rules_extra``
234251

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
236253
containing arguments to pass to the firewalld module. The variable can be
237254
defined as a group var or host var in the kayobe inventory.
238255

@@ -314,13 +331,20 @@ It is strongly recommended that you dry-run the changes using ``--diff`` and
314331
315332
kayobe overcloud host configure -t firewall --diff --check
316333
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+
317341
Applying changes
318342
----------------
319343

320344
Before applying these changes, you should be completely sure you are not going
321345
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.
324348

325349
The following Kayobe command can be used to set a password on all overcloud
326350
hosts:
@@ -329,6 +353,15 @@ hosts:
329353
330354
kayobe overcloud host command run --command "echo 'stack:super-secret-password' | sudo chpasswd" --show-output
331355
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+
332365
Changes should be applied to controllers one at a time to ensure connectivity
333366
is not lost.
334367

@@ -352,6 +385,22 @@ configure`` commands to apply the firewall changes:
352385
# For the rest of the Overcloud hosts
353386
kayobe overcloud host configure -t network,firewall
354387
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+
355404
How it works
356405
============
357406

0 commit comments

Comments
 (0)