|
...
|
...
|
@@ -71,17 +71,20 @@ if is_service_enabled g-api; then
|
|
71
|
71
|
# only 1G we can not upload volume to image.
|
|
72
|
72
|
# Increase Swift disk size up to 2G
|
|
73
|
73
|
SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=2G
|
|
|
74
|
+ SWIFT_MAX_FILE_SIZE_DEFAULT=1073741824 # 1G
|
|
74
|
75
|
else
|
|
75
|
76
|
# DevStack will create a loop-back disk formatted as XFS to store the
|
|
76
|
77
|
# swift data. Set ``SWIFT_LOOPBACK_DISK_SIZE`` to the disk size in
|
|
77
|
78
|
# kilobytes.
|
|
78
|
79
|
# Default is 1 gigabyte.
|
|
79
|
80
|
SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=1G
|
|
|
81
|
+ SWIFT_MAX_FILE_SIZE_DEFAULT=536870912 # 512M
|
|
80
|
82
|
fi
|
|
81
|
83
|
|
|
82
|
84
|
# if tempest enabled the default size is 6 Gigabyte.
|
|
83
|
85
|
if is_service_enabled tempest; then
|
|
84
|
86
|
SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=${SWIFT_LOOPBACK_DISK_SIZE:-6G}
|
|
|
87
|
+ SWIFT_MAX_FILE_SIZE_DEFAULT=5368709122 # Swift default 5G
|
|
85
|
88
|
fi
|
|
86
|
89
|
|
|
87
|
90
|
SWIFT_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}
|
|
127
|
127
|
# Swift API
|
|
128
|
128
|
SWIFT_MAX_HEADER_SIZE=${SWIFT_MAX_HEADER_SIZE:-16384}
|
|
129
|
129
|
|
|
|
130
|
+# Set ``SWIFT_MAX_FILE_SIZE`` to configure the maximum file size in Swift API
|
|
|
131
|
+# Default 500MB because the loopback file used for swift could be 1 or 2 GB
|
|
|
132
|
+SWIFT_MAX_FILE_SIZE=${SWIFT_MAX_FILE_SIZE:-$SWIFT_MAX_FILE_SIZE_DEFAULT}
|
|
|
133
|
+
|
|
130
|
134
|
# Set ``OBJECT_PORT_BASE``, ``CONTAINER_PORT_BASE``, ``ACCOUNT_PORT_BASE``
|
|
131
|
135
|
# Port bases used in port number calculation for the service "nodes"
|
|
132
|
136
|
# The specified port number will be used, the additional ports calculated by
|
|
...
|
...
|
@@ -462,6 +469,7 @@ EOF
|
|
462
|
462
|
cp ${SWIFT_DIR}/etc/swift.conf-sample ${SWIFT_CONF_DIR}/swift.conf
|
|
463
|
463
|
iniset ${SWIFT_CONF_DIR}/swift.conf swift-hash swift_hash_path_suffix ${SWIFT_HASH}
|
|
464
|
464
|
iniset ${SWIFT_CONF_DIR}/swift.conf swift-constraints max_header_size ${SWIFT_MAX_HEADER_SIZE}
|
|
|
465
|
+ iniset ${SWIFT_CONF_DIR}/swift.conf swift-constraints max_file_size ${SWIFT_MAX_FILE_SIZE}
|
|
465
|
466
|
|
|
466
|
467
|
local node_number
|
|
467
|
468
|
for node_number in ${SWIFT_REPLICAS_SEQ}; do
|