Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add another pattern to IsNotExist #107

Merged
merged 1 commit into from
Jul 31, 2023
Merged

Conversation

danwinship
Copy link
Contributor

With iptables-nft, this can happen:

process 1                       process 2
ask kernel if chain X exists    ask kernel if chain X exists
  --> yes                         --> yes
                                ask kernel to delete chain X
                                  --> OK
ask kernel to delete chain X
  --> ENOENT

You only get the normal "chain doesn't exist" error message if the initial check fails; if another process deletes the chain after that, then it outputs the raw kernel error. (This can happen in the containernetworking/plugins tests.)

So make IsNotExist recognize "No such file or directory".

cc @squeed

With iptables-nft, this can happen:

    process 1                       process 2
    ask kernel if chain X exists    ask kernel if chain X exists
      --> yes                         --> yes
                                    ask kernel to delete chain X
                                      --> OK
    ask kernel to delete chain X
      --> ENOENT

You only get the normal "chain doesn't exist" error message if the
initial check fails; if another process deletes the chain after that,
then it outputs the raw kernel error. (This can happen in the
containernetworking/plugins tests.)

So make IsNotExist recognize "No such file or directory".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants