Skip to content

Add another pattern to IsNotExist#107

Merged
squeed merged 1 commit into
coreos:mainfrom
danwinship:IsNotExist
Jul 31, 2023
Merged

Add another pattern to IsNotExist#107
squeed merged 1 commit into
coreos:mainfrom
danwinship:IsNotExist

Conversation

@danwinship

Copy link
Copy Markdown
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