Idea #12708
Updated by Tom Clegg almost 7 years ago
keep-balance needs In addition to take all relevant collections' @storage_classes_desired@ fields into account when deciding to pull/trash replicas of a given block. When sending pull requests, keep-balance should supply (in "mount_uuid") the UUID of a mount that offers the appropriate storage classes. keep-balance's log should indicate whether all desired storage classes are achieved. (TBD: how much detail / how should details be reported?) keep-balance's log should indicate whether all desired storage classes are _achievable._ Prerequisites: more subtle balancing decision, this will involve * #7931: keep-balance using the @/mounts/{uuid}/blocks@ API instead of the server-wide index API * #11644: keepstore supporting a new "destination mount" field in pull and trash list entries * Add @`json:"mount_uuid"`@ tag to the MountUUID field added to PullRequest in keepstore in #11644 Examples: * replication_desired=2, storage_classes_desired=["foo","bar"] means at least 2 replicas should be stored on volumes that offer _both_ "foo" and "bar" classes. * If a block appears in collection A (replication=2, classes=[foo,bar]) and collection B (replication=3, classes=[default]) then any of the following scenarios are accepted: ** 2 replicas on 2 volumes with classes=[foo,bar] plus 3 replicas on 3 volumes with classes=[default] ** 3 replicas on 3 volumes with classes=[foo,bar,default] ** 2 replicas on 2 volumes with classes=[foo,bar,default] plus 1 replica on a volume with classes=[default]