CasaOS icon indicating copy to clipboard operation
CasaOS copied to clipboard

[Bug] CasaOS 0.4.6 update reverted my --data-root config

Open epicalxyz opened this issue 1 year ago • 2 comments
trafficstars

Describe the bug

I followed these instructions: https://wiki.casaos.io/en/guides/move-docker-images-and-volumes-to-a-diffferent-storage to change my data-root location. It worked fine for months until I updated to 0.4.6, then the file /lib/systemd/system/docker.service was reverted to default version. This should not be a version related issue, but I wanted to be clear.

To Reproduce

Have a version prior to 0.4.6 installed with unmodified /lib/systemd/system/docker.service, then follow the instructions and add the --data-root. Then update to 0.4.6, and you see the --data-root now is gone.

Expected behavior

I expect it to not revert /lib/systemd/system/docker.service to the default version.

epicalxyz avatar Feb 25 '24 18:02 epicalxyz

The reason this happened is that the instructions you followed were incorrect. I pointed that out in the Discord server a while ago: https://discord.com/channels/884667213326463016/1163133627291422770/1163133627291422770 and while some of the issues I mentioned were fixed, the one you stumbled upon was not.

File /lib/systemd/system/docker.service is provided by the Docker developers and as such any changes to it will be overwritten upon Docker update - the instructions on the Wiki point that out.

Of course, they then proceed to tell you to edit that file - you should not do that. Instead, you should run sudo systemctl edit docker to create an override file and open it for editing, and then replace its contents with:

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --data-root /path/to/new/location

I really hope they will fix the wiki properly this time.

Forinil avatar Feb 25 '24 23:02 Forinil

That makes perfect sense. Thank you for the info.

epicalxyz avatar Feb 25 '24 23:02 epicalxyz