Skip to content

mgr/cephadm: mgr/cephadm: Add ceph orch generate-service-specs#35669

Closed
sebastian-philipp wants to merge 6 commits intoceph:masterfrom
sebastian-philipp:mgr-cephadm-generate-service.yaml
Closed

mgr/cephadm: mgr/cephadm: Add ceph orch generate-service-specs#35669
sebastian-philipp wants to merge 6 commits intoceph:masterfrom
sebastian-philipp:mgr-cephadm-generate-service.yaml

Conversation

@sebastian-philipp
Copy link
Contributor

the adoption process doesn't create service specifications.

This command prints out a set of service specifications that can be used to
finalize the adoption process

Fixes: https://tracker.ceph.com/issues/45973

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 dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

Make it usable in other module as well.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
…etc.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
the adoption process doesn't create service specifications.

This command prints out a set of service specifications that can be used to
finalize the adoption process

Fixes: https://tracker.ceph.com/issues/45973

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Comment on lines +64 to +66
placement=PlacementSpec(
hosts=[dd_to_hpl(dd)],
),
Copy link
Contributor Author

@sebastian-philipp sebastian-philipp Jun 19, 2020

Choose a reason for hiding this comment

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

wondering, if we can relax this. cephadm won't re-deploy anything that is currently running. There is IMO no need to redeploy the service with the same name afterwards.

Copy link
Member

Choose a reason for hiding this comment

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

do not relax... more information .. less things to deduce in the future :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not so sure about this. I think I'll remove the name parameter for the daemons.

@tchaikov
Copy link
Contributor

jenkins test docs

Copy link
Member

@tserong tserong left a comment

Choose a reason for hiding this comment

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

How is this expected to be used? Adopt the MONs & MGRs, enable the orchestrator, but pause it, then adopt the other daemons, then ceph orch generate-service-specs, then apply those specs after possibly editing them?

@sebastian-philipp
Copy link
Contributor Author

How is this expected to be used? Adopt the MONs & MGRs, enable the orchestrator, but pause it, then adopt the other daemons, then ceph orch generate-service-specs, then apply those specs after possibly editing them?

that would be my idea, yes. would that work for you?

This command cannot be properly implemented, cuase of:

* we don't know the exact placement specifier for MONs
* specs can't be deduced. Like port numbers, passwords etc.
Copy link
Member

Choose a reason for hiding this comment

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

I think that maybe we should create a fixed "template" spec file for each daemon/service, including all the attributes we need to configure the daemon/service.
This will make easy to "adopt" things.. because we will know what attributes we are going to need, what are the defaults and if there is a customization in any attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean like e.g.

service_type: rgw
...
spec:
#   rgw_port: <adapt this, if required>

?

Copy link
Member

Choose a reason for hiding this comment

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

yes

Copy link
Contributor Author

@sebastian-philipp sebastian-philipp Jun 24, 2020

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, turned out, having this this made this PR much more complicated and thus not sustainable.

return format_units(n, width, colored, decimal=False)


def to_yaml_or_json(what: Any, format: str) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion:
def to_markup_lang(what: Any, format: str) -> str

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm. we're not supporting XML yet.

@tserong
Copy link
Member

tserong commented Jun 23, 2020

that would be my idea, yes. would that work for you?

Yes, I think so. It somehow feels a bit cumbersome, but I'm not seeing a way to streamline it any further, and anyway, introducing service specs like this during adoption ensures that the step is explicit, and that the admin will end up getting exactly what they ask for.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
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.

4 participants