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

[CI:DOCS] Add --userns=keep-id, --uidmap, --gidmap troubleshooting #13084

Conversation

eriksjolund
Copy link
Contributor

  • Add troubleshooting advice regarding --userns=keep-id, --uidmap
    and --gidmap : "Passed-in devices or files can't be accessed in
    rootless container or a container creates files that can't be
    accessed by the regular user on the host"

Signed-off-by: Erik Sjölund [email protected]

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 30, 2022
@eriksjolund eriksjolund force-pushed the troubleshooting_userns_keep_id_uidmap_gidmap branch 3 times, most recently from 9ad1d48 to ab1c0b0 Compare January 30, 2022 17:03
@@ -919,3 +919,113 @@ After deleting a client VM on macOS via `podman machine stop` && `podman machine
### Solution

You will need to remove the hanging gv-proxy process bound to the port in question. For example, if the port mentioned in the error message is 127.0.0.1:7777, you can use the command `kill -9 $(lsof -i:7777)` in order to identify and remove the hanging process which prevents you from starting a new VM on that default port.

### 32) Passed-in devices or files can't be accessed in rootless container or a container creates files that can't be accessed by the regular user on the host
Copy link
Member

Choose a reason for hiding this comment

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

These should be broken into two separate examples. Putting them into 1 is confusing to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. I split them in two.

@eriksjolund eriksjolund force-pushed the troubleshooting_userns_keep_id_uidmap_gidmap branch 11 times, most recently from a172ef8 to 8bd0698 Compare January 31, 2022 21:56
troubleshooting.md Outdated Show resolved Hide resolved
troubleshooting.md Outdated Show resolved Hide resolved
troubleshooting.md Outdated Show resolved Hide resolved
troubleshooting.md Outdated Show resolved Hide resolved
troubleshooting.md Outdated Show resolved Hide resolved
troubleshooting.md Outdated Show resolved Hide resolved
@eriksjolund
Copy link
Contributor Author

Thanks @TomSweeneyRedHat for the feedback. I'll have a look during the weekend. The state of the text is still somewhat in a flow. The big picture of what I intend to put in the PR is there, but I might change a few things.

@eriksjolund
Copy link
Contributor Author

eriksjolund commented Feb 6, 2022

I noticed that

2) Can't use volume mount, get permission denied
20) Passed-in devices or files can't be accessed in rootless container 
33) Passed-in devices or files can't be accessed in rootless container

describe different permission denied problems.
An idea would be to restructure a bit and rename the sections to:

2) Can't use volume mount, get permission denied (SELINUX)
20) Passed-in devices or files can't be accessed in rootless container (supplementary groups)
33) Passed-in devices or files can't be accessed in rootless container (UID/GID mapping)

https://github.com/eriksjolund/podman/blob/restructure_permission_denied_troubleshooting_tips/troubleshooting.md
(I created another branch)

In the other branch I also modified text regarding "Jupyter Notebook container" and "Postgres image" was modified.

troubleshooting.md Outdated Show resolved Hide resolved
troubleshooting.md Outdated Show resolved Hide resolved
@eriksjolund eriksjolund force-pushed the troubleshooting_userns_keep_id_uidmap_gidmap branch from 4bf6dba to d836ea4 Compare February 11, 2022 16:21
@eriksjolund eriksjolund marked this pull request as ready for review February 11, 2022 16:30
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 11, 2022
@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2022

You have to fix your trailing whitespace.

@eriksjolund eriksjolund force-pushed the troubleshooting_userns_keep_id_uidmap_gidmap branch from d836ea4 to 0c431b0 Compare February 11, 2022 18:14
@eriksjolund
Copy link
Contributor Author

You have to fix your trailing whitespace.

Fixed

* Add troubleshooting advice: "Container creates a file that is
  not owned by the user's regular UID". The solution involves
  using the options --uidmap and --gidmap.

* Add troubleshooting advice: "Passed-in devices or files can't be
  accessed in rootless container (UID/GID mapping problem)".
  The general solution involves using the options --uidmap and
  --gidmap. Sometimes --userns=keep-id could be used.

Co-authored-by: Tom Sweeney <[email protected]>

Signed-off-by: Erik Sjölund <[email protected]>
@eriksjolund eriksjolund force-pushed the troubleshooting_userns_keep_id_uidmap_gidmap branch from 0c431b0 to 3b5a3f4 Compare February 12, 2022 06:29
@eriksjolund
Copy link
Contributor Author

eriksjolund commented Feb 12, 2022

I force pushed a new version that added a few sentences "Would it have been possible to run Podman in another way ..."

@rhatdan
Copy link
Member

rhatdan commented Feb 14, 2022

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2022
Copy link
Member

@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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eriksjolund, giuseppe, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Feb 14, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2022
@openshift-merge-robot openshift-merge-robot merged commit ba50e5d into containers:main Feb 14, 2022
@eriksjolund eriksjolund deleted the troubleshooting_userns_keep_id_uidmap_gidmap branch July 27, 2022 04:54
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants