Skip to content

Commit

Permalink
Allow ceph-mon systemd overrides to be specified
Browse files Browse the repository at this point in the history
ceph-mon can fail to start under certain circumstances (for example,
when running in a container) because the default systemd service
configuration causes namespace issues.

To work around this we can override the system service settings by
placing an overrides file in the ceph-mon@.service.d directory. This can
be generic so as to allow any potential changes required to the ceph-mon
service file.
  • Loading branch information
andymcc committed Jul 4, 2017
1 parent 283311d commit c3adf02
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tasks/start_monitor.yml
@@ -1,4 +1,14 @@
---
- name: add ceph-mon systemd service overrides
config_template:
src: "ceph-mon.service.d-overrides.j2"
dest: "/etc/systemd/system/ceph-mon@.service.d/ceph-mon-systemd-overrides.conf"
config_overrides: "{{ ceph_mon_systemd_overrides }}"
config_type: "ini"
when:
- ceph_mon_systemd_overrides is defined
- ansible_service_mgr == 'systemd'

- name: start the monitor service
service:
name: ceph-mon@{{ monitor_name }}
Expand Down
2 changes: 2 additions & 0 deletions templates/ceph-mon.service.d-overrides.j2
@@ -0,0 +1,2 @@
# {{ ansible_managed }}
[Service]

0 comments on commit c3adf02

Please sign in to comment.