Currently, 'cluster name' is set when connecting to each host. If one host has 'test' the cluster name gets set to 'test', but if a subsequent node has something else, this will get changed.
This 'cluster' name should go under the node metadata, in the 'ceph' section: data['ceph']['cluster']. The current logic exists in the connection.py module:
if not ceph_medic.config['cluster_name']:
cluster_conf_files, stderr, exit_code = remoto.process.check(conn, ['ls', '/etc/ceph/'])
cluster_name = 'ceph'
if 'ceph.conf' not in cluster_conf_files:
logger.warning('/etc/ceph/ceph.conf was not found, will try to infer the cluster name')
for i in cluster_conf_files:
if i.endswith('conf'):
cluster_name = i.split('.conf')[0]
logger.warning('inferred %s as the cluster name', cluster_name)
ceph_medic.metadata['cluster_name'] = cluster_name
else:
ceph_medic.metadata['cluster_name'] = ceph_medic.config['cluster_name']
Currently, 'cluster name' is set when connecting to each host. If one host has 'test' the cluster name gets set to 'test', but if a subsequent node has something else, this will get changed.
This 'cluster' name should go under the node metadata, in the 'ceph' section:
data['ceph']['cluster']
. The current logic exists in theconnection.py
module: