container-storage-setup icon indicating copy to clipboard operation
container-storage-setup copied to clipboard

should setting `CONTAINER_ROOT_LV_MOUNT_PATH` also update docker to not point at `/var/lib/docker` ?

Open dustymabe opened this issue 7 years ago • 4 comments

I set:

STORAGE_DRIVER=overlay2
GROWPART=true
ROOT_SIZE=15G
CONTAINER_ROOT_LV_SIZE=100%FREE
CONTAINER_ROOT_LV_NAME="container-root-lv"
CONTAINER_ROOT_LV_MOUNT_PATH="/var/lib/containers/container-runtime"

I want /var/lib/containers/container-runtime to be used by docker. Should container-storage-setup do this for me?

dustymabe avatar Jun 03 '18 15:06 dustymabe

I don't think so. Container-storage-setup should not be touching docker config files.

rhvgoyal avatar Jun 04 '18 20:06 rhvgoyal

I don't think so. Container-storage-setup should not be touching docker config files.

I thought it populated /etc/sysconfig/docker-storage ? I just assumed we could set it in there.

dustymabe avatar Jun 04 '18 20:06 dustymabe

only storage related options go in /etc/sysconfig/docker-storage. What root dir to use for docker storage, that configuration comes from /etc/sysconfig/docker. Trying to pass that configuration from two files now will only add to the confusion. What's wrong with modifying /etc/sysconfig/docker explicitly using cloud-init or something else. In fact, once I had written patches to let container-storage-setup know what's the root directory docker is planning to use and take some decisions based on that.

IMO, container-storage-setup just sets up the storage as asked by user/docker. It should not dictate which root dir docker should use and modify that. That mechanism should be outside container-storage-seutp.

rhvgoyal avatar Jun 05 '18 14:06 rhvgoyal

ok, yeah the relationship that conatiner-storage-setup has with the docker service is weird. If you consider the fact that it starts before docker and is required by docker then "why woulnd't it configure the path" is a valid question. But if you look at it like a generic tool to configure container storage for different runtimes (including docker) then that question becomes less relevant.

It's just a weird relationship is all I'm saying.

dustymabe avatar Jun 05 '18 15:06 dustymabe