mirror of
https://github.com/rancher/plugins.git
synced 2025-07-07 12:10:20 +00:00
Concurrent use of the `portmap` and `firewall` plugins can result in errors during iptables chain creation: - The `portmap` plugin has a time-of-check-time-of-use race where it checks for existence of the chain but the operation isn't atomic. - The `firewall` plugin doesn't check for existing chains and just returns an error. This commit makes both operations idempotent by creating the chain and then discarding the error if it's caused by the chain already existing. It also factors the chain creation out into `pkg/utils` as a site for future refactoring work. Signed-off-by: Tim Gross <tim@0x74696d.com> |
||
---|---|---|
.. | ||
buildversion | ||
hwaddr | ||
sysctl | ||
iptables_test.go | ||
iptables.go | ||
utils_suite_test.go | ||
utils_test.go | ||
utils.go |