Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default adminpath may be pruned by systemd-tmpfilesd #1502

Closed
olifre opened this issue Sep 1, 2021 · 5 comments
Closed

Default adminpath may be pruned by systemd-tmpfilesd #1502

olifre opened this issue Sep 1, 2021 · 5 comments

Comments

@olifre
Copy link
Contributor

olifre commented Sep 1, 2021

Not sure if this is a "bug" or just an annoyance, or what is the best way to go about it:
I observed our TPC transfers today failing in case X.509 delegation was required. The cause was:

210901 08:19:47 393183 ofs_TPC: Unable to create credentials file /tmp/grid/.ofs/.tpccreds/fts3.26515:30@fts-atlas-003.cern.ch#17.creds; no such file or directory

which in turn was caused by /tmp/grid/.ofs/.tpccreds not existing anymore after some days without transfers using X.509 delegation.

Checking the code, it seems the directory is only created once, and then assumed to stay. Sadly, tmpfiles cleaners such as systemd-tmpfilesdor tmpreaper regularly pass by nowadays to prune such directories when not used for a while. And since XRootD is running very stable, it runs for many days in a row for us ;-).

I think there are several ways this could be handled:

  • Warn in the documentation about it, and delegate choice of a different directory to the user.
  • Add a systemd-tmpfilesd exception and ship it with the rpm packages (might also be necessary to do this for tmpreaper and other such things).
  • Always recreate directories in the adminpath in case they go missing at runtime.

I'm not sure what is the best way, and maybe you have an even better idea ;-).

@abh3
Copy link
Member

abh3 commented Sep 1, 2021 via email

@olifre
Copy link
Contributor Author

olifre commented Sep 2, 2021

Hi Andy,

oh my — indeed, that warning is pretty prominent in the documentation. I must have had my eyes half-closed when looking for it, the docs even mention the warning right next to the default value.

So yeah, this is a classical case of user error, thanks for pointing me to the documentation! I assume relocating it may also require some caution with activated SELinux, but I'm used to that ;-).

Thanks and cheers,
Oliver

@olifre olifre closed this as completed Sep 2, 2021
@bbockelm
Copy link
Contributor

bbockelm commented Sep 2, 2021

Before we close things off --

If there's a Big Red Warning Sign in the docs, why do we have this (do we have this?) as the default value? Wouldn't it be better to provide an improved default in the packaging (probably something in /run?).

Brian

@abh3
Copy link
Member

abh3 commented Sep 2, 2021 via email

@olifre
Copy link
Contributor Author

olifre commented Sep 2, 2021

For reference, I have settled on:
all.adminpath /run/xrootd
which seems to work fine with SELinux, since the directory is shipped with the RPMs (with correct SELinux contexts) and contains the PID files (used by the systemd units). That seems to work out of the box.
Of course, Andy's point still holds — while I'm personally a fan of using /run/xrootd, since it matches FHS, I'm probably not the standard admin out there ;-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants