Enhancement #75954
closedUpdate the implementation of vendor information in `ceph version` command output
0%
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:- The file being present in the `/etc` folder violates the Linux Filesystem Hierarchy Standard
- The daemons opens/reads this file whenever they generate version metadata. The frequent open/close of file will cause performance issues
- Missed upstream testing, need testing ACK from rook and cephadm team
The plan of action is as follows:
- The location of the file will be made configurable, but will be defaulted to `/usr/lib/ceph/ceph_version`
- 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
- 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.
- Need ACK from cephadm and rook team
PD Updated by Patrick Donnelly 8 months ago
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
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
- Related to Bug #76134: Update the implementation of vendor information in `ceph version` command output added
NN Updated by Naveen Naidu 8 months ago
- Status changed from New to Closed
Closing this tracker in favour of: https://tracker.ceph.com/issues/76134