projectatomic / container-storage-setup

Service to set up storage for Docker and other container systems
Apache License 2.0
153 stars 77 forks source link

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

Open dustymabe opened 6 years ago

dustymabe commented 6 years ago

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?

rhvgoyal commented 6 years ago

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

dustymabe commented 6 years ago

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.

rhvgoyal commented 6 years ago

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.

dustymabe commented 6 years ago

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.