@@ -71,17 +71,20 @@ if is_service_enabled g-api; then
7171 # only 1G we can not upload volume to image.
7272 # Increase Swift disk size up to 2G
7373 SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=2G
74+ SWIFT_MAX_FILE_SIZE_DEFAULT=1073741824 # 1G
7475else
7576 # DevStack will create a loop-back disk formatted as XFS to store the
7677 # swift data. Set ``SWIFT_LOOPBACK_DISK_SIZE`` to the disk size in
7778 # kilobytes.
7879 # Default is 1 gigabyte.
7980 SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=1G
81+ SWIFT_MAX_FILE_SIZE_DEFAULT=536870912 # 512M
8082fi
8183
8284# if tempest enabled the default size is 6 Gigabyte.
8385if is_service_enabled tempest; then
8486 SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=${SWIFT_LOOPBACK_DISK_SIZE:- 6G}
87+ SWIFT_MAX_FILE_SIZE_DEFAULT=5368709122 # Swift default 5G
8588fi
8689
8790SWIFT_LOOPBACK_DISK_SIZE=${SWIFT_LOOPBACK_DISK_SIZE:- $SWIFT_LOOPBACK_DISK_SIZE_DEFAULT }
@@ -127,6 +130,10 @@ SWIFT_LOG_TOKEN_LENGTH=${SWIFT_LOG_TOKEN_LENGTH:-12}
127130# Swift API
128131SWIFT_MAX_HEADER_SIZE=${SWIFT_MAX_HEADER_SIZE:- 16384}
129132
133+ # Set ``SWIFT_MAX_FILE_SIZE`` to configure the maximum file size in Swift API
134+ # Default 500MB because the loopback file used for swift could be 1 or 2 GB
135+ SWIFT_MAX_FILE_SIZE=${SWIFT_MAX_FILE_SIZE:- $SWIFT_MAX_FILE_SIZE_DEFAULT }
136+
130137# Set ``OBJECT_PORT_BASE``, ``CONTAINER_PORT_BASE``, ``ACCOUNT_PORT_BASE``
131138# Port bases used in port number calculation for the service "nodes"
132139# The specified port number will be used, the additional ports calculated by
462469 cp ${SWIFT_DIR} /etc/swift.conf-sample ${SWIFT_CONF_DIR} /swift.conf
463470 iniset ${SWIFT_CONF_DIR} /swift.conf swift-hash swift_hash_path_suffix ${SWIFT_HASH}
464471 iniset ${SWIFT_CONF_DIR} /swift.conf swift-constraints max_header_size ${SWIFT_MAX_HEADER_SIZE}
472+ iniset ${SWIFT_CONF_DIR} /swift.conf swift-constraints max_file_size ${SWIFT_MAX_FILE_SIZE}
465473
466474 local node_number
467475 for node_number in ${SWIFT_REPLICAS_SEQ} ; do
0 commit comments