Skip to content
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
merged 3 commits into from Apr 12, 2021

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Apr 9, 2021

  • report osds under osd.unmanaged if there is no service
  • drop container image from 'orch ls' output
  • clean up cephadm describe_service implementation

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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

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>
@neha-ojha
Copy link
Member

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>

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':
Copy link
Contributor

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?

def get_osdspec_affinity(self, osd_id: str) -> str:
return self.mgr.get('osd_metadata').get(osd_id, {}).get('osdspec_affinity', '')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants