diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-30 15:59:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 15:59:02 +0200 |
commit | c0802e72c2b325a92e0445d2de5774d16995a5bf (patch) | |
tree | c33a1d74faa161d43055fa09b08fe546e9357fb4 | |
parent | 5eb59509be5862da75715a07602b64dedd65899e (diff) | |
parent | c5f9819dac5c8d6d68316140760c0d45206316bd (diff) | |
download | podman-c0802e72c2b325a92e0445d2de5774d16995a5bf.tar.gz podman-c0802e72c2b325a92e0445d2de5774d16995a5bf.tar.bz2 podman-c0802e72c2b325a92e0445d2de5774d16995a5bf.zip |
Merge pull request #9881 from Luap99/net-reload-silence-errors
Silence podman network reload errors with iptables-nft
-rw-r--r-- | libpod/networking_linux.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index d6968a6b5..8bf532f66 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -916,7 +916,8 @@ func (r *Runtime) reloadContainerNetwork(ctr *Container) ([]*cnitypes.Result, er // teardownCNI will error if the iptables rules do not exists and this is the case after // a firewall reload. The purpose of network reload is to recreate the rules if they do // not exists so we should not log this specific error as error. This would confuse users otherwise. - b, rerr := regexp.MatchString("Couldn't load target `CNI-[a-f0-9]{24}':No such file or directory", err.Error()) + // iptables-legacy and iptables-nft will create different errors make sure to match both. + b, rerr := regexp.MatchString("Couldn't load target `CNI-[a-f0-9]{24}':No such file or directory|Chain 'CNI-[a-f0-9]{24}' does not exist", err.Error()) if rerr == nil && !b { logrus.Error(err) } else { |