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

vlsingle - service is not restarted on change to service file #75

Open
ShaunDwyer opened this issue Feb 5, 2025 · 1 comment
Open
Assignees

Comments

@ShaunDwyer
Copy link

When updates to /etc/systemd/system/victorialogs.service are made, the hander for restarting the service does not fire.

I updated some options that resulted in some additional command line parameters in the service file.
I expected that the handler would fire to restart the service, but it doesn't.

In roles/vlsingle/tasks/configure.yaml:

- name: Copy VictoriaMetrics systemd unit file
  ansible.builtin.template:
    src: victorialogs.service.j2
    dest: /etc/systemd/system/victorialogs.service
    owner: root
    group: root
    mode: 0644
  register: config_template
  no_log: True

- name: Daemon-reload VictoriaMetrics service
  become: true
  notify: Restart VictoriaLogs service
  ansible.builtin.systemd:
    daemon_reload: true
    name: victorialogs
  when: config_template is changed  # noqa: no-handler

The daemon-reload task evaluates to "ok" when run, and never fires the handler:

TASK [victoriametrics.cluster.vlsingle : Copy VictoriaMetrics systemd unit file] ************************************************************************************************************
changed: [victorialogs]

TASK [victoriametrics.cluster.vlsingle : Daemon-reload VictoriaMetrics service] *************************************************************************************************************
ok: [victorialogs]
@zekker6
Copy link
Collaborator

zekker6 commented Feb 6, 2025

Hello @ShaunDwyer, this was fixed in release v2.4.0, could you try if that helps?

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

2 participants