Project

General

Profile

Actions

Enhancement #75954

closed
NN NN

Update the implementation of vendor information in `ceph version` command output

Enhancement #75954: Update the implementation of vendor information in `ceph version` command output

Added by Naveen Naidu 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

A new feature was added in https://github.com/ceph/ceph/pull/67299, which allowed vendors or downstream distributions to append their release version information to the output of the `ceph version(s)` command. This PR expects the file called `/etc/ceph_version` to be present in the system and to contain the version information. This approach is sub-optimal and has many issues. The conversation related to the issues are documented in this PR: https://github.com/ceph/ceph/pull/67693

Following are the main concerns:
  1. The file being present in the `/etc` folder violates the Linux Filesystem Hierarchy Standard
  2. The daemons opens/reads this file whenever they generate version metadata. The frequent open/close of file will cause performance issues
  3. Missed upstream testing, need testing ACK from rook and cephadm team

The plan of action is as follows:

  1. The location of the file will be made configurable, but will be defaulted to `/usr/lib/ceph/ceph_version`
  2. The value of the file will be cached i.e the `pretty_version_to_str` will not frequently open/close the file, it will use the cached value. Initial idea, the vendor version will be part of ceph context as a static variable when ceph_context is being initialized
  3. Upstream testing needs to be done, for this case - the upstream test architecture needs to be updated to create this file and test the downgrade suits.
  4. Need ACK from cephadm and rook team

Related issues 1 (0 open — 1 closed)

Related to RADOS - Bug #76134: Update the implementation of vendor information in `ceph version` command outputResolvedNaveen Naidu

Actions

PD Updated by Patrick Donnelly 8 months ago Actions #1

The location of the file will be made configurable, but will be defaulted to `/usr/lib/ceph/ceph_version`

Let's call it `ceph_vendor` instead.

NN Updated by Naveen Naidu 8 months ago Actions #2

After discussion with Patrick, Ilya, Justin, Yarrit, and myself, we concluded that the current approach is incorrect: the version string should not be runtime-dependent. Reading the version from a file means the output of ceph version cannot be fully trusted and is potentially insecure. We will therefore be reverting the commits made to the main branch.

The correct approach is to bake the version string directly into the binary, as demonstrated in this POC: https://github.com/ceph/ceph/pull/66730

NN Updated by Naveen Naidu 8 months ago Actions #3

  • Related to Bug #76134: Update the implementation of vendor information in `ceph version` command output added

NN Updated by Naveen Naidu 8 months ago Actions #4

  • Status changed from New to Closed
Actions

Also available in: PDF Atom