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/cephadm: Handle empty optional spec values in add_mds #33222

Closed

Conversation

Daniel-Pivonka
Copy link

spec.placement.count and spec.placement.hosts need to be filled for add_mds to be successful

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

Signed-off-by: Daniel-Pivonka dpivonka@redhat.com

spec.placement.count and spec.placement.hosts need to be filled for add_mds to be successful

Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com>
@Daniel-Pivonka Daniel-Pivonka requested a review from a team as a code owner February 11, 2020 20:10
@liewegas
Copy link
Member

I think a simpler fix is to change volumes to call update_mds instead of add_mds...

@sebastian-philipp
Copy link
Contributor

IMO the problem is that there is no way to specify any placements when calling fs vol create. I'd think the best way would be to enhance fs vol create to also have a PlacementSpec parameter

Comment on lines +1936 to +1941
spec.placement.count = spec.count

if not spec.placement.hosts:
spec = NodeAssignment(spec=spec, get_hosts_func=self._get_hosts, service_type='mds').load()

if len(spec.placement.hosts) < spec.placement.count:
Copy link
Contributor

Choose a reason for hiding this comment

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

before we all mess with this here, let's move this code to a dedicated function over here: #33041

Copy link
Contributor

Choose a reason for hiding this comment

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

Have a look at #33041 !

@Daniel-Pivonka
Copy link
Author

closing in favor of #33441

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