Merge "Add Swift storage policy to extend testing"

This commit is contained in:
Zuul
2026-02-13 18:14:05 +00:00
committed by Gerrit Code Review

View File

@@ -484,6 +484,9 @@ function configure_swift {
iniset ${SWIFT_CONF_DIR}/swift.conf swift-constraints max_header_size ${SWIFT_MAX_HEADER_SIZE}
iniset ${SWIFT_CONF_DIR}/swift.conf swift-constraints max_file_size ${SWIFT_MAX_FILE_SIZE}
# Create an additional storage policy
iniset ${SWIFT_CONF_DIR}/swift.conf storage-policy:1 name silver
local node_number
for node_number in ${SWIFT_REPLICAS_SEQ}; do
local swift_node_config=${SWIFT_CONF_DIR}/object-server/${node_number}.conf
@@ -720,6 +723,10 @@ function init_swift {
$SWIFT_BIN_DIR/swift-ring-builder object.builder rebalance 42
$SWIFT_BIN_DIR/swift-ring-builder container.builder rebalance 42
$SWIFT_BIN_DIR/swift-ring-builder account.builder rebalance 42
# An additional storage policy requires an object ring as well.
# Re-using the previously created one to use the same devices.
cp object.ring.gz object-1.ring.gz
} && popd >/dev/null
}