Project

General

Profile

Actions

Bug #53491

closed

cephadm: 'ceph cephadm osd activate' does not activate existing, previously started OSDs

Added by Sage Weil over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
-
Category:
cephadm/osd
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

This command works great for created-by-never-started OSDs. However, if up_from is non-zero, the osd is ignored. See this code in cephadm.py

    def get_osd_uuid_map(self, only_up=False):
        # type: (bool) -> Dict[str, str]
        osd_map = self.get('osd_map')
        r = {}
        for o in osd_map['osds']:
            # only include OSDs that have ever started in this map.  this way
            # an interrupted osd create can be repeated and succeed the second
            # time around.
            osd_id = o.get('osd')
            if osd_id is None:
                raise OrchestratorError("Could not retrieve osd_id from osd_map")
            if not only_up or (o['up_from'] > 0):
                r[str(osd_id)] = o.get('uuid', '')
        return r

this means that we always exclude OSDs that have ever started.

In some cases, it is just the /var/lib/ceph/$fsid/osd.$id directory that needs to be reinstantiated for an exist OSD. Example: it got deleted, or the disk got moved to a new server.

Actions

Also available in: Atom PDF