Project

General

Profile

Actions

Feature #45374

open

Add support for BLACKLISTED_DEVICES env var parsing.

Added by Jan Fajerski about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

This is currently only relevant for cephadm.

We need a way to pass certain flags to ceph-volume that are not particularly useful to be exposed via ceph-volume's arg parser

  • blacklisted devices

This will be a functionality that you can leverage via the orchestrators. We allow to blacklist certain devices on hosts
when using drivegroups.
One of the reasons you may want to do this is that know that a certain disk will be failing eventually but can't physically remove it yet.

To make this work we need a way to broadcast that information down to ceph-volume.

BLACKLISTED_DEVICES=/dev/sda ceph-volume ..

CONSIDERATIONS:

There is still the question if it makes sense to add proper arg parsing/passing for these flags to make it less awkward.

`ceph-volume lvm batch /dev/sda --dg-affinity $custom_name`

This seems more natural, but isn't very likely to be used by an actual person as drivegroups are typically leveraged by orchestration systems.

It's even more weird and awkward for the BLACKLISTED_DEVICES var env. If a user wants to exclude a certain disk from the command that he's running he can just exclude it from the ACTUAL command instead of passing it to ceph-volume as an ENV_VAR.

However, using the method described here gives us some advantages for orchestration systems.

If we'd do it like a user and just pass the adjusted command down to ceph-volume, we loose reporting functionality.

Let's assume we have two disks, /dev/sda, /dev/sdb and we want to blacklist /dev/sdb.

A user would do the following.


ceph-volume lvm batch /dev/sda 

The orchestrator should however do this:


BLACKLISTED_DEVICES=/dev/sdb ceph-volume lvm batch /dev/sda /dev/sdb

The reason for this is:

If you forgot (or for whatever reason) that you blacklisted a certain device, it's hard to debug and find out what's going on.
However, if you use the ENV_VAR method you can show that in the inventory output that cephadm also uses to show the device status.

BLACKLISTED_DEVICES=/dev/sdb ceph-volume inventory --format json-pretty

Will now print in the "rejected" field "blacklisted by user".


Related issues 2 (0 open2 closed)

Related to Orchestrator - Bug #45792: cephadm: zapped OSD gets re-added to the cluster.Resolved

Actions
Copied from ceph-volume - Feature #44929: Add support DG_AFFINITY env var parsing.Resolved

Actions
Actions #1

Updated by Jan Fajerski about 4 years ago

  • Copied from Feature #44929: Add support DG_AFFINITY env var parsing. added
Actions #2

Updated by Sebastian Wagner almost 4 years ago

  • Related to Bug #45792: cephadm: zapped OSD gets re-added to the cluster. added
Actions

Also available in: Atom PDF