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

create script for crontab tasks #450

Open
garlick opened this issue May 14, 2024 · 3 comments
Open

create script for crontab tasks #450

garlick opened this issue May 14, 2024 · 3 comments
Assignees
Labels
new feature new feature

Comments

@garlick
Copy link
Member

garlick commented May 14, 2024

Problem: currently the system administrators must maintain a flux crontab file in /etc/flux/cron.d for accounting, so when flux-accounting requires a change it requires sys admin intervention, and when the change is version dependent, the sys admins have to ensure configuration management can deal with the transition.

From an offline discussion, one possible solution is:

  • package the crontab entry but don't install it directly into /etc/flux/cron.d. Let the admins control the installation of a symlink there to enable it, since it should only be enabled on a management node that has a configured database
  • move the crontab commands into a shell script that the crontab entry calls so that the commands can be updated without the need to restart flux or manually update the crontab
@cmoussa1 cmoussa1 self-assigned this May 14, 2024
@cmoussa1 cmoussa1 added the new feature new feature label May 14, 2024
@ryanday36
Copy link
Contributor

ryanday36 commented May 14, 2024

Two other thoughts on this:

Could this be more built into the flux accounting service such that starting that service automatically turns on the updates rather than requiring a separate thing in ansible / configuration management?
It would also be nice if the script could read an update frequency from system/conf.d/archive.toml or similar so that all of the db configs are in one place if the system administrators want more (or less) frequent updates to fairshare, etc.

@garlick
Copy link
Member Author

garlick commented May 14, 2024

Good idea. The systemd unit file does have ExecStartPre and ExecStopPost.

ExecStartPre could run the flux cron tab <file command but it would need to not do so if the cron tab is already installed.

ExecStopPost would need some way to look up the cron id and stop or delete it.

So a few details to think about there but maybe doable?

@cmoussa1
Copy link
Member

Perhaps starting with just a shell script might be a somewhat straightforward way to go (at least to start)? Is there a certain directory in the flux-accounting repo that something like this would belong in?

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

No branches or pull requests

3 participants