diff --git a/salt/ceph/mon.sls b/salt/ceph/mon.sls index 293a0ec..81df0b4 100644 --- a/salt/ceph/mon.sls +++ b/salt/ceph/mon.sls @@ -94,9 +94,7 @@ start_mon: - cmd: populate_mon add_mon: - cmd.wait: + cmd.run: - name: ceph mon add {{ host }} {{ ip }} - - timeout: 5 - - watch: - - cmd: start_mon - + - onlyif: status ceph-mon id={{ host }} + - unless: ceph mon dump | grep {{ host }} diff --git a/salt/ceph/osd.sls b/salt/ceph/osd.sls index 37ebc69..2872392 100644 --- a/salt/ceph/osd.sls +++ b/salt/ceph/osd.sls @@ -36,12 +36,11 @@ disk_prepare {{ dev }}: - unless: parted --script /dev/{{ dev }} print | grep 'ceph data' disk_activate {{ dev }}1: - cmd.wait: + cmd.run: - name: ceph-disk activate /dev/{{ dev }}1 - onlyif: test -f {{ bootstrap_osd_keyring }} + - unless: ceph-disk list | egrep "/dev/{{ dev }}1.*active" - timeout: 10 - - watch: - - cmd: disk_prepare {{ dev }} {% endif -%} {% endfor -%} diff --git a/salt/common/salt-minion/init.sls b/salt/common/salt-minion/init.sls index fe7d8e2..aaee56c 100644 --- a/salt/common/salt-minion/init.sls +++ b/salt/common/salt-minion/init.sls @@ -15,3 +15,8 @@ salt-minion: - require: - pkg: salt-minion +mine_update: + module.wait: + - name: mine.update + - watch: + - service: salt-minion