This PR will assume that a cluster is already up and fully running. If this should not be the expected behaviour, deployment tools have to set 'INSTALLED' explicitly. Without this assumption it might happen that upgraded and fully running clusters, e.g. Octopus -> Pacific, will show the 'Expand Cluster' on first log in.
cephadm will take care that the bootstrap phase will write the necessary key to show the 'Expand cluster' page.
Fixes: https://tracker.ceph.com/issues/54215
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit
48fff60b63785ec07f71d3e59394b0c08357247c)
Conflicts:
src/cephadm/cephadm
Signed-off-by: Volker Theile <vtheile@suse.com>
logger.info('Enabling autotune for osd_memory_target')
cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])
+ # Notify the Dashboard to show the 'Expand cluster' page on first log in.
+ cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
+
logger.info('You can access the Ceph CLI with:\n\n'
'\tsudo %s shell --fsid %s -c %s -k %s\n' % (
sys.argv[0],
status: Status
- def __init__(self, status=Status.INSTALLED.name):
+ def __init__(self, status=Status.POST_INSTALLED.name):
+ """
+ :param status: The status of the cluster. Assume that the cluster
+ is already functional by default.
+ :type status: str
+ """
self.status = self.Status[status]
def dict(self):
@classmethod
def from_db(cls):
- return cls(status=mgr.get_store('cluster/status', cls.Status.INSTALLED.name))
+ """
+ Get the stored cluster status from the configuration key/value store.
+ If the status is not set, assume it is already fully functional.
+ """
+ return cls(status=mgr.get_store('cluster/status', cls.Status.POST_INSTALLED.name))