Project

General

Profile

Actions

Feature #36661

open

osd: add sanity check on startup to compare osd memory target to available memory on the host and fail if too high

Added by Neha Ojha over 5 years ago. Updated over 5 years ago.

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

0%

Source:
Tags:
Backport:
luminous,mimic
Reviewed:
Affected Versions:
Component(RADOS):
Pull request ID:

Description

This is needed so that we do not fail due to osd_memomory_target being set too high compared to the amount of memory available on the host.

Actions #1

Updated by Sage Weil over 5 years ago

- in OSD::handle_conf_change, we should sanity check this against current memory available on the system and refuse to set our target above that (or perhaps even build in a safety margin?)
- on startup, we should/could refuse to start if the initial value is above that limit.

- in common/util.cc we have collect_sys_info which gets this info out of /proc. maybe move that block of code into a helper with two output arguments (for free mem and swap) and expose it so that the OSD call sites above can use it to get just those values (without, say, parsing the collected metadata strings and turning them back into ints or something). (also, getting refreshed valued might be good since in theory the amount of memory on the system can change at runtime due to memory hotplugging or maybe container limit changes).

Actions

Also available in: Atom PDF