Environment variable in /etc/environment ignored
Summary
in /var/snap/microk8s/current/args/containerd-template.toml then environment SNAPSHOTTER is used:
[plugins."io.containerd.grpc.v1.cri".containerd]
# snapshotter is the snapshotter used by containerd.
snapshotter = "${SNAPSHOTTER}"
I wanted to set it in /etc/environment but it is ignored.
What Should Happen Instead?
SNAPSHOTTER="btrfs" env var should be used
Reproduction Steps
-
Setting environment file: cat /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" SNAPSHOTTER="btrfs"
-
systemctl daemon-reload
-
sudo microk8s start
Introspection Report
useless
Can you suggest a fix?
no
Are you interested in contributing with a fix?
no
Hi @gaetanquentin,
thanks for reporting your issue.
I would like to point you to our documentation page on properly configuring the containerd service: https://microk8s.io/docs/configuring-services.
Please reach out if you continue experiencing troubles setting the snapshotter variable after following our docs.
Best regards, Louise
Hi [@louiseschmidtgen ],
thanks for reporting your issue.
I would like to point you to our documentation page on properly configuring the containerd service: https://microk8s.io/docs/configuring-services.
Please reach out if you continue experiencing troubles setting the snapshotter variable after following our docs.
Best regards, Louise
h @louiseschmidtgen , could you please point me to the part where environment variable topic is covered? i have read it, and there is no answer about that. in args files, only option are set (--option).
Hi @gaetanquentin,
We made a decision to override the snapshot parameter for containerd to support ZFS systems.
Unfortunately, this means that your setting gets overridden. As a workaround you can set the "${SNAPSHOTTER}" in /var/snap/microk8s/current/args/containerd. You will need to perform a stop and start for microk8s for this change to take effect.
Best regards, Louise