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

update configuration for rootless podman #6954

Closed
wants to merge 2 commits into from

Conversation

gatoniel
Copy link

I updated the configuration part of the tutorial on rootless podman. I added the order in which configuration files are read in and a hint, how users can create default configuration in the home directories.

Closes #6777

Signed-off-by: Niklas Netter [email protected]

@@ -106,8 +106,31 @@ Once the Administrator has completed the setup on the machine and then the confi

### User Configuration Files

The Podman configuration files for root reside in `/usr/share/containers` with overrides in `/etc/containers`. In the rootless environment they reside in `${XDG_CONFIG_HOME}/containers` (usually `~/.config/containers`) and are owned by each individual user. The main files are `libpod.conf` and `storage.conf` and the user can modify these files as they wish.
The three main configuration files are `containers.conf`, `storage.conf` and `registries.conf`.
#### containers.conf
Copy link
Member

Choose a reason for hiding this comment

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

Can you add an extra blank line before this header?

2. `/etc/containers/registries.d/*`
3. `HOME/.config/containers/registries.conf`

The files in the home directory should be used to configure rootless podman for personal needs. These files do not exist by default. Users can copy the files from `/usr/share/containers` or `/etc/containers` and modify them.
Copy link
Member

Choose a reason for hiding this comment

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

Suggest rephrasing: "do not exist by default" -> "are not created by default"

@mheon
Copy link
Member

mheon commented Jul 13, 2020

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gatoniel, mheon

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2020
@mheon
Copy link
Member

mheon commented Jul 13, 2020

Thanks for the contribution! Your commit appears to be missing a signoff - can you run git commit -s --amend --no-edit to add one and re-push?

@gatoniel
Copy link
Author

Sorry for the mess. There should now be a signoff.

2. `/etc/containers/registries.d/*`
3. `HOME/.config/containers/registries.conf`

The files in the home directory should be used to configure rootless podman for personal needs. These files are not created by default. Users can copy the files from `/usr/share/containers` or `/etc/containers` and modify them.
Copy link
Member

Choose a reason for hiding this comment

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

I thought some of these files were created by default for a rootless user in their home directory?

Copy link
Member

Choose a reason for hiding this comment

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

Not any longer.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should create the directories. The problem with creating the files, is we ended up hard coding some defaults that we later changed, and users ended up with bad files in their homedirs, which we could not change.

@rhatdan
Copy link
Member

rhatdan commented Jul 15, 2020

@gatoniel You need to rebase and squash your commits as well as sign them

git rebase -i origin
git commit -a --amend -s
git push --force

1. `/etc/containers/storage.conf`
2. `$HOME/.config/containers/storage.conf`

In rootless podman certain fields in `/etc/containers/storage.conf` are ignored.
Copy link
Member

Choose a reason for hiding this comment

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

We should list the fields that are ignored.

       graphroot=""
         container storage graph dir (default: "/var/lib/containers/storage")
         Default directory to store all writable content created by container storage programs.

       runroot=""
         container storage run dir (default: "/var/run/containers/storage")
         Default directory to store all temporary writable content created by container storage programs.

Copy link
Author

Choose a reason for hiding this comment

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

I suggest adding their default values, when in rootless podman. (see new commits). I do not exactly know, if podman really reads out $XDG_RUNTIME_DIR or just defaults to /run/user/$UID.

Copy link
Member

Choose a reason for hiding this comment

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

It uses XDG_RUNTIME_DIR

@rhatdan
Copy link
Member

rhatdan commented Jul 15, 2020

BTW @gatoniel Nice work.

@rhatdan
Copy link
Member

rhatdan commented Jul 16, 2020

You really need to squash your commits and sign the one commit, to get it past the gating test.

@gatoniel gatoniel force-pushed the master branch 2 times, most recently from 7cc4f87 to 6211a5a Compare July 16, 2020 11:47
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 22, 2020
@rhatdan
Copy link
Member

rhatdan commented Jul 23, 2020

@gatoniel still working on this? Needs a rebase and to squash your commits.

@gatoniel
Copy link
Author

@gatoniel still working on this? Needs a rebase and to squash your commits.

I am so sorry for taking your time. I have never used the rebase before. Now I swapped pick -> squash . I hope that´s correct.

How can I resolve the build_each_commit fail?

@rhatdan
Copy link
Member

rhatdan commented Jul 23, 2020

Sadly still needs a rebase.

@rhatdan
Copy link
Member

rhatdan commented Jul 24, 2020

@gatoniel Sadly one more rebase.

I updated the configuration part of the tutorial on rootless podman. I added the order in which configuration files are read in and a hint, how users can create default configuration in the home directories.

Closes containers#6777

Signed-off-by: Niklas Netter <[email protected]>
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2020
@gatoniel
Copy link
Author

I do not think this is a rebase issue. There is always an auto-merging conflict.

I now resolved the auto-merging conflict by using Githubs PR resolver, this added the new commit. The tide test is now pending instead of failing. But build_each_commit is still failing with this error message

source $SCRIPT_BASE/lib.sh &> /dev/null
git fetch --depth 50 origin $DEST_BRANCH |&amp; ${TIMESTAMP}
[11:38:38] START - All [+xxxx] lines that follow are relative to right now.
[+0003s] From https://github.com/containers/podman
[+0003s] * branch master -> FETCH_HEAD
[+0003s] * [new branch] master -> origin/master
[11:38:41] END - [+0003s] total duration since START
make build-all-new-commits GIT_BASE_BRANCH=origin/$DEST_BRANCH |& ${TIMESTAMP}
[11:38:41] START - All [+xxxx] lines that follow are relative to right now.
[+0004s] # Validate that all the commits build on top of origin/master
[+0004s] git rebase origin/master -x make
[+0006s] Rebasing (1/2)
error: could not apply c35c453... update configuration for rootless podman
[+0006s] Resolve all conflicts manually, mark them as resolved with
[+0006s] "git add/rm <conflicted_files>", then run "git rebase --continue".
[+0006s] You can instead skip this commit: run "git rebase --skip".
[+0006s] To abort and get back to the state before "git rebase", run "git rebase --abort".
[+0006s] Could not apply c35c453... update configuration for rootless podman
[+0006s] Auto-merging docs/tutorials/rootless_tutorial.md
[+0006s] CONFLICT (content): Merge conflict in docs/tutorials/rootless_tutorial.md
[+0006s] Adding contrib/systemd/user
[+0006s] make: *** [Makefile:695: build-all-new-commits] Error 1
[11:38:47] END - [+0006s] total duration since START

Exit status: 2

I really do not know what to do.

@rhatdan
Copy link
Member

rhatdan commented Jul 24, 2020

@gatoniel I took this over to complete it #7079
Thanks, I will get it merged.

@rhatdan rhatdan closed this Jul 24, 2020
@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 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 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. 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.

rootless config files are not created
5 participants