Skip to content

Commit

Permalink
systemd: Do not start zookeeper on installation
Browse files Browse the repository at this point in the history
1. We donot want zookeeper to start at installtion.
   policy-rc.d not working for systemd in ubuntu-1604.
   Adding separate command.
2. service name is specified in policy-rc.d. Reverted the change
   for ubuntu-1404.

Change-Id: Id173bbfeea468d61517b3cd4003e08603ea2e991
Closes-Bug: #1732406
  • Loading branch information
Santosh Gupta committed Nov 19, 2017
1 parent ad1e261 commit 5475a02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion playbooks/roles/zookeeper/tasks/install/Debian.yml
@@ -1,10 +1,14 @@
---
- name: Avoid zookeeper starting as a part of installation
lineinfile: dest=/etc/sensitive_services line=zookeeperd state=present create=yes
lineinfile: dest=/etc/sensitive_services line=zookeeper state=present create=yes

- name: install policy-rc.d to selectively disable automated service start by apt
copy: src=policy-rc.d dest=/usr/sbin/policy-rc.d mode=0755

- name: disable auto start zookeeper service in case of systemd
shell: systemctl mask zookeeper
when: contrail_service_mgr == 'systemd'

- name: Install zookeeper with apt
include: apt.yml
when: zookeeper_debian_apt_install
Expand Down
5 changes: 5 additions & 0 deletions playbooks/roles/zookeeper/tasks/setup.yml
Expand Up @@ -8,6 +8,11 @@
include: configure.yml
tags: [configure, zookeeper.configure]

- name: Unmask zookeeper service now in case of systemd
shell: systemctl unmask zookeeper
when: contrail_service_mgr == 'systemd'
tags: [service, zookeeper.service]

- name: Start zookeeper service
service: name=zookeeper state=started enabled=yes
tags: [service, zookeeper.service]
Expand Down

0 comments on commit 5475a02

Please sign in to comment.