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

Relabel,Chcon: do process the root entry last #165

Merged
merged 3 commits into from
Oct 6, 2021

Conversation

kolyshkin
Copy link
Collaborator

@kolyshkin kolyshkin commented Oct 6, 2021

Commit 8501cfd (PR #161) does not guarantee that the root entry
is processed last -- due to parallel nature of the pwalk it one of the
last to be processed, but might be not the last one.

Rewrite the code to process the root entry after all the others
are done.

Remove the test for root entry being last as the last = p assignment
is racy, and this is now very obvious from the code that the root entry
is indeed the last one.

Fixes: 8501cfd 🤦🏻

While at it:

  • add go 1.17 to test matrix
  • also test with -race flag

Commit 8501cfd does not guarantee that the root entry is processed
last -- due to parallel nature of the pwalk it one of the last to be
processed, but might be not the last one.

Rewrite the code to process the root entry after all the others
are done.

Remove the test for root entry being last as the last = p assignment
is racy, and this is now very obvious from the code that the root entry
is indeed the last one.

Fixes: 8501cfd
Signed-off-by: Kir Kolyshkin <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Collaborator Author

Once merged, we need to

  • add the new tests (1.17.x and -race variants) to required
  • release 1.9.1

Copy link
Collaborator

@rhatdan rhatdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhatdan
Copy link
Collaborator

rhatdan commented Oct 6, 2021

@haircommander @thaJeztah PTAL

@haircommander
Copy link

LGTM

@rhatdan rhatdan merged commit f0aebf1 into opencontainers:main Oct 6, 2021
@kolyshkin kolyshkin mentioned this pull request Oct 6, 2021
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.

3 participants