Commit Graph

14 Commits

Author SHA1 Message Date
Daniel J Walsh 53d3f2ca52 Revert #952, we don't want to use /run/user on non systemd systems
This feature was originally added for  #568, and I mistakenly removed
it.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-12 14:00:58 -04:00
Daniel J Walsh 2f5f0ac429 Add test for bad entries in storage.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-01 04:50:58 -04:00
Daniel J Walsh d65940d8a0 Report bad entries in storage.conf to the user
Currently if a user puts a typo into a storage.conf
or puts the keys in the wrong section, then tools using
container/storage ignore them. This patch will print them
as warnings, so that the user has some idea what is going on.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-30 10:23:21 -04:00
Daniel J Walsh e159777f1e Use /run/user/UID in rootless mode if writable
Other parts of the code are using this directory, so we end up
with us creating an empty directory.

I don't see a reason why we would just use this directory only if
the init program is systemd?

Fixes: https://github.com/containers/podman/issues/10782

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-25 08:53:40 -04:00
mla ea005eeabd Added support for CONTAINERS_STORAGE_CONF override
Signed-off-by: Morten Larsen <mortenlarsens@gmail.com>
2021-06-09 10:17:09 +02:00
Giuseppe Scrivano d2b6decf95 store: add option to disable volatile
add an option to storage.options to inhibit usage of the
volatile storage flag.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-05-17 09:51:52 +02:00
Giuseppe Scrivano 1431ac30ba types: add map PullOptions to the conf file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-05-07 11:29:27 +02:00
Giuseppe Scrivano fceff1de20 drivers: add interface to directly write diff
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-05-07 11:29:25 +02:00
Daniel J Walsh 612c4194b0 Expand Variables on rootlessStoragePath
The current code was hanging for me, this makes sure the path is
expanded properly when it is read.

Fixes: https://github.com/containers/podman/issues/10181

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-05 13:49:51 -04:00
Daniel J Walsh a4cd8a7241 ReloadConfigurationFile should Reset storage options
Currently in Podman if we reset the CONTAINERS_STORAGE_CONF path, we get
the graph driver options from the original config file as well as the
options from the override path. This PR resets the storageconf to the
initial state when called multiple times.

Also if user sets STORAGE_OPTS="" then we should use it to override all
other storage options.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-12 06:13:44 -04:00
ktock cd3603c1ee Support additional layer store
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-04-07 17:53:36 +09:00
Giuseppe Scrivano 078bf13b92 types: check for native overlay support
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-05 09:27:23 +01:00
Jordan Williams cd2b12b293 Inherit system storage driver in rootless configurations
The storage driver set in `/etc/containers/storage.conf` was ignored for rootless configurations.
Rootless configurations would use overlay or vfs by default.
If the STORAGE_DRIVER environment was variable set, this value would be used instead.

This commit changes this behavior to inherit the driver set in `/etc/containers/storage.conf`.
To inherit the driver in rootless configurations, the driver must be valid in a rootless context.
The valid rootless drivers are btrfs, overlay, and vfs at this time.
To remain consistent with previous behavior, the STORAGE_DRIVER environment variable supersedes any driver set in `/etc/containers/storage.conf` and does not need to be a valid rootless driver.

buildah's documentation for the `--storage-driver` command will need to be updated to reflect these changes.
2021-03-02 10:28:53 -06:00
Daniel J Walsh ec59ba74aa Move storageOpts structures into types subdir to shrink bindings.
Currently when we build podman bindings we are pulling in the entire
storage libraries, even though we only need a few structures and
functions.

Testing with the following program

```
package main

import (
	"fmt"
	"github.com/containers/storage/types"
)

func main() {
	fmt.Println(types.GetRootlessRuntimeDir(0))
}
```

Removing types above gives me compile size of the the program

du -s t.old t.new
9640	t.before
3232	t.after

Currently these functions are being vendored into
containers/common/pkg/config, which leads to large size in podman-remote
and podman bindings.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-26 05:34:09 -05:00