Skip to content

Commit f4fccb7

Browse files
authored
Merge pull request #2066 from cgwalters/toml-cleanup
storage.conf: Various cleanups
2 parents 2944d5b + ed56180 commit f4fccb7

3 files changed

+40
-31
lines changed

docs/containers-storage-composefs.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
## NAME
44
containers-storage-composefs - Information about composefs and containers/storage
55

6-
76
## DESCRIPTION
87

98
To enable composefs at a baseline requires the following configuration in `containers-storage.conf`:
@@ -13,6 +12,8 @@ To enable composefs at a baseline requires the following configuration in `conta
1312
use_composefs = "true"
1413
```
1514

15+
This value must be a "string bool", it cannot be a native TOML boolean.
16+
1617
However at the current time, composefs requires zstd:chunked images, so first
1718
you must be sure that zstd:chunked is enabled. For more, see [zstd:chunked](containers-storage-zstd-chunked.md).
1819

@@ -23,9 +24,12 @@ latency to image pulls.
2324
Putting these things together, the following is required (in addition to the above config).
2425

2526
```
26-
pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree_repos="", convert_images = "true"}
27+
[storage.options.pull_options]
28+
convert_images = "true"
2729
```
2830

31+
This value must be a "string bool", it cannot be a native TOML boolean.
32+
2933
## BUGS
3034

3135
- https://github.com/containers/storage/issues?q=is%3Aissue+is%3Aopen+label%3Aarea%2Fcomposefs

docs/containers-storage-zstd-chunked.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ to include additional metadata (especially a "table of contents") that includes
1616
Additionally chunks are compressed separately. This allows a client to dynamically fetch only content which
1717
it doesn't already have using HTTP range requests.
1818

19-
To enable zstd:chunked requires the following changes to `containers-storage.conf`:
19+
At the time of this writing, support for this is enabled by default in the code.
20+
21+
You can explicitly enable or disable zstd:chunked with following changes to `containers-storage.conf`:
2022

2123
```
22-
pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree_repos=""}
24+
[storage.overlay.pull_options]
25+
enable_partial_images = "true" | "false"
2326
```
2427

25-
This option may or may not be enabled by default in your distribution/operating system.
28+
Note that the value of this field must be a "string bool", it cannot be a native TOML boolean.
2629

2730
## INTERNALS
2831

storage.conf

+28-26
Original file line numberDiff line numberDiff line change
@@ -54,32 +54,31 @@ graphroot = "/var/lib/containers/storage"
5454
additionalimagestores = [
5555
]
5656

57-
# Allows specification of how storage is populated when pulling images. This
58-
# option can speed the pulling process of images compressed with format
59-
# zstd:chunked. Containers/storage looks for files within images that are being
60-
# pulled from a container registry that were previously pulled to the host. It
61-
# can copy or create a hard link to the existing file when it finds them,
62-
# eliminating the need to pull them from the container registry. These options
63-
# can deduplicate pulling of content, disk storage of content and can allow the
64-
# kernel to use less memory when running containers.
65-
66-
# containers/storage supports four keys
67-
# * enable_partial_images="true" | "false"
68-
# Tells containers/storage to look for files previously pulled in storage
69-
# rather then always pulling them from the container registry.
70-
# * use_hard_links = "false" | "true"
71-
# Tells containers/storage to use hard links rather then create new files in
72-
# the image, if an identical file already existed in storage.
73-
# * ostree_repos = ""
74-
# Tells containers/storage where an ostree repository exists that might have
75-
# previously pulled content which can be used when attempting to avoid
76-
# pulling content from the container registry
77-
# * convert_images = "false" | "true"
78-
# If set to true, containers/storage will convert images to a
79-
# format compatible with partial pulls in order to take advantage
80-
# of local deduplication and hard linking. It is an expensive
81-
# operation so it is not enabled by default.
82-
pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree_repos=""}
57+
# Options controlling how storage is populated when pulling images.
58+
[storage.options.pull_options]
59+
# Enable the "zstd:chunked" feature, which allows partial pulls, reusing
60+
# content that already exists on the system. This is enabled by default,
61+
# but can be explicitly disabled. For more on zstd:chunked, see
62+
# https://github.com/containers/storage/blob/main/docs/containers-storage-zstd-chunked.md
63+
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
64+
# enable_partial_images = "true"
65+
66+
# Tells containers/storage to use hard links rather then create new files in
67+
# the image, if an identical file already existed in storage.
68+
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
69+
# use_hard_links = "false"
70+
71+
# Path to an ostree repository that might have
72+
# previously pulled content which can be used when attempting to avoid
73+
# pulling content from the container registry
74+
# ostree_repos=""
75+
76+
# If set to "true", containers/storage will convert images to a
77+
# format compatible with partial pulls in order to take advantage
78+
# of local deduplication and hard linking. It is an expensive
79+
# operation so it is not enabled by default.
80+
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
81+
# convert_images = "false"
8382

8483
# Root-auto-userns-user is a user name which can be used to look up one or more UID/GID
8584
# ranges in the /etc/subuid and /etc/subgid file. These ranges will be partitioned
@@ -102,6 +101,7 @@ pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree
102101
# squashed down to the default uid in the container. These images will have no
103102
# separation between the users in the container. Only supported for the overlay
104103
# and vfs drivers.
104+
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
105105
#ignore_chown_errors = "false"
106106

107107
# Inodes is used to set a maximum inodes of the container image.
@@ -115,9 +115,11 @@ pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree
115115
mountopt = "nodev"
116116

117117
# Set to skip a PRIVATE bind mount on the storage home directory.
118+
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
118119
# skip_mount_home = "false"
119120

120121
# Set to use composefs to mount data layers with overlay.
122+
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
121123
# use_composefs = "false"
122124

123125
# Size is used to set a maximum size of the container image.

0 commit comments

Comments
 (0)