You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you change the configuration of the alloy service, ansible role restarts the service. So all the nodes of the cluster are down, they are replaying the wal files. Can we reload it when the configuration is changed?
# roles/alloy/tasks/configure.yml#L19
- name: Deploy alloy configuration fileansible.builtin.template:
src: config.alloy.j2dest: "{{ config_dir }}/{{ config_file }}"owner: "{{ service_user }}"group: "{{ service_group }}"mode: '0644'notify: Reload alloybecome: true# roles/alloy/handlers/main.yml#L7 Add new handler
- name: Check if alloy service is activeansible.builtin.shell: systemctl is-active alloyregister: alloy_service_statusignore_errors: truelisten: "Reload alloy"
- name: Restart alloy service if not activeansible.builtin.service:
name: alloystate: restartedwhen: alloy_service_status.stdout != "active"listen: "Reload alloy"
- name: Reload alloy service if activeansible.builtin.service:
name: alloystate: reloadedwhen: alloy_service_status.stdout == "active"listen: "Reload alloy"
- name: Check alloy is started properlyansible.builtin.include_tasks: ga-started.ymllisten: "Reload alloy"
If it is convenient for you, we can create a pull request for the above changes.
cc: @emre-23@acciorg
The text was updated successfully, but these errors were encountered:
If you'd like to implement this, I believe it should be sufficient to update the template task to trigger a reload instead of a restart and create a new handler for the reload.
When you change the configuration of the
alloy
service, ansible role restarts the service. So all the nodes of the cluster are down, they are replaying the wal files. Can we reload it when the configuration is changed?If it is convenient for you, we can create a pull request for the above changes.
cc: @emre-23 @acciorg
The text was updated successfully, but these errors were encountered: