dmwm / CRABServer

15 stars 37 forks source link

Reviewing how we bind mount the TW container #8402

Closed novicecpp closed 1 month ago

novicecpp commented 1 month ago

Before deploying the new runContainer.sh version, which requires a configuration change because of a path change inside the container, I would like to review all of the binding mounts we use for the TW container.

Stefano pointed out in this PR comment that there are too many bind mounts appearing on runContainer.sh script. Here is the the list of bind mount when we deploy the Publisher_schedd:

The first half, the host's working directory:

As Stefano suggested, mounting the /data/container/${SERVICE} as a single path will be easier to manage, and the application already supports custom paths via service configuration files.

The second half, the host environments:

This part is clear enough why we need it. However, the hostdisk (-v /data/container/:/data/hostdisk/) only for provide Filebeat configuration to Filebeat process inside container. Filebeat is not is not bundle in the new PyPI image and there is no plan to bundle it in the future.

EDITED: switch -v /data/certs/:/data/certs/ to second half.

novicecpp commented 1 month ago

My proposal:

The final bind mount should be:

@belforte What do you think?

belforte commented 1 month ago

I like it. Let's add a /data/container/${SERVICE}/scratch directory with write-all to facilitate file sharing to/from the container. I have been using hostidsk/tmp for that, creating it by hand.

What do you think about removing the last entry and replace it with a symlink in the container like it is in the host ? It is a bit wierd to mount twice the same file. I am not sure which way is "less obscure". Maybe as simple as "Stefano does not understand PKI !!"

novicecpp commented 1 month ago

Stefano does not understand PKI !!

It is understandable. I do not know it myself. Different distribution/library/application use different path. But keep both mount is better IMO. Mount same file for 2 different path cause no harm in future, and keep this responsible for "ops" unless we completely sure why we need both and tell "dev" to fix (do symlink in Dockerfile step).