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

Use bind-dirs to handle crontab persistence #2327

Closed
jbwells opened this Issue Sep 19, 2016 · 6 comments

Comments

Projects
None yet
5 participants
@jbwells

jbwells commented Sep 19, 2016

Qubes OS version (e.g., R3.1):

R3.2-rc2

Affected TemplateVMs (e.g., fedora-23, if applicable):

AppVM using debian-8 TemplateVM


Expected behavior:

Whenever cron is running, it should obey a crontab installed via the crontab program. It should also be possible to remove a crontab while cron is not running.

Actual behavior:

Crontab files installed while cron is not running are hidden by a directory mounted over them when cron is started.

Steps to reproduce the behavior:

sudo systemctl stop cron
crontab FILE
sudo systemctl start cron

General notes:

See /lib/systemd/system/cron.service.d/30_qubes.conf.

This is very confusing when trying to debug why your cron jobs are not running!


Related issues:

@jbwells

This comment has been minimized.

Show comment
Hide comment
@jbwells

jbwells Oct 2, 2016

I forgot to mention: This problem also mean that you can not configure cron jobs in the TemplateVM that will run in AppVMs based on it.

jbwells commented Oct 2, 2016

I forgot to mention: This problem also mean that you can not configure cron jobs in the TemplateVM that will run in AppVMs based on it.

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Oct 8, 2016

Member

@jbwells @andrewdavidwong

This isn't a Debian specific issue, and I'm not convinced it's a bug - it's a feature of the normal Qubes treatment of template based qubes. The statement of expected behaviour seems to me to be inappropriate for Qubes.
The use of /rw/cron enables something approaching a standard use of cron. Since a standard crontab file would disappear on reboot, the /rw/cron files enable cron jobs to persist for a template based qube.

It is possible to configure cron jobs in a Template, using the /rw/cron mechanism, and they will run in any qube created using that template. Like changes in /home, later editing of files on the template will not feed through to the qube after it has been created.

Member

unman commented Oct 8, 2016

@jbwells @andrewdavidwong

This isn't a Debian specific issue, and I'm not convinced it's a bug - it's a feature of the normal Qubes treatment of template based qubes. The statement of expected behaviour seems to me to be inappropriate for Qubes.
The use of /rw/cron enables something approaching a standard use of cron. Since a standard crontab file would disappear on reboot, the /rw/cron files enable cron jobs to persist for a template based qube.

It is possible to configure cron jobs in a Template, using the /rw/cron mechanism, and they will run in any qube created using that template. Like changes in /home, later editing of files on the template will not feed through to the qube after it has been created.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Oct 9, 2016

Member

I can see the arguments on both sides. Ultimately, this may be more of a feature request than a bug report. @marmarek?

Member

andrewdavidwong commented Oct 9, 2016

I can see the arguments on both sides. Ultimately, this may be more of a feature request than a bug report. @marmarek?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Oct 9, 2016

Member

Since we have bind-dirs, it should be quite easy to move that cron handling

Member

marmarek commented Oct 9, 2016

Since we have bind-dirs, it should be quite easy to move that cron handling

@andrewdavidwong andrewdavidwong changed the title from crontab created while cron service is stopped is hidden when cron service is started to Use bind-dirs to handle crontab persistence Oct 9, 2016

@andrewdavidwong andrewdavidwong added enhancement and removed bug labels Oct 9, 2016

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Oct 11, 2016

Member

@marmarek QubesOS/qubes-doc#199 (comment)

I think it would be better to package bind-dirs configuration for cron, as part of QubesOS/qubes-core-agent-linux#19, instead of relying on user to manually do it.

Member

adrelanos commented Oct 11, 2016

@marmarek QubesOS/qubes-doc#199 (comment)

I think it would be better to package bind-dirs configuration for cron, as part of QubesOS/qubes-core-agent-linux#19, instead of relying on user to manually do it.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Nov 19, 2016

Member

It's done.

Member

marmarek commented Nov 19, 2016

It's done.

@marmarek marmarek closed this Nov 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment