Repository navigation
src/common/version: Improve logic for handling the vendor version - #68356
Naveenaidu wants to merge 4 commits into
Conversation
Config Diff Tool Output+ added: ceph_vendor_version_file (global.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
|
We need ACK from the rook and cephadm teams to know if an addition of the Is there anything from my side that I can do for testing this in rook and cephadm test suites ? cc: @travisn (for rook) and @rkachach , @adk3798 (for cephadm) |
batrick
left a comment
There was a problem hiding this comment.
pretty_version_to_str will also need to take a CephContext* to access the vendor string.
I think you can also simplify your file reading code (use Gemini to help improve it).
I have to check the rest of the code but cephadm does rely on that command for upgrade process in a couple of spots: and: Maybe @adk3798 is aware of other implications related with the upgrade. Anyway, I have to check the rest of the code carefully to see if there's other spots where the cmd is used .... |
@Naveenaidu I believe Rook will be ok. We could run our test suites against it, if there is an image pushed somewhere to quay. And to clarify, will it be a suffix or a prefix? From the PR description, it looks like just a suffix being appended at the end? |
Thanks Travis, will update you once an image is pushed to quay!
My apologies, it's a suffix - I will update the comment. The extra string will be appended at the end |
There was a problem hiding this comment.
It looks like RBD got tagged just because of a mechanical change that adds CephContext parameter to a common method, but since I have taken a look I'm going to leave my opinion.
Neither the original (#67299) nor this PR seem right to me. The version information has to be baked into the build artifacts at build time, it can't be fetched from some (configurable!) file at runtime -- at that point it's essentially a way to get ceph version and related commands to return a random string that no one could trust. I also don't see a valid reason for pretty_version_to_str() to take CephContext or any other parameter of similar weight. The only parameter that I'd consider acceptable for pretty_version_to_str() would be something along the lines include_vendor bool -- the fact that it currently takes no parameters is very much intended.
da7b645 to
40e4850
Compare
ad9938e to
e3c401d
Compare
The ceph_vendor_version_file config options allows users to configure where the release file for ceph vendor is present. The content of this file is read during the initialization of the cluster. The vendor version is stored in a static variable so that the vendor file is not opened/closed everytime the version metadata is created for daemons Fixes: https://tracker.ceph.com/issues/75954 Signed-off-by: Naveen Naidu <[email protected]>
…file Signed-off-by: Naveen Naidu <[email protected]>
e3c401d to
39521cd
Compare
39521cd to
1f8fd6f
Compare
batrick
left a comment
There was a problem hiding this comment.
I don't love making the vendor string conditional on having the cct*. However I also don't have a better recommendation except perhaps we could make it static variable again.
| } | ||
|
|
||
| g_ceph_context->set_vendor_version_file( | ||
| g_conf().get_val<std::string>("ceph_vendor_version_file")); |
There was a problem hiding this comment.
Not everything goes through global init. E.g. library clients will not. This needs to be moved to initialization of the CephContext.
There was a problem hiding this comment.
The reason I did not add set_vendor_version_file in the initialization of CephContext is because the configuration files are not parsed during the CephContext::CephContext. If we called set_vendor_version_file inside CephContext::CephContext then the ceph_vendor_version_file would still be in it;s compiled-in default - ignoring anything in ceph.conf.
Is there a better place for this?
I agree, I do not the vendor string being conditional on having the cct*, I would very much prefer making it a static variable. If you are okay with that option - I can revert the commit involving the passing of cct to |
|
I know I'm late to this, but I really am not happy about using the name /etc/ceph_version either; it's a very specific addendum to the version and should be clearly labeled. at least /etc/ceph_vendor_version_extension or something like it. |
|
The approach taken in this PR is incorrect, we do not want version string to be runtime dependent. It is unsafe and violates the schemantics of version string. The next steps are documented here: https://tracker.ceph.com/issues/76134 The original commits are being reverted in this PR: #68479 This PR would now be closed in favour of #66730 where we will have the version baked into the binary |
The PR #67299 added a feature will allowed vendors to their release version information to the output of the
ceph version(s)command. As discussed here #67693, there are some issues with the approach taken in the PR.This PR aims at solving them, in this we do the following:
ceph_vendor_version_fileconfig options has been added, to allow users to decide where to fetch the vendor release information fromFor reference, the output of the commands looks like the follows:
The version output becomes
The same suffix is reflected consistently for
ceph versionsFixes: https://tracker.ceph.com/issues/75954
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.