Skip to content

Use /etc/ceph_version to append vendor release version to the version string - #67299

Merged
Naveenaidu merged 1 commit into
ceph:mainfrom
Naveenaidu:wip-naveen-add-downstream-version-etc-file
Mar 6, 2026
Merged

Naveenaidu merged 1 commit into
ceph:mainfrom
Naveenaidu:wip-naveen-add-downstream-version-etc-file

Conversation

@Naveenaidu

@Naveenaidu Naveenaidu commented Feb 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes: https://jsw.ibm.com/browse/ISCE-2817
Closes: https://tracker.ceph.com/issues/75366

This change introduces a new file that allows vendors or downstream distributions to append their release version information to the output of the ceph version command. The goal is to make downstream or vendor-specific build metadata visible directly in the version string, without altering the upstream version semantics.

This PR reads the release information from the file /etc/ceph_version, which will be added/created by the user/build team. The input of the file is expected to be contain the release information. Sample file looks like:

8.1.0

When the file is provided, the information from the file is appended to the ceph version output as a release suffix. When the file is not provided or is empty, the version output remains unchanged from upstream.

The version output becomes

> ceph version

ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0

The same suffix is reflected consistently for ceph versions

> ceph versions
{
    "mon": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 3
    },
    "mgr": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 1
    },
    "osd": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 3
    },
    "mds": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 3
    },
    "overall": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 10
    }
}

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@Naveenaidu Naveenaidu changed the title Wip naveen add downstream version etc file Use /etc/ceph_version to append vendor release version to the version string Feb 11, 2026
@Naveenaidu Naveenaidu self-assigned this Feb 11, 2026
@Naveenaidu
Naveenaidu force-pushed the wip-naveen-add-downstream-version-etc-file branch from 55d5ae7 to 1109f73 Compare February 24, 2026 05:05
@Naveenaidu
Naveenaidu marked this pull request as ready for review February 24, 2026 05:06
@Naveenaidu

Copy link
Copy Markdown
Contributor Author

jenkins test make check

Comment thread src/common/version.cc Resolved
Introduce a build-time mechanism to allow vendors or downstream
distributions to append their release/version metadata to the output of
ceph version and ceph versions.

The release string is read from the file `/etc/ceph_version` and appends
it to the version string as `release <value>`. If no value is supplied
or the file is empty, the version output remains unchanged.

Example:
If the `/etc/ceph_version` file has "8.1.0" as string then,
ceph version 8d7daada90 (98d7daa) tentacle (dev - Debug) release 8.1.0

Signed-off-by: Naveen Naidu <[email protected]>
@Naveenaidu
Naveenaidu force-pushed the wip-naveen-add-downstream-version-etc-file branch from 1109f73 to 541439b Compare February 26, 2026 06:09
@Naveenaidu

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@bill-scales

Copy link
Copy Markdown
Contributor

jenkins test make check

@Naveenaidu

Copy link
Copy Markdown
Contributor Author

@Naveenaidu
Naveenaidu merged commit e6a03c4 into ceph:main Mar 6, 2026
9 checks passed
@batrick

batrick commented Apr 6, 2026

Copy link
Copy Markdown
Member

#67693 (review)

@idryomov idryomov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#67693 (review)

@batrick I'd suggest reverting this and #68111 in favor of something close to #66730.

@batrick

batrick commented Apr 15, 2026

Copy link
Copy Markdown
Member

#67693 (review)

@batrick I'd suggest reverting this and #68111 in favor of something close to #66730.

This was my preference but there was pushback for building two different vendor containers on the same binaries.

@idryomov

Copy link
Copy Markdown
Contributor

there was pushback for building two different vendor containers on the same binaries

I couldn't find that articulated anywhere public.

With a proper ccache setup, rebuilding and relinking after e.g. the git SHA changes (when ENABLE_GIT_VERSION isn't set to OFF) doesn't take that long. I understand how developers who compile potentially dozens of times per day can be concerned about the overhead (and that is why we have the option for a dummy version string in CMake), but don't see how it can matter for official vendor builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants