Merge "make bash8 take a -v flag"
diff --git a/clean.sh b/clean.sh
index 09f08dc..b2a9405 100755
--- a/clean.sh
+++ b/clean.sh
@@ -101,11 +101,6 @@
     cleanup_nova_hypervisor
 fi
 
-#if mount | grep $DATA_DIR/swift/drives; then
-#  sudo umount $DATA_DIR/swift/drives/sdb1
-#fi
-
-
 # Clean out /etc
 sudo rm -rf /etc/keystone /etc/glance /etc/nova /etc/cinder /etc/swift
 
@@ -123,9 +118,5 @@
     sudo rm -rf $SCREEN_LOGDIR
 fi
 
-# Clean up networking...
-# should this be in nova?
-# FIXED_IP_ADDR in br100
-
 # Clean up files
 rm -f $TOP_DIR/.stackenv
diff --git a/files/default_catalog.templates b/files/default_catalog.templates
index e64f68f..ff00e38 100644
--- a/files/default_catalog.templates
+++ b/files/default_catalog.templates
@@ -50,12 +50,12 @@
 catalog.RegionOne.cloudformation.publicURL = http://%SERVICE_HOST%:8000/v1
 catalog.RegionOne.cloudformation.adminURL = http://%SERVICE_HOST%:8000/v1
 catalog.RegionOne.cloudformation.internalURL = http://%SERVICE_HOST%:8000/v1
-catalog.RegionOne.cloudformation.name = Heat CloudFormation Service
+catalog.RegionOne.cloudformation.name = CloudFormation service
 
 catalog.RegionOne.orchestration.publicURL = http://%SERVICE_HOST%:8004/v1/$(tenant_id)s
 catalog.RegionOne.orchestration.adminURL = http://%SERVICE_HOST%:8004/v1/$(tenant_id)s
 catalog.RegionOne.orchestration.internalURL = http://%SERVICE_HOST%:8004/v1/$(tenant_id)s
-catalog.RegionOne.orchestration.name = Heat Service
+catalog.RegionOne.orchestration.name = Orchestration Service
 
 catalog.RegionOne.metering.publicURL = http://%SERVICE_HOST%:8777/v1
 catalog.RegionOne.metering.adminURL = http://%SERVICE_HOST%:8777/v1
diff --git a/files/rpms/cinder b/files/rpms/cinder
index 623c13e..199ae10 100644
--- a/files/rpms/cinder
+++ b/files/rpms/cinder
@@ -4,4 +4,4 @@
 python-devel
 postgresql-devel
 iscsi-initiator-utils
-python-lxml         #dist:f18,f19,f20
+python-lxml         #dist:f18,f19,f20,rhel7
diff --git a/files/rpms/glance b/files/rpms/glance
index fffd9c8..785ce25 100644
--- a/files/rpms/glance
+++ b/files/rpms/glance
@@ -9,8 +9,8 @@
 python-devel
 python-eventlet
 python-greenlet
-python-lxml         #dist:f18,f19,f20
-python-paste-deploy #dist:f18,f19,f20
+python-lxml         #dist:f18,f19,f20,rhel7
+python-paste-deploy #dist:f18,f19,f20,rhel7
 python-routes
 python-sqlalchemy
 python-wsgiref
diff --git a/files/rpms/neutron b/files/rpms/neutron
index 67bf523..42d7f68 100644
--- a/files/rpms/neutron
+++ b/files/rpms/neutron
@@ -11,8 +11,8 @@
 python-iso8601
 python-kombu
 #rhel6 gets via pip
-python-paste        # dist:f18,f19,f20
-python-paste-deploy # dist:f18,f19,f20
+python-paste        # dist:f18,f19,f20,rhel7
+python-paste-deploy # dist:f18,f19,f20,rhel7
 python-qpid
 python-routes
 python-sqlalchemy
diff --git a/files/rpms/nova b/files/rpms/nova
index ac70ac5..a607d92 100644
--- a/files/rpms/nova
+++ b/files/rpms/nova
@@ -28,11 +28,11 @@
 python-lockfile
 python-migrate
 python-mox
-python-paramiko # dist:f18,f19,f20
-# ^ on RHEL, brings in python-crypto which conflicts with version from
+python-paramiko # dist:f18,f19,f20,rhel7
+# ^ on RHEL6, brings in python-crypto which conflicts with version from
 # pip we need
-python-paste        # dist:f18,f19,f20
-python-paste-deploy # dist:f18,f19,f20
+python-paste        # dist:f18,f19,f20,rhel7
+python-paste-deploy # dist:f18,f19,f20,rhel7
 python-qpid
 python-routes
 python-sqlalchemy
diff --git a/files/rpms/swift b/files/rpms/swift
index 32432bc..72253f7 100644
--- a/files/rpms/swift
+++ b/files/rpms/swift
@@ -9,7 +9,7 @@
 python-greenlet
 python-netifaces
 python-nose
-python-paste-deploy # dist:f18,f19,f20
+python-paste-deploy # dist:f18,f19,f20,rhel7
 python-simplejson
 python-webob
 pyxattr
diff --git a/lib/databases/mysql b/lib/databases/mysql
index 476b4b9..31e7163 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -25,7 +25,11 @@
         sudo rm -rf /var/lib/mysql
         return
     elif is_fedora; then
-        MYSQL=mysqld
+        if [[ $DISTRO =~ (rhel7) ]]; then
+            MYSQL=mariadb
+        else
+            MYSQL=mysqld
+        fi
     elif is_suse; then
         MYSQL=mysql
     else
@@ -48,8 +52,12 @@
         MY_CONF=/etc/mysql/my.cnf
         MYSQL=mysql
     elif is_fedora; then
+        if [[ $DISTRO =~ (rhel7) ]]; then
+            MYSQL=mariadb
+        else
+            MYSQL=mysqld
+        fi
         MY_CONF=/etc/my.cnf
-        MYSQL=mysqld
     elif is_suse; then
         MY_CONF=/etc/my.cnf
         MYSQL=mysql
@@ -135,7 +143,11 @@
     fi
     # Install mysql-server
     if is_ubuntu || is_fedora; then
-        install_package mysql-server
+        if [[ $DISTRO =~ (rhel7) ]]; then
+            install_package mariadb-server
+        else
+            install_package mysql-server
+        fi
     elif is_suse; then
         if ! is_package_installed mariadb; then
             install_package mysql-community-server
diff --git a/lib/swift b/lib/swift
index df586ab..6c33af5 100644
--- a/lib/swift
+++ b/lib/swift
@@ -231,6 +231,46 @@
     done
 }
 
+# This function generates an object/container/account configuration
+# emulating 4 nodes on different ports
+function generate_swift_config() {
+    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}
+
+    iniuncomment ${swift_node_config} DEFAULT user
+    iniset ${swift_node_config} DEFAULT user ${STACK_USER}
+
+    iniuncomment ${swift_node_config} DEFAULT bind_port
+    iniset ${swift_node_config} DEFAULT bind_port ${bind_port}
+
+    iniuncomment ${swift_node_config} DEFAULT swift_dir
+    iniset ${swift_node_config} DEFAULT swift_dir ${SWIFT_CONF_DIR}
+
+    iniuncomment ${swift_node_config} DEFAULT devices
+    iniset ${swift_node_config} DEFAULT devices ${node_path}
+
+    iniuncomment ${swift_node_config} DEFAULT log_facility
+    iniset ${swift_node_config} DEFAULT log_facility LOG_LOCAL${log_facility}
+
+    iniuncomment ${swift_node_config} DEFAULT workers
+    iniset ${swift_node_config} DEFAULT workers 1
+
+    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
+
+    iniuncomment ${swift_node_config} ${server_type}-replicator vm_test_mode
+    iniset ${swift_node_config} ${server_type}-replicator vm_test_mode yes
+}
+
+
 # configure_swift() - Set config files, create data dirs and loop image
 function configure_swift() {
     local swift_pipeline="${SWIFT_EXTRAS_MIDDLEWARE_NO_AUTH}"
@@ -364,45 +404,6 @@
     cp ${SWIFT_DIR}/etc/swift.conf-sample ${SWIFT_CONF_DIR}/swift.conf
     iniset ${SWIFT_CONF_DIR}/swift.conf swift-hash swift_hash_path_suffix ${SWIFT_HASH}
 
-    # This function generates an object/container/account configuration
-    # emulating 4 nodes on different ports
-    function generate_swift_config() {
-        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}
-
-        iniuncomment ${swift_node_config} DEFAULT user
-        iniset ${swift_node_config} DEFAULT user ${STACK_USER}
-
-        iniuncomment ${swift_node_config} DEFAULT bind_port
-        iniset ${swift_node_config} DEFAULT bind_port ${bind_port}
-
-        iniuncomment ${swift_node_config} DEFAULT swift_dir
-        iniset ${swift_node_config} DEFAULT swift_dir ${SWIFT_CONF_DIR}
-
-        iniuncomment ${swift_node_config} DEFAULT devices
-        iniset ${swift_node_config} DEFAULT devices ${node_path}
-
-        iniuncomment ${swift_node_config} DEFAULT log_facility
-        iniset ${swift_node_config} DEFAULT log_facility LOG_LOCAL${log_facility}
-
-        iniuncomment ${swift_node_config} DEFAULT workers
-        iniset ${swift_node_config} DEFAULT workers 1
-
-        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
-
-        iniuncomment ${swift_node_config} ${server_type}-replicator vm_test_mode
-        iniset ${swift_node_config} ${server_type}-replicator vm_test_mode yes
-    }
-
     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}
diff --git a/stack.sh b/stack.sh
index 4a55225..9f08e0f 100755
--- a/stack.sh
+++ b/stack.sh
@@ -530,9 +530,9 @@
         # Redirect stdout/stderr to tee to write the log file
         exec 1> >( awk '
                 {
-                    cmd ="date +\"%Y-%m-%d %H:%M:%S \""
+                    cmd ="date +\"%Y-%m-%d %H:%M:%S.%3N | \""
                     cmd | getline now
-                    close("date +\"%Y-%m-%d %H:%M:%S \"")
+                    close("date +\"%Y-%m-%d %H:%M:%S.%3N | \"")
                     sub(/^/, now)
                     print
                     fflush()
@@ -863,42 +863,36 @@
 init_service_check
 
 
-# Sysstat
+# Sysstat and friends
 # -------
 
 # If enabled, systat has to start early to track OpenStack service startup.
-if is_service_enabled sysstat; then
-    # what we want to measure
-    # -u : cpu statitics
-    # -q : load
-    # -b : io load rates
-    # -w : process creation and context switch rates
-    SYSSTAT_OPTS="-u -q -b -w"
-    if [[ -n ${SCREEN_LOGDIR} ]]; then
-        screen_it sysstat "cd $TOP_DIR; ./tools/sar_filter.py $SYSSTAT_OPTS -o $SCREEN_LOGDIR/$SYSSTAT_FILE $SYSSTAT_INTERVAL"
-    else
-        screen_it sysstat "./tools/sar_filter.py $SYSSTAT_OPTS $SYSSTAT_INTERVAL"
-    fi
+# what we want to measure
+# -u : cpu statitics
+# -q : load
+# -b : io load rates
+# -w : process creation and context switch rates
+SYSSTAT_OPTS="-u -q -b -w"
+if [[ -n ${SCREEN_LOGDIR} ]]; then
+    screen_it sysstat "cd $TOP_DIR; ./tools/sar_filter.py $SYSSTAT_OPTS -o $SCREEN_LOGDIR/$SYSSTAT_FILE $SYSSTAT_INTERVAL"
+else
+    screen_it sysstat "./tools/sar_filter.py $SYSSTAT_OPTS $SYSSTAT_INTERVAL"
 fi
 
-if is_service_enabled dstat; then
-    # Per-process stats
-    DSTAT_OPTS="-tcndylp --top-cpu-adv"
-    if [[ -n ${SCREEN_LOGDIR} ]]; then
-        screen_it dstat "cd $TOP_DIR; dstat $DSTAT_OPTS | tee $SCREEN_LOGDIR/$DSTAT_FILE"
-    else
-        screen_it dstat "dstat $DSTAT_OPTS"
-    fi
+# A better kind of sysstat, with the top process per time slice
+DSTAT_OPTS="-tcndylp --top-cpu-adv"
+if [[ -n ${SCREEN_LOGDIR} ]]; then
+    screen_it dstat "cd $TOP_DIR; dstat $DSTAT_OPTS | tee $SCREEN_LOGDIR/$DSTAT_FILE"
+else
+    screen_it dstat "dstat $DSTAT_OPTS"
 fi
 
-if is_service_enabled pidstat; then
-    # Per-process stats
-    PIDSTAT_OPTS="-l -p ALL -T ALL"
-    if [[ -n ${SCREEN_LOGDIR} ]]; then
-        screen_it pidstat "cd $TOP_DIR; pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL > $SCREEN_LOGDIR/$PIDSTAT_FILE"
-    else
-        screen_it pidstat "pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL"
-    fi
+# Per-process stats
+PIDSTAT_OPTS="-l -p ALL -T ALL"
+if [[ -n ${SCREEN_LOGDIR} ]]; then
+    screen_it pidstat "cd $TOP_DIR; pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL > $SCREEN_LOGDIR/$PIDSTAT_FILE"
+else
+    screen_it pidstat "pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL"
 fi
 
 
diff --git a/tools/info.sh b/tools/info.sh
index 3ab7966..1e521b9 100755
--- a/tools/info.sh
+++ b/tools/info.sh
@@ -122,13 +122,11 @@
             ver=${BASH_REMATCH[2]}
         else
             # Unhandled format in freeze file
-            #echo "unknown: $p"
             continue
         fi
         echo "pip|${p}|${ver}"
     else
         # No match in freeze file
-        #echo "unknown: $p"
         continue
     fi
 done <$FREEZE_FILE
diff --git a/tools/xen/build_domU_multi.sh b/tools/xen/build_domU_multi.sh
index 0285f42..0eb2077 100755
--- a/tools/xen/build_domU_multi.sh
+++ b/tools/xen/build_domU_multi.sh
@@ -25,11 +25,5 @@
 # because rabbit won't launch with an ip addr hostname :(
 build_xva HEADNODE $HEAD_PUB_IP $HEAD_MGT_IP 1 "ENABLED_SERVICES=g-api,g-reg,key,n-api,n-sch,n-vnc,horizon,mysql,rabbit"
 
-# Wait till the head node is up
-#while ! curl -L http://$HEAD_PUB_IP | grep -q username; do
-#    echo "Waiting for head node ($HEAD_PUB_IP) to start..."
-#    sleep 5
-#done
-
 # Build the HA compute host
 build_xva COMPUTENODE $COMPUTE_PUB_IP $COMPUTE_MGT_IP 0 "ENABLED_SERVICES=n-cpu,n-net,n-api"