Skip to content

Commit d73884b

Browse files
committed
Go back to :zZ --volume option to not confuse with shared mount option
Signed-off-by: Jaroslav Henner <1187265+jarovo@users.noreply.github.com>
1 parent 7ad8649 commit d73884b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/Extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ For explanations of these extensions, please refer to the [Podman Documentation]
3131
```yml
3232
secrets:
3333
custom-secret:
34-
x-podman.relabel: private
34+
x-podman.relabel: Z
3535
```
36-
For explanations of these extensions, please refer to the [Linux kernel documentation for shared filesystem subtrees](https://docs.kernel.org/filesystems/sharedsubtree.html)).
36+
For explanations of these extensions, please refer to the [podman-run --volume documentation](https://docs.podman.io/en/latest/markdown/podman-run.1.html#volume-v-source-volume-host-dir-container-dir-options)).
3737
3838
## Network management
3939

podman_compose.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,13 +622,13 @@ def get_secret_args(compose, cnt, secret, podman_is_building=False):
622622

623623
mount_options = 'ro,rprivate,rbind'
624624

625-
selinux_relabel_to_mount_option_map = {None: "", "shared": ",z", "private": ",Z"}
625+
selinux_relabel_to_mount_option_map = {None: "", "z": ",z", "Z": ",Z"}
626626
try:
627627
selinux_mount_option = selinux_relabel_to_mount_option_map[x_podman_relabel]
628628
except KeyError as exc:
629629
raise ValueError(
630630
f'ERORR: Run secret "{secret_name} has invalid "relabel" option related '
631-
+ f' to SELinux "{x_podman_relabel}". Expected "shared" "private" or nothing.'
631+
+ f' to SELinux "{x_podman_relabel}". Expected "z" "Z" or nothing.'
632632
) from exc
633633
mount_options = f'{mount_options}{selinux_mount_option}'
634634
volume_ref = ["--volume", f"{source_file}:{dest_file}:{mount_options}"]

tests/unit/test_container_to_args_secrets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ async def test_secret_target_matches_secret_name_secret_type_not_env(self):
304304
),
305305
(
306306
"relabel",
307-
{"file_secret": {"file": "./my_secret", "x-podman.relabel": "private"}},
307+
{"file_secret": {"file": "./my_secret", "x-podman.relabel": "Z"}},
308308
"file_secret",
309309
repo_root() + "/test_dirname/my_secret:/run/secrets/file_secret:ro,rprivate,rbind,Z",
310310
),
311311
(
312312
"relabel",
313-
{"file_secret": {"file": "./my_secret", "x-podman.relabel": "shared"}},
313+
{"file_secret": {"file": "./my_secret", "x-podman.relabel": "z"}},
314314
"file_secret",
315315
repo_root() + "/test_dirname/my_secret:/run/secrets/file_secret:ro,rprivate,rbind,z",
316316
),

0 commit comments

Comments
 (0)