New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgr/orchestrator,cephadm: clean up 'orch ls', osd services #40736
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is not very useful at this level: - we see it from 'orch ps' - it can be a mix of ids during upgrade - some services may have multiple images at steady state (e.g., ingress) Signed-off-by: Sage Weil <sage@newdream.net>
If there is no osdspec_affinity or service_name (from unit.meta), then report as 'osd.unmanaged'. Signed-off-by: Sage Weil <sage@newdream.net>
jenkins test docs |
The prior implementation first tried to fabricate services based on the running daemons, and then filled in defined services on top. This led to duplication and a range of small errors. Instead, flip this around: start with the services that are defined, and only fill in 'unmanaged' services where we need to. Drop the osd kludges and instead rely on DaemonDescription.service_id to return the right thing. Signed-off-by: Sage Weil <sage@newdream.net>
mgfritch
approved these changes
Apr 12, 2021
|
||
if self._service_name: | ||
if '.' in self._service_name: | ||
return self._service_name.split('.', 1)[1] | ||
else: | ||
return '' | ||
|
||
if self.daemon_type == 'osd': | ||
if self.osdspec_affinity and self.osdspec_affinity != 'None': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) seems like a str 'None'
could be problematic elsewhere ...
should get_osdspec_affinity
return a NoneType?
ceph/src/pybind/mgr/cephadm/services/osd.py
Lines 298 to 299 in 648f9e1
def get_osdspec_affinity(self, osd_id: str) -> str: | |
return self.mgr.get('osd_metadata').get(osd_id, {}).get('osdspec_affinity', '') |
3 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox