[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] mount points in docker universe



On 02/25/2016 06:19 PM, Todd Tannenbaum wrote:
On 2/25/2016 8:59 AM, Matthias Schnepf wrote:
Hello,

I want to mount some directories in my docker container (running as
Docker universe). It works fine when the path on the host and inside the
container are the same.

Is there a method to change the mount point inside the container?
e.g.:on host: /mnt/storage/ inside docker: /storage/

Thanks

Matthias

Hi Matthias,

Yes, if I recall correctly HTCondor can change the mount point inside the container.

To implement your example above (e.g.:on host: /mnt/storage/ inside docker: /storage/), I think you could append something like the following in condor_config.local :

DOCKER_VOLUMES = $(DOCKER_VOLUMES) STORAGE
DOCKER_MOUNT_VOLUMES = $(DOCKER_MOUNT_VOLUMES) STORAGE
DOCKER_VOLUME_DIR_STORAGE = /mnt/storage:/storage

Warning: the above config is off the top of my head, I didn't personally test it....

The key is the ability to use a colon in DOCKER_VOLUME_DIR_xxxx knob to specify both host and container mount points.
See details from the development ticket for this feature at:
  https://htcondor-wiki.cs.wisc.edu/index.cgi/tktview?tn=5308

It looks to me like the HTCondor Manual documentation on this feature is not yet 100% complete; for instance I didn't see it mention the ability to have different host and container mount points. We will make a documentation ticket to correct this for future releases of the HTCondor Manual.

Hope the above helps.

Todd



Hi Todd,

I tested it with

DOCKER_VOLUMES = STORAGE
DOCKER_MOUNT_VOLUMES = STORAGE
DOCKER_VOLUME_DIR_STORAGE = /mnt/storage:/storage

and it works fine.

Thanks a lot

Matthias