Merge "Only create swift account if swift enabled"
diff --git a/lib/swift b/lib/swift
index 2feae78..d09a953 100644
--- a/lib/swift
+++ b/lib/swift
@@ -223,6 +223,7 @@
         local swift_node_config=$1
         local node_id=$2
         local bind_port=$3
+        local server_type=$4
 
         log_facility=$[ node_id - 1 ]
         node_path=${SWIFT_DATA_DIR}/${node_number}
@@ -242,6 +243,9 @@
         iniuncomment ${swift_node_config} DEFAULT log_facility
         iniset ${swift_node_config} DEFAULT log_facility LOG_LOCAL${log_facility}
 
+        iniuncomment ${swift_node_config} DEFAULT disable_fallocate
+        iniset ${swift_node_config} DEFAULT disable_fallocate true
+
         iniuncomment ${swift_node_config} DEFAULT mount_check
         iniset ${swift_node_config} DEFAULT mount_check false
 
@@ -252,7 +256,7 @@
     for node_number in ${SWIFT_REPLICAS_SEQ}; do
         swift_node_config=${SWIFT_CONF_DIR}/object-server/${node_number}.conf
         cp ${SWIFT_DIR}/etc/object-server.conf-sample ${swift_node_config}
-        generate_swift_config ${swift_node_config} ${node_number} $[OBJECT_PORT_BASE + 10 * (node_number - 1)]
+        generate_swift_config ${swift_node_config} ${node_number} $[OBJECT_PORT_BASE + 10 * (node_number - 1)] object
         iniset ${swift_node_config} filter:recon recon_cache_path  ${SWIFT_DATA_DIR}/cache
         # Using a sed and not iniset/iniuncomment because we want to a global
         # modification and make sure it works for new sections.
@@ -260,14 +264,14 @@
 
         swift_node_config=${SWIFT_CONF_DIR}/container-server/${node_number}.conf
         cp ${SWIFT_DIR}/etc/container-server.conf-sample ${swift_node_config}
-        generate_swift_config ${swift_node_config} ${node_number} $[CONTAINER_PORT_BASE + 10 * (node_number - 1)]
+        generate_swift_config ${swift_node_config} ${node_number} $[CONTAINER_PORT_BASE + 10 * (node_number - 1)] container
         iniuncomment ${swift_node_config} app:container-server allow_versions
         iniset ${swift_node_config} app:container-server allow_versions  "true"
         sed -i -e "s,#[ ]*recon_cache_path .*,recon_cache_path = ${SWIFT_DATA_DIR}/cache," ${swift_node_config}
 
         swift_node_config=${SWIFT_CONF_DIR}/account-server/${node_number}.conf
         cp ${SWIFT_DIR}/etc/account-server.conf-sample ${swift_node_config}
-        generate_swift_config ${swift_node_config} ${node_number} $[ACCOUNT_PORT_BASE + 10 * (node_number - 1)]
+        generate_swift_config ${swift_node_config} ${node_number} $[ACCOUNT_PORT_BASE + 10 * (node_number - 1)] account
         sed -i -e "s,#[ ]*recon_cache_path .*,recon_cache_path = ${SWIFT_DATA_DIR}/cache," ${swift_node_config}
     done
 
@@ -286,12 +290,6 @@
     iniset ${testfile} func_test account2 swifttenanttest2
     iniset ${testfile} func_test username2 swiftusertest2
 
-    # Set maximum file size to 10000 bytes or our vm will fill up quickly with
-    # the default 5gb size.
-    iniuncomment ${testfile} func_test max_file_size
-    iniset ${testfile} func_test max_file_size 10000
-
-
     if is_service_enabled key;then
         iniuncomment ${testfile} func_test auth_version
         iniset ${testfile} func_test auth_host ${KEYSTONE_SERVICE_HOST}