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

Migrate to systemd timers #97

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Migrate to systemd timers #97

wants to merge 3 commits into from

Conversation

corny
Copy link
Member

@corny corny commented Jul 16, 2020

Timers are easier to debug and give more control about the scheduling.

TODO: Needs to be tested!

@corny corny force-pushed the timers branch 3 times, most recently from be7cceb to 3e7b792 Compare July 16, 2020 09:58
Copy link
Member

@genofire genofire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea, i hate cronjob already (after several years of systemd.timer)

roles/timer/templates/timer Outdated Show resolved Hide resolved
roles/timer/templates/service Outdated Show resolved Hide resolved
roles/timer/tasks/main.yml Outdated Show resolved Hide resolved
register: template_result

- name: Reload systemd
command: systemctl daemon-reload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mortzu you asked for ... this task is unnecessary

roles/nsd/tasks/main.yml Outdated Show resolved Hide resolved
roles/mesh-announce/tasks/main.yml Outdated Show resolved Hide resolved
roles/icvpn/tasks/bird.yml Show resolved Hide resolved
@corny corny force-pushed the timers branch 6 times, most recently from 9e5e567 to 558722b Compare July 16, 2020 10:24
@corny corny requested a review from genofire July 16, 2020 10:24
@corny corny marked this pull request as draft July 16, 2020 11:12
Copy link
Member

@genofire genofire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still issues with the reload in roles/timer

roles/timer/tasks/main.yml Outdated Show resolved Hide resolved
register: template_result

- name: Reload systemd
command: systemctl daemon-reload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope ...

with_items:
- service
- timer
register: template_result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
register: template_result
notify: reload systemd

and something in roles/timer/handlers/main.yml

- name: Enable and start timer
service:
name: "{{ timer_name }}.timer"
daemon_reload: yes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is already a daemon_reload ...

command: systemctl daemon-reload
when: template_result.changed

- name: Enable and start timer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we always enable and start the Timer?
Maybe a deployment of generic timers would be nice - ala:
[email protected] where the variable %I could be the {{ site_code }}

@ghost
Copy link

ghost commented Sep 26, 2021

@jplitza @genofire @oliver spricht was dagegen das zu mergen?

@genofire
Copy link
Member

Unnötige daemon-reload und das sogar als command

@genofire
Copy link
Member

Unnötige daemon-reload und das sogar als command

UPS sorry, github war verwirrend - nope, kannst von mir aus nach ein test mergen

@ghost ghost force-pushed the master branch from 5675af2 to e81449e Compare June 11, 2022 08:07
corny and others added 3 commits March 20, 2023 18:46
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

Successfully merging this pull request may close these issues.

2 participants