Project

General

Profile

Actions

Feature #58804

open

Transactional cluster configuration

Added by Jonas Jelten about 1 year ago.

Status:
New
Priority:
High
Assignee:
-
Category:
ceph cli
Target version:
-
% Done:

0%

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

Description

Ceph should provide a transactional configuration interface, so external tools can read and manipulate the Ceph cluster state without outside changes in between.

For example, for my a custom Ceph balancer, I need to call several ceph tool calls to gather all necessary state:

    CLUSTER_STATE = dict(
        timestamp=datetime.datetime.now().isoformat(),
        versions=jsoncall("ceph versions --format=json"),
        health_detail=jsoncall("ceph health detail --format=json"),
        osd_dump=jsoncall("ceph osd dump --format json"),
        pg_dump=jsoncall("ceph pg dump --format json", swallow_stderr=True),
        osd_df_dump=jsoncall("ceph osd df --format json"),
        osd_df_tree_dump=jsoncall("ceph osd df tree --format json"),
        df_dump=jsoncall("ceph df detail --format json"),
        pool_dump=jsoncall("ceph osd pool ls detail --format json"),
        crush_dump=jsoncall("ceph osd crush dump --format json"),
        crush_class_osds=dict(),
    )

    crush_classes = jsoncall("ceph osd crush class ls --format json")
    for crush_class in crush_classes:
        class_osds = jsoncall(f"ceph osd crush class ls-osd {crush_class} --format json")
        if not class_osds:
            continue
        CLUSTER_STATE["crush_class_osds"][crush_class] = class_osds

But during these calls, Ceph's state may change (e.g. ongoing movements), since these ceph calls are not done in one transaction (and no command that provides all the information at once).
So all the information may be out of sync.

The same thing should be possible for applying the calculated upmap items for moving the data.
The PG placement changes should be applyable in one transaction, ideally in the same transaction as all the calls above.

No data to display

Actions

Also available in: Atom PDF