Implementation plan / Session plan / Handover RC-1-S28-F8
Handover RC-1-S28-F8 Fix: the network-protection test bed routes between its zones on this host¶
Card: RC-1-S28-F8. Issue: cema-care/his#214. Branch: session/RC-1-S28-F8. Slice: RC-1. This is a round 1 fix of the gate session RC-1-S28, for the gate line "Criterion 3: the 49 test scenarios pass (TEST-ISE-029); criterion 4: FR-ISE-NET-001". The work belongs to RC-1-S11 (platform/network-protection). No decision record: the fix changes only the unit's test bed. It changes no rule set, no model, no contract and no later session's work.
The failure and its cause¶
In the gate's run, 7 of the 11 test-bed tests failed. Every flow the allowlist permits was unreachable (ws1 -> gw:443 should pass), and the isolation, inventory and contract tests failed after that.
The rule set was not the cause. With no rule set on the zone edge at all, ws1 still could not reach gw. The cause is in the host's firewall:
- Docker 28 and later add direct-routing protection to bridge networks in the default gateway mode (
nat). This is a raw-table rule for each container:PREROUTING -d <container> ! -i <its bridge> -j DROP. - This host has
br_netfilterloaded, withnet.bridge.bridge-nf-call-iptables=1. That makes bridged frames pass through iptables too. - The two together drop the test bed's traffic. A zone host sends its frame for another zone to the edge container on its own bridge, so the frame enters with the source zone's bridge as its input interface and the other zone's host as its destination. The raw rule drops it before the edge ever sees it. The counters showed it:
DROP ... !br-<secure-edge> ... 172.19.0.3counted the probe's SYNs.
On a host without br_netfilter, frames skip iptables and the test bed worked, which is how RC-1-S11 passed it. The issue's guess (inter-network isolation) pointed the right way, but the rule that drops the frames is the direct-routing protection, not the isolation chains.
What was changed¶
All of it is in platform/network-protection/:
test/testbed/testbed.py:- The zone networks are now made with
com.docker.network.bridge.gateway_mode_ipv4=routed(ZONE_NETWORK_OPTIONS, with the reason in a comment). Routed mode has no direct-routing drop rule and no NAT. Docker's filter still drops everything from outside the bridge except ICMP, since nothing is published. This is tighter thannat-unprotected, the other mode that removes the rule, because that mode opens the containers to direct routing from the LAN.--internalnetworks were tried too; they drop traffic between subnets by address, so they do not work. check_docker()refuses Docker Engine before 27 (when gateway modes came in) with a message naming what is needed. The issue asked that the test bed "say which it needs", and this does.clear_rules()removes the edge'shis_zonestable.test/testbed/test_enforcement.py: the new first test,TestAAZoneRouting.test_the_edge_routes_between_every_pair_of_zones_before_any_rule_set(FR-ISE-NET-001, TEST-ISE-029). With no rule set loaded, it probes each of the 20 ordered pairs of zones through the edge and names any pair the host drops. A host that drops the traffic then shows up as that, not as 7 failures of enforcement.README.md: what the test bed needs and why.
Checks and their results¶
These ran on this host (Docker 29.9.3, kernel 7.0.0-38, br_netfilter loaded), with HIS_SESSION=RC-1-S28-F8. The test-bed objects were named his-np-rc-1-s28-f8-* and none was left behind.
| Check | Command (in platform/network-protection) |
Result |
|---|---|---|
Before the fix (ZONE_NETWORK_OPTIONS = ()) |
python3 test/run.py |
Unit tests 90 of 90 passed. Test bed: 8 of 12 failed, the 7 of the gate plus the new test, with all 20 zone pairs unreachable |
| After the fix | python3 test/run.py |
Unit tests 90 of 90 passed; test bed 12 of 12 passed (67 s) |
| RC-1-S11's "Ends when" | HIS_SESSION=RC-1-S28-F8 scripts/ends-when.sh |
Passed: ci.sh (check, rendering current, 90 + 12 tests), Ansible syntax check, alerts read back from the full profile's backbone |
| The slice scenario | HIS_SESSION=RC-1-S28-F8 e2e/harness/scenario run e2e/scenarios/RC-1 --fresh (from the root) |
Two runs, each 9 passed and 3 failed, but not the same 3: E2E-001, -006 and -013 in run 20261129T113655Z-e68a; E2E-002, -007 and -010 in run 20261129T115539Z-b048. See below |
About the scenario runs. The scenario's stack (e2e/scenarios/RC-1/stack.json) does not include platform/network-protection, and this change touches no file it uses. Every failure was a unit answering 503 unavailable, or a step that follows such an answer, because a call to another unit ran past its deadline. For example, adm-patient-administration logged "policy decision point did not answer in time (250–600 ms), denying". Meanwhile the host's load average was 10 to 16 on 4 cores, with other sessions' containers running. The set of failures changed from one run to the next. The gate session of round 2 runs the scenario again on its own host; this note is for its reading.
What the gate line now shows¶
Criterion 3 (TEST-ISE-029) and criterion 4 (FR-ISE-NET-001): platform/network-protection/test/run.py passes on this host, with 90 unit tests and 12 test-bed tests (11 before, plus the routing test). test/out/results.json lists TEST-ISE-029 and FR-ISE-NET-001 AC-01 to AC-04 as covered by passing tests.
Requirements and test scenarios¶
| Requirement / scenario | Test |
|---|---|
| FR-ISE-NET-001, TEST-ISE-029 (the test bed itself) | TestAAZoneRouting.test_the_edge_routes_between_every_pair_of_zones_before_any_rule_set (new) |
| FR-ISE-NET-001 AC-01 to AC-04, TEST-ISE-029 | RC-1-S11's test-bed tests, unchanged, now passing on this host (see RC-1-S11) |
Different from the specification or contract¶
Nothing.
Follow-ups¶
- Another test bed that routes between Docker networks through a container hits the same drop on a host with
br_netfilterloaded. Its owner should use the same gateway mode. This session found none, but did not look outside its unit. - The RC-1 scenario is sensitive to host load: deadlines of 200 to 600 ms on policy and identity calls fail when several sessions share 4 cores. This is for the launcher's limit on parallel sessions, or for the gate session's choice of host, not for this card.