cephadm: Make path to cephadm binary unique#39141
cephadm: Make path to cephadm binary unique#39141sebastian-philipp wants to merge 4 commits intoceph:masterfrom
Conversation
right now, an upgrade might overwrite the existing binary which would force us to have the CLI stable. Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
3983233 to
9f43ee0
Compare
|
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
jmolmo
left a comment
There was a problem hiding this comment.
Need to check that cephadm binary exists when we create a Cephadmdaemon
Also: * Enable the `test_can_run` unit test Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
|
ping @jmolmo |
adk3798
left a comment
There was a problem hiding this comment.
Code generally looks good to me. I haven't looked much at the exporter code so these are more questions on things I'm unsure about than suggestions.
| parser_exporter.add_argument( | ||
| '--binary', | ||
| type=str, | ||
| help='path to the cephadm binary') |
There was a problem hiding this comment.
What's the use case for this arg? If we're calling the exporter command directly from the command line then the binary to use would just be the one we're calling with, and in a call from the mgr to setup an exporter the only place the binary location is being used is in the CephadmDaemon unit_run function
Lines 6829 to 6838 in 4166eca
There was a problem hiding this comment.
What's the use case for this arg? If we're calling the exporter command directly from the command line then the binary to use would just be the one we're calling with.
There is no binary at this point. At least not when calling from cephadm. At least not until we have merged #39619 which depends on this very PR.
but we can probably avoid adding the --binary command argument indeed.
| "key": cfg.key, | ||
| "token": cfg.token | ||
| "token": cfg.token, | ||
| 'binary': self.mgr.cephadm_binary_path, |
There was a problem hiding this comment.
I could be off, but it looks like we pass the config dict into the CephadmDaemon deploy_daemon_unit function
Lines 2497 to 2504 in 4166eca
which then writes all these files out
Lines 6876 to 6879 in 4166eca
should we avoid having it do so for the binary since we're already deploying it beforehand with _deploy_cephadm_binary?
There was a problem hiding this comment.
wondering if it makes sense to combine this PR with #39619 and avoid this complication
right now, an upgrade might overwrite the existing
binary which would force us to have the CLI stable. Thus the path to cephadm is not safe for us.
This PR changes the path to a location that depends on the content of cephadm and thus is safe for up and downgrades.
Required for #37495
Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox