Ensure services are running properly

Fix issue on Debian and finally add tests to confirm things work as
expected. Zuul-merger doesn't support reloading so lets remove it.

Change-Id: I14a8d4992d08a291fda6d9679dea7dc83379feda
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2015-12-17 19:53:02 -05:00
parent 79aec371c1
commit e2456dd936
5 changed files with 16 additions and 2 deletions

View File

@ -39,10 +39,12 @@ zuul_config_merger_git_dir: "{{ zuul_user_home }}/git"
zuul_config_merger_git_user_email: ""
zuul_config_merger_git_user_name: ""
zuul_config_merger_log_config: /etc/zuul/merger-logging.conf
zuul_config_merger_pidfile: /var/run/zuul-merger/zuul-merger.pid
zuul_config_merger_zuul_url: 127.0.0.1
zuul_config_zuul_layout_config: "{{ zuul_file_layout_yaml_dest }}"
zuul_config_zuul_log_config: /etc/zuul/server-logging.conf
zuul_config_zuul_pidfile: /var/run/zuul-server/zuul-server.pid
zuul_config_zuul_state_dir: "{{ zuul_user_home }}"
zuul_file_gearman_logging_conf: etc/zuul/gearman-logging.conf

View File

@ -17,11 +17,11 @@
name: zuul-merger
state: reloaded
sudo: yes
when: zuul_service_zuul_merger_state == "started"
when: zuul_service_zuul_merger_state == "started" and not __zuul_merger_service.changed
- name: Reload zuul-server
service:
name: zuul-server
state: reloaded
sudo: yes
when: zuul_service_zuul_server_state == "started"
when: zuul_service_zuul_server_state == "started" and not __zuul_server_service.changed

View File

@ -66,9 +66,11 @@
enabled: "{{ zuul_service_zuul_merger_enabled }}"
name: "{{ zuul_service_zuul_merger_name }}"
state: "{{ zuul_service_zuul_merger_state }}"
register: __zuul_merger_service
- name: Enable zuul-server service.
service:
enabled: "{{ zuul_service_zuul_server_enabled }}"
name: "{{ zuul_service_zuul_server_name }}"
state: "{{ zuul_service_zuul_server_state }}"
register: __zuul_server_service

View File

@ -16,6 +16,7 @@ user = {{ zuul_config_gerrit_user }}
[zuul]
layout_config = {{ zuul_config_zuul_layout_config }}
log_config = {{ zuul_config_zuul_log_config }}
pidfile = {{ zuul_config_zuul_pidfile }}
state_dir = {{ zuul_config_zuul_state_dir }}
[merger]
@ -27,6 +28,7 @@ git_user_email = {{ zuul_config_merger_git_user_email }}
git_user_name = {{ zuul_config_merger_git_user_name }}
{%endif %}
log_config = {{ zuul_config_merger_log_config }}
pidfile = {{ zuul_config_merger_pidfile }}
zuul_url = {{ zuul_config_merger_zuul_url }}
# {{ ansible_managed }}

View File

@ -141,3 +141,11 @@
- redhat_zuul_server_service_stat.stat.gr_name == 'root'
- redhat_zuul_server_service_stat.stat.mode == '0644'
when: ansible_os_family == 'RedHat'
- name: Ensure zuul-merger is running.
shell: /usr/sbin/service zuul-merger status
tags: skip_ansible_lint
- name: Ensure zuul-server is running.
shell: /usr/sbin/service zuul-server status
tags: skip_ansible_lint