Project

General

Profile

Actions

Bug #53130

closed

cephadm SYSCTL_DIR path not FHS compliant

Added by Lukas Mayer over 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
cephadm (binary)
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

By default, cephadm uses '/usr/lib/sysctl.d/' (→ cephadm:L65) as default path for the osd-specific sysctl settings.

According to the Filesystem Hierarchy Standard /usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. (→ FHS 3.0 Sec. 4.1)

I would recommend that '/etc/sysctl.d' is used instead, because that would be a proper place for host specific, non-distribution sysctl configuration files.

Uncompliance with that specific FHS rule may break technologies that rely on '/usr/lib/sysctl.d/' being either read-only or completely overwritten (an example would be SUSE's transactional-update).

Backporting
Regarding backporting there would be several different strategies:
  1. Leave ceph sysctl configuration at '/usr/lib/sysctl.d'
    PRO: No changes to stable branches
    CON: Older branches stay uncompliant/ unusable with certain technologies.
  2. Use '/etc/sysctl.d/' if '/usr/lib/sysctl.d/' is unwritable as root (→ read-only)
    PRO: No changes to already set up systems.
    PRO: Will be useable with read-only filesystem.
    CON: Not working if '/usr/lib/sysctl.d/' is overwritten by the distribution
  3. Migrate configuration from '/usr/lib/sysctl.d' to '/etc/sysctl.d'
    PRO: Full FHS compliance; read-only and overwrite scenarios supported.
    CON: Changes on already set up systems.
Related

Related issues 1 (0 open1 closed)

Related to Orchestrator - Bug #52481: cephadm: install_sysctl: FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/sysctl.d/90-ceph-...'Closed

Actions
Actions #1

Updated by Sebastian Wagner over 2 years ago

  • Related to Bug #52481: cephadm: install_sysctl: FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/sysctl.d/90-ceph-...' added
Actions #2

Updated by Sebastian Wagner over 2 years ago

Thanks for the report! Let's properly migrate things. If we don't migrate things, we have to deal with the legacy location for all eternity.

Actions #3

Updated by Lukas Mayer over 2 years ago

I have created a pull request for the 'master' branch: #43796

Let's properly migrate things. If we don't migrate things, we have to deal with the legacy location for all eternity.

In theory, this would be all that is needed.

For stable branches, it would be an idea to have a mechanism that deletes files from '/usr/bin/sysctl.d'.
But this may introduce more issues, because of the read-only nature of '/usr'.

If you do not want to introduce more routines to fix that on existing systems, already created files will be left in the wrong place. Which is not nice, but breaks noting if it already works.

A configuration file will be created in the right place (→/etc/sysctl.d) the next time a daemon that requires that particular sysctl configuration is created.
If you think that this should be done in advance, I could implement something like this.

Actions #4

Updated by Kefu Chai over 2 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 43796
Actions #5

Updated by Sebastian Wagner over 2 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Sebastian Wagner over 2 years ago

  • Status changed from Pending Backport to Fix Under Review
Actions #7

Updated by Redouane Kachach Elhichou almost 2 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF