ci: 057-mqttbroker.t: fix random issue in firewall check

We’re seeing following random test failures:

 --- .gitlab/tests/cram/generic/acceleration-plan-components/057-mqttbroker.t
 +++ .gitlab/tests/cram/generic/acceleration-plan-components/057-mqttbroker.t.err
 @@ -40,6 +40,7 @@
    $ R "iptables -nvL | grep 1883 | grep -v '^Chain'"
        0     0 ACCEPT     6    --  lo     *       0.0.0.0/0            0.0.0.0/0            tcp dpt:1883
    $ R "iptables -nvL | grep 8883 | grep -v '^Chain'"
 +    722 78883 ACCEPT     0    --  lo     *       0.0.0.0/0            0.0.0.0/0
        0     0 ACCEPT     6    --  br-lan *       0.0.0.0/0            0.0.0.0/0            tcp dpt:8883

which seems to be caused by a wrong grep pattern for generic number
8883, so lets fix it by adding dpt: prefix to the grep pattern to filter
out proper iptables rules.

Fixes: PPW-883
Link: https://gitlab.com/prpl-foundation/prplos/prplos/-/jobs/11266235778#L109
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
This commit is contained in:
Petr Štetiar 2025-09-09 09:03:42 +00:00
parent d0b51145bc
commit ab5fabf231
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -37,9 +37,9 @@ Check the root datamodel settings:
Check that firewall is configured properly:
$ R "iptables -nvL | grep 1883 | grep -v '^Chain'"
$ R "iptables -nvL | grep dpt:1883 | grep -v '^Chain'"
0 0 ACCEPT 6 -- lo * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1883
$ R "iptables -nvL | grep 8883 | grep -v '^Chain'"
$ R "iptables -nvL | grep dpt:8883 | grep -v '^Chain'"
0 0 ACCEPT 6 -- br-lan * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8883
Check if local connections work: