Remove explicit fsid charm config option

The charm has had the capability to automatically handle fsid
in deployments for several cycles.

Explicitly setting the fsid can lead to unpredictable behavior
when data from previous deployments remains on block devices,
and when the fsid is explicitly static across those separate
deployments.  ex. Ceph would see the fsid match and attempt to
use the block device from a previous deployment as-is and
unsuccessfully.

This primarily affects legacy development and CI environments,
which may be in place from a time before the charm autoatically
handled fsids.  The recommendation is for both test and production
deployments to defer fsid generation to the charm.

Change-Id: I0b87576810faa08a81dc2d559ef925ea02f58db0
Partial-bug: #1698154
This commit is contained in:
Ryan Beisner 2018-05-31 07:29:22 -05:00 committed by David Ames
parent 87347a45b0
commit 54c3f21221
3 changed files with 2 additions and 19 deletions

View File

@ -32,17 +32,6 @@ options:
description: |
Apply system hardening. Supports a space-delimited list of modules
to run. Supported modules currently include os, ssh, apache and mysql.
fsid:
type: string
default:
description: |
The unique identifier (fsid) of the Ceph cluster.
.
To generate a suitable value use `uuidgen`.
If left empty, an fsid will be generated.
.
NOTE: Changing this configuration after deployment is not supported and
new service units will not be able to join the cluster.
config-flags:
type: string
default:

View File

@ -205,10 +205,7 @@ def config_changed():
if is_leader():
if not config('no-bootstrap'):
if not leader_get('fsid') or not leader_get('monitor-secret'):
if config('fsid'):
fsid = config('fsid')
else:
fsid = "{}".format(uuid.uuid1())
fsid = "{}".format(uuid.uuid1())
if config('monitor-secret'):
mon_secret = config('monitor-secret')
else:

View File

@ -117,13 +117,11 @@ class CephBasicDeployment(OpenStackAmuletDeployment):
ceph_config = {
'monitor-count': '3',
'auth-supported': 'none',
'fsid': '6547bd3e-1397-11e2-82e5-53567c8d32dc',
'monitor-secret': 'AQCXrnZQwI7KGBAAiPofmKEXKxu5bUzoYLVkbQ==',
}
ceph_osd_config = {
'osd-devices': '/srv/ceph /dev/test-non-existent',
}
configs = {'keystone': keystone_config,
'percona-cluster': pxc_config,
'cinder': cinder_config,
@ -402,7 +400,6 @@ class CephBasicDeployment(OpenStackAmuletDeployment):
conf = '/etc/ceph/ceph.conf'
expected = {
'global': {
'fsid': '6547bd3e-1397-11e2-82e5-53567c8d32dc',
'log to syslog': 'false',
'err to syslog': 'false',
'clog to syslog': 'false',