From 7af3a0eb8159dbb5a1f754d3e6804705d58b812e Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 1 Jul 2021 16:10:30 -0400 Subject: [PATCH] 17395: Update docs for newer storage classes behavior. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- doc/admin/storage-classes.html.textile.liquid | 8 ++++---- services/keepproxy/keepproxy.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/admin/storage-classes.html.textile.liquid b/doc/admin/storage-classes.html.textile.liquid index e5c9a3973f..3e17831b58 100644 --- a/doc/admin/storage-classes.html.textile.liquid +++ b/doc/admin/storage-classes.html.textile.liquid @@ -34,10 +34,10 @@ h3. Using storage classes h3. Storage management notes -The "keep-balance":{{site.baseurl}}/install/install-keep-balance.html service is responsible for deciding which blocks should be placed on which keepstore volumes. As part of the rebalancing behavior, it will determine where a block should go in order to satisfy the desired storage classes, and issue pull requests to copy the block from its original volume to the desired volume. The block will subsequently be moved to trash on the original volume. +When uploading data, if a data block cannot be uploaded to all desired storage classes, it will result in a fatal error. Data blocks will not be uploaded to volumes that do not have the desired storage class. -If a block appears in multiple collections with different storage classes, the block will be stored in separate volumes for each storage class, even if that results in overreplication, unless there is a volume which has all the desired storage classes. +If you change the storage classes for a collection, the data is not moved immediately. The "keep-balance":{{site.baseurl}}/install/install-keep-balance.html service is responsible for deciding which blocks should be placed on which keepstore volumes. As part of the rebalancing behavior, it will determine where a block should go in order to satisfy the desired storage classes, and issue pull requests to copy the block from its original volume to the desired volume. The block will subsequently be moved to trash on the original volume. -If a collection has a desired storage class which is not available in any keepstore volume, the collection's blocks will remain in place, and an error will appear in the @keep-balance@ logs. +If a block is assigned to multiple storage classes, the block will be stored on @desired_replication@ number of volumes for storage class, even if that results in overreplication. -This feature does not provide a hard guarantee on where data will be stored. Data may be written to default storage and moved to the desired storage class later. If controlling data locality is a hard requirement (such as legal restrictions on the location of data) we recommend setting up multiple Arvados clusters. +If a collection has a desired storage class which is not available in any keepstore volume, the collection's blocks will remain in place, and an error will appear in the @keep-balance@ logs. diff --git a/services/keepproxy/keepproxy.go b/services/keepproxy/keepproxy.go index 3191a373f2..740ba9b1cb 100644 --- a/services/keepproxy/keepproxy.go +++ b/services/keepproxy/keepproxy.go @@ -474,7 +474,7 @@ func (h *proxyHandler) Put(resp http.ResponseWriter, req *http.Request) { for _, sc := range strings.Split(req.Header.Get("X-Keep-Storage-Classes"), ",") { scl = append(scl, strings.Trim(sc, " ")) } - kc.StorageClasses = scl + kc.SetStorageClasses(scl) } _, err = fmt.Sscanf(req.Header.Get("Content-Length"), "%d", &expectLength) -- 2.30.2