Fix single-monitor deployment

Commit ce4fe7a084 introduced
auto-generation of 'monitor-secret' and 'fsid'.

However, the auto-generated 'monitor-secret' is not used when
doing single-monitor deployments.

This commit fixes that.

Change-Id: Iae41b3296c2dfd86823cac91f70d582951206261
Closes-Bug: #1694435
This commit is contained in:
Frode Nordahl 2017-05-30 15:37:15 +02:00
parent 20d9a606a0
commit 4c05a16223
1 changed files with 3 additions and 2 deletions

View File

@ -220,9 +220,10 @@ def config_changed():
emit_cephconf()
# Support use of single node ceph
if not ceph.is_bootstrapped() and int(config('monitor-count')) == 1:
if (not ceph.is_bootstrapped() and int(config('monitor-count')) == 1 and
is_leader()):
status_set('maintenance', 'Bootstrapping single Ceph MON')
ceph.bootstrap_monitor_cluster(config('monitor-secret'))
ceph.bootstrap_monitor_cluster(leader_get('monitor-secret'))
ceph.wait_for_bootstrap()