Commit 8d5fb04
committed
chore: Remove obsolete firewall_lib offline code
This code is very problematic:
* It has not worked for years, at least not since RHEL 9 (probably
earlier). If firewalld isn't running, this code already crashes in
the `FirewallClient()` instantiation.
* There haven't been any integration tests that cover this. The unit
tests don't cover this as they mock the entire firewalld API, i.e.
they test an API that simply does not exist.
* `firewall.core.fw` is not supported API, but the internal CLI
implementation. That can change at any time (and apparently did,
assuming that the old code worked at *some* point). There is no
offline API [1].
* Even in the current state the implementation was very incomplete.
None of the service/ipset/zone/etc. settings are implemented, only some
parts of zone handling (and not even that, e.g. setting the default zone is
missing as well).
Trying to implement the missing bits with the internal API would be a major
piece of work and go in the wrong direction. Let's rather use the official
methods (`firewall-offline-cmd` or XML editing).
To spare the next person from falling into the "oh, offline is supported"
pitfall, delete all the offline code.
[1] https://issues.redhat.com/browse/RHEL-88425?focusedId=27062772&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-270627721 parent b36278f commit 8d5fb04
2 files changed
+34
-182
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
405 | 393 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 394 | + | |
| 395 | + | |
418 | 396 | | |
419 | 397 | | |
420 | 398 | | |
| |||
993 | 971 | | |
994 | 972 | | |
995 | 973 | | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
1027 | 979 | | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
1031 | 983 | | |
1032 | | - | |
| 984 | + | |
1033 | 985 | | |
1034 | 986 | | |
1035 | 987 | | |
1036 | 988 | | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
1058 | 998 | | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
1065 | 1005 | | |
1066 | 1006 | | |
1067 | 1007 | | |
| |||
1493 | 1433 | | |
1494 | 1434 | | |
1495 | 1435 | | |
1496 | | - | |
| 1436 | + | |
1497 | 1437 | | |
1498 | 1438 | | |
1499 | 1439 | | |
| |||
1572 | 1512 | | |
1573 | 1513 | | |
1574 | 1514 | | |
1575 | | - | |
1576 | | - | |
1577 | | - | |
1578 | | - | |
| 1515 | + | |
1579 | 1516 | | |
1580 | 1517 | | |
1581 | 1518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | 283 | | |
338 | 284 | | |
339 | 285 | | |
| |||
593 | 539 | | |
594 | 540 | | |
595 | 541 | | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | 542 | | |
611 | 543 | | |
612 | 544 | | |
| |||
663 | 595 | | |
664 | 596 | | |
665 | 597 | | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | 598 | | |
684 | 599 | | |
685 | 600 | | |
| |||
0 commit comments