Project

General

Profile

Feature #8664

Add ability to get/set a crush map from the cluster

Added by Christina Meno about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Category:
Backend (REST API)
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:

Description

/api/vs/cluster/<FSID>/crush_map
GET -> CrushMapViewSet.retreive(request, fsid)
POST -> CrushMapViewSet.replace(request, fsid) #is POST the right verb for this?

Perform validation on POST

This operation should decompile/compile the crush_map to provide a human readable representation

History

#1 Updated by Christina Meno about 7 years ago

  • Status changed from New to In Progress
  • Assignee set to Christina Meno
  • Target version set to v1.3-dev1

#2 Updated by Christina Meno about 7 years ago

To make the text format work we'll need to compile/decompile

This looks like:
create crush_request_factory.update
update() needs to make a request to Something like

OSDMapModifyingRequest but since there is no crushtool access in the admin interface
I would need to make two requests:
SaltRequest to compile the crushmap
OSDMapModifyingRequest to set the map

This means that I would write a salt module like log-tail to compile/decompile a map

#3 Updated by John Spray about 7 years ago

Gregory Meno wrote:

OSDMapModifyingRequest but since there is no crushtool access in the admin interface
I would need to make two requests:
SaltRequest to compile the crushmap
OSDMapModifyingRequest to set the map

This means that I would write a salt module like log-tail to compile/decompile a map

It probably doesn't make sense to expose the compile/decompile implementation detail to the consumer of the salt module (no need to send the compiled version back and forth between the calamari server and the ceph server). Instead you could implement functions in the ceph module for crush_get and crush_set that accept the textual format and hide the fact that there is a compile/decompile step involved in the implementation. That way it's just one request from the calamari server's point of view, the calamari server doesn't have to handle a binary crush map (or do anything weird like stashing it in /tmp), and if in the future we let the mon take the text format directly without the separate compile/decompile step, it'll be very simple to update.

#4 Updated by Christina Meno about 7 years ago

  • Status changed from In Progress to Fix Under Review

#5 Updated by Christina Meno about 7 years ago

  • Target version changed from v1.3-dev1 to 1.3-dev2

#6 Updated by Christina Meno about 7 years ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF