Merge "Fix typo in error message printed if ran under virtualenv"
diff --git a/functions b/functions
index ca5955e..34da1ba 100644
--- a/functions
+++ b/functions
@@ -410,7 +410,7 @@
ip=$(echo "$nova_result" | grep "$network_name" | get_field 2)
if [[ $ip = "" ]];then
echo "$nova_result"
- die $LINENO "[Fail] Coudn't get ipaddress of VM"
+ die $LINENO "[Fail] Couldn't get ipaddress of VM"
fi
echo $ip
}
diff --git a/functions-common b/functions-common
index 5c97aee..2fcd9f8 100644
--- a/functions-common
+++ b/functions-common
@@ -1036,7 +1036,7 @@
# We are using BASH regexp matching feature.
package=${BASH_REMATCH[1]}
distros=${BASH_REMATCH[2]}
- # In bash ${VAR,,} will lowecase VAR
+ # In bash ${VAR,,} will lowercase VAR
# Look for a match in the distro list
if [[ ! ${distros,,} =~ ${DISTRO,,} ]]; then
# If no match then skip this package
@@ -1352,6 +1352,7 @@
# If the command includes shell metachatacters (;<>*) it must be run using a shell
# If an optional group is provided sg will be used to run the
# command as that group.
+# Uses globals ``USE_SCREEN``
# run_process service "command-line" [group]
function run_process {
local service=$1
@@ -1370,7 +1371,7 @@
# Helper to launch a process in a named screen
# Uses globals ``CURRENT_LOG_TIME``, ```LOGDIR``, ``SCREEN_LOGDIR``, `SCREEN_NAME``,
-# ``SERVICE_DIR``, ``USE_SCREEN``, ``SCREEN_IS_LOGGING``
+# ``SERVICE_DIR``, ``SCREEN_IS_LOGGING``
# screen_process name "command-line" [group]
# Run a command in a shell in a screen window, if an optional group
# is provided, use sg to set the group of the command.
@@ -1381,7 +1382,6 @@
SCREEN_NAME=${SCREEN_NAME:-stack}
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
- USE_SCREEN=$(trueorfalse True USE_SCREEN)
screen -S $SCREEN_NAME -X screen -t $name
@@ -1465,14 +1465,13 @@
# If a PID is available use it, kill the whole process group via TERM
# If screen is being used kill the screen window; this will catch processes
# that did not leave a PID behind
-# Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``, ``USE_SCREEN``
+# Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``
# screen_stop_service service
function screen_stop_service {
local service=$1
SCREEN_NAME=${SCREEN_NAME:-stack}
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
- USE_SCREEN=$(trueorfalse True USE_SCREEN)
if is_service_enabled $service; then
# Clean up the screen window
@@ -1490,7 +1489,6 @@
local service=$1
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
- USE_SCREEN=$(trueorfalse True USE_SCREEN)
if is_service_enabled $service; then
# Kill via pid if we have one available
@@ -1509,7 +1507,7 @@
# this fixed in all services:
# https://bugs.launchpad.net/oslo-incubator/+bug/1446583
sleep 1
- # /bin/true becakse pkill on a non existant process returns an error
+ # /bin/true because pkill on a non existent process returns an error
pkill -g $(cat $SERVICE_DIR/$SCREEN_NAME/$service.pid) || /bin/true
fi
rm $SERVICE_DIR/$SCREEN_NAME/$service.pid
@@ -1552,11 +1550,11 @@
}
# Tail a log file in a screen if USE_SCREEN is true.
+# Uses globals ``USE_SCREEN``
function tail_log {
local name=$1
local logfile=$2
- USE_SCREEN=$(trueorfalse True USE_SCREEN)
if [[ "$USE_SCREEN" = "True" ]]; then
screen_process "$name" "sudo tail -f $logfile"
fi
@@ -1717,7 +1715,7 @@
if [[ -f $dir/devstack/override-defaults ]]; then
# be really verbose that an override is happening, as it
# may not be obvious if things fail later.
- echo "$plugin has overriden the following defaults"
+ echo "$plugin has overridden the following defaults"
cat $dir/devstack/override-defaults
source $dir/devstack/override-defaults
fi
diff --git a/lib/ironic b/lib/ironic
index d786870..016e639 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -672,6 +672,8 @@
# enable tftp natting for allowing connections to HOST_IP's tftp server
sudo modprobe nf_conntrack_tftp
sudo modprobe nf_nat_tftp
+ # explicitly allow DHCP - packets are occassionally being dropped here
+ sudo iptables -I INPUT -p udp --dport 67:68 --sport 67:68 -j ACCEPT || true
# nodes boot from TFTP and callback to the API server listening on $HOST_IP
sudo iptables -I INPUT -d $HOST_IP -p udp --dport 69 -j ACCEPT || true
sudo iptables -I INPUT -d $HOST_IP -p tcp --dport $IRONIC_SERVICE_PORT -j ACCEPT || true
diff --git a/stack.sh b/stack.sh
index 36bf2af..25c49c5 100755
--- a/stack.sh
+++ b/stack.sh
@@ -335,6 +335,10 @@
sudo sed -i "s/\(^127.0.0.1.*\)/\1 $LOCAL_HOSTNAME/" /etc/hosts
fi
+# Ensure python is installed
+# --------------------------
+is_package_installed python || install_package python
+
# Configure Logging
# -----------------
diff --git a/stackrc b/stackrc
index 76a5756..0752368 100644
--- a/stackrc
+++ b/stackrc
@@ -101,7 +101,7 @@
# ctrl-c, up-arrow, enter to restart the service. Starting services
# this way is slightly unreliable, and a bit slower, so this can
# be disabled for automated testing by setting this value to False.
-USE_SCREEN=True
+USE_SCREEN=$(trueorfalse True USE_SCREEN)
# When using screen, should we keep a log file on disk? You might
# want this False if you have a long-running setup where verbose logs
@@ -651,9 +651,6 @@
PRIVATE_NETWORK_NAME=${PRIVATE_NETWORK_NAME:-"private"}
PUBLIC_NETWORK_NAME=${PUBLIC_NETWORK_NAME:-"public"}
-# Compatibility until it's eradicated from CI
-USE_SCREEN=${SCREEN_DEV:-$USE_SCREEN}
-
# Set default screen name
SCREEN_NAME=${SCREEN_NAME:-stack}
diff --git a/tools/install_pip.sh b/tools/install_pip.sh
index 13c1786..ab5efb2 100755
--- a/tools/install_pip.sh
+++ b/tools/install_pip.sh
@@ -110,7 +110,11 @@
# Do pip
# Eradicate any and all system packages
-uninstall_package python-pip
+
+# python in f23 depends on the python-pip package
+if ! { is_fedora && [[ $DISTRO == "f23" ]]; }; then
+ uninstall_package python-pip
+fi
install_get_pip