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

[4.8] libct/init_linux: retry chdir to fix EPERM #43

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

haircommander
Copy link
Collaborator

Alas, the EPERM on chdir saga continues...

Unfortunately, the there were two releases between when opencontainers/runc@5e0e67d was released
and when the workaround opencontainers/runc#2712 was added.

Between this, folks started relying on the ability to have a workdir that the container user doesn't have access to.

Since this case was previously valid, we should continue support for it.

Now, we retry the chdir:
Once at the top of the function (to catch cases where the runc user has access, but container user does not)
and once after we setup user (to catch cases where the container user has access, and the runc user does not)

Add a test case for this as well.

cherry-pick of opencontainers/runc@6ce2d63

Signed-off-by: Peter Hunt [email protected]

Alas, the EPERM on chdir saga continues...

Unfortunately, the there were two releases between when opencontainers/runc@5e0e67d  was released
and when the workaround opencontainers/runc#2712 was added.

Between this, folks started relying on the ability to have a workdir that the container user doesn't have access to.

Since this case was previously valid, we should continue support for it.

Now, we retry the chdir:
Once at the top of the function (to catch cases where the runc user has access, but container user does not)
and once after we setup user (to catch cases where the container user has access, and the runc user does not)

Add a test case for this as well.

Signed-off-by: Peter Hunt <[email protected]>
@haircommander haircommander changed the title libct/init_linux: retry chdir to fix EPERM [4.8] libct/init_linux: retry chdir to fix EPERM Apr 7, 2021
Copy link

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@kolyshkin kolyshkin merged commit 9649855 into projectatomic:rhaos-4.8 Apr 14, 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