mirror of
https://github.com/ceph/ceph
synced 2025-01-31 07:22:56 +00:00
Merge pull request #16812 from xiexingguo/wip-class-startup
osd/OSD: tolerate any 'set-device-class' error on OSD startup Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
bd119910f5
@ -3539,14 +3539,12 @@ int OSD::update_crush_device_class()
|
||||
string("\"ids\": [\"") + stringify(whoami) + string("\"]}");
|
||||
|
||||
r = mon_cmd_maybe_osd_create(cmd);
|
||||
// we may not have a real osdmap on first boot, so we can't check if
|
||||
// require-osd-release is set to luminous yet. Instead, ignore
|
||||
// EINVAL.
|
||||
if (r == -EPERM || r == -EINVAL) {
|
||||
r = 0;
|
||||
}
|
||||
|
||||
return r;
|
||||
// the above cmd can fail for various reasons, e.g.:
|
||||
// (1) we are connecting to a pre-luminous monitor
|
||||
// (2) user manually specify a class other than
|
||||
// 'ceph-disk prepare --crush-device-class'
|
||||
// simply skip result-checking for now
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OSD::write_superblock(ObjectStore::Transaction& t)
|
||||
|
Loading…
Reference in New Issue
Block a user