Project

General

Profile

Feature #46811

cephadm: add host metadata to the orchestrator's inventory

Added by Paul Cuzner 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cephadm
Target version:
% Done:

100%

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

Description

The current host spec provides no insights into the host that is being managed. By enriching the metadata held for a host in the inventory, the data can be exposed in the CLI and UI and also potentially help to validate daemon/service deployments

Proposed Design
1. Update cephadm check-host command
a) add a bool "gather_facts" (default=False) to trigger the metadata routine
b) add new class to handle the data gathering
c) when gather_facts is True, pass back the data to the caller
2. Update HostSpec to store the additional metadata in the inventory (just adding a metadata dict for now)
3. update mgr/cephadm
a) _add_hosts should use the gather_facts setting, and store the data in the inventory entry

The POC code just uses standard python, no additional dependencies required.

Data returned has the following fields;

bios_date: str
bios_version: str
vendor: str
model: str
operating_system: str
cpu_cores: int
cpu_model: str
cpu_threads: int
memory_kb: int
flash_count: int
flash_capacity: str
flash_capacity_bytes: int
flash_list: List[str]
hdd_count: int
hdd_capacity: str
hdd_capacity_bytes: int
hdd_list: List[str]
ipv4_subnets: List[str]
nic_count: int
nics_by_speed: Dict[str, int]
subscribed: str

History

#1 Updated by Paul Cuzner 5 months ago

  • Status changed from New to Fix Under Review
  • % Done changed from 0 to 100
  • Pull request ID set to 36509

#2 Updated by Paul Cuzner 5 months ago

  • Status changed from Fix Under Review to Closed

Also available in: Atom PDF