fixes for ceph.mgr state
Change-Id: I21fde3df1df3ef7f3713ff06ad5aefc2c4e56fb8
diff --git a/ceph/mgr.sls b/ceph/mgr.sls
index 4553e40..5d5e271 100644
--- a/ceph/mgr.sls
+++ b/ceph/mgr.sls
@@ -24,18 +24,18 @@
- require:
- pkg: mon_packages
+reload_systemctl_daemon:
+ cmd.run:
+ - name: "systemctl daemon-reload"
+ - unless: "test -f /var/lib/ceph/mgr/ceph-{{ grains.host }}/keyring"
+
ceph_create_mgr_keyring_{{ grains.host }}:
cmd.run:
- - name: "ceph auth get-or-create mgr.{{ grains.host }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /etc/ceph/ceph/mgr/ceph-{{ grains.host }}/keyring"
+ - name: "ceph auth get-or-create mgr.{{ grains.host }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-{{ grains.host }}/keyring"
- unless: "test -f /var/lib/ceph/mgr/ceph-{{ grains.host }}/keyring"
- require:
- file: /var/lib/ceph/mgr/ceph-{{ grains.host }}/
-/var/lib/ceph/mgr/ceph-{{ grains.host }}/keyring:
- file.managed:
- - user: ceph
- - group: ceph
-
{%- if mgr.get('dashboard', {}).get('enabled', False) %}
ceph_dashboard_address:
@@ -72,7 +72,6 @@
{%- endif %}
-
mon_services:
service.running:
- enable: true
@@ -81,7 +80,7 @@
- file: /etc/ceph/ceph.conf
- require:
- pkg: mon_packages
- - file: /var/lib/ceph/mgr/ceph-{{ grains.host }}/keyring
+ - cmd: ceph_create_mgr_keyring_{{ grains.host }}
{%- if grains.get('noservices') %}
- onlyif: /bin/false
{%- endif %}