Merge "Use keystone[ldap] for ldap packages"
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 2622436..4a1d93d 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -20,7 +20,7 @@
#. Select a Linux Distribution
- Only Ubuntu 14.04 (Trusty), Fedora 21 (or Fedora 22) and CentOS/RHEL
+ Only Ubuntu 14.04 (Trusty), Fedora 22 (or Fedora 23) and CentOS/RHEL
7 are documented here. OpenStack also runs and is packaged on other
flavors of Linux such as OpenSUSE and Debian.
diff --git a/doc/source/plugin-registry.rst b/doc/source/plugin-registry.rst
index 8396d2f..b96883a 100644
--- a/doc/source/plugin-registry.rst
+++ b/doc/source/plugin-registry.rst
@@ -82,16 +82,30 @@
Additional Services
===================
-+----------------+--------------------------------------------------+------------+
-| Plugin Name | URL | Comments |
-| | | |
-+----------------+--------------------------------------------------+------------+
-|ec2-api |git://git.openstack.org/openstack/ec2-api |[as1]_ |
-+----------------+--------------------------------------------------+------------+
-|ironic-inspector|git://git.openstack.org/openstack/ironic-inspector| |
-+----------------+--------------------------------------------------+------------+
-| | | |
-+----------------+--------------------------------------------------+------------+
++-----------------+------------------------------------------------------------+------------+
+| Plugin Name | URL | Comments |
+| | | |
++-----------------+------------------------------------------------------------+------------+
+|amqp1 |git://git.openstack.org/openstack/devstack-plugin-amqp1 | |
++-----------------+------------------------------------------------------------+------------+
+|bdd |git://git.openstack.org/openstack/devstack-plugin-bdd | |
++-----------------+------------------------------------------------------------+------------+
+|ec2-api |git://git.openstack.org/openstack/ec2-api |[as1]_ |
++-----------------+------------------------------------------------------------+------------+
+|glusterfs |git://git.openstack.org/openstack/devstack-plugin-glusterfs | |
++-----------------+------------------------------------------------------------+------------+
+|hdfs |git://git.openstack.org/openstack/devstack-plugin-hdfs | |
++-----------------+------------------------------------------------------------+------------+
+|ironic-inspector |git://git.openstack.org/openstack/ironic-inspector | |
++-----------------+------------------------------------------------------------+------------+
+|pika |git://git.openstack.org/openstack/devstack-plugin-pika | |
++-----------------+------------------------------------------------------------+------------+
+|sheepdog |git://git.openstack.org/openstack/devstack-plugin-sheepdog | |
++-----------------+------------------------------------------------------------+------------+
+|zmq |git://git.openstack.org/openstack/devstack-plugin-zmq | |
++-----------------+------------------------------------------------------------+------------+
+| | | |
++-----------------+------------------------------------------------------------+------------+
.. [as1] first functional devstack plugin, hence why used in most of
the examples.
diff --git a/extras.d/60-ceph.sh b/extras.d/60-ceph.sh
index 38b901b..cc90128 100644
--- a/extras.d/60-ceph.sh
+++ b/extras.d/60-ceph.sh
@@ -32,7 +32,7 @@
echo_summary "Configuring Cinder for Ceph"
configure_ceph_cinder
fi
- if is_service_enabled cinder || is_service_enabled nova; then
+ if is_service_enabled n-cpu; then
# NOTE (leseb): the part below is a requirement to attach Ceph block devices
echo_summary "Configuring libvirt secret"
import_libvirt_secret_ceph
diff --git a/extras.d/80-tempest.sh b/extras.d/80-tempest.sh
index 74f4c60..5e8da99 100644
--- a/extras.d/80-tempest.sh
+++ b/extras.d/80-tempest.sh
@@ -13,7 +13,6 @@
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Initializing Tempest"
configure_tempest
- init_tempest
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
# local.conf Tempest option overrides
:
diff --git a/files/rpms/general b/files/rpms/general
index 2804682..5bc87b6 100644
--- a/files/rpms/general
+++ b/files/rpms/general
@@ -8,9 +8,9 @@
gettext # used for compiling message catalogs
git-core
graphviz # needed only for docs
-iptables-services # NOPRIME f21,f22,f23
+iptables-services # NOPRIME f22,f23
java-1.7.0-openjdk-headless # NOPRIME rhel7
-java-1.8.0-openjdk-headless # NOPRIME f21,f22,f23
+java-1.8.0-openjdk-headless # NOPRIME f22,f23
libffi-devel
libjpeg-turbo-devel # Pillow 3.0.0
libxml2-devel # lxml
@@ -26,7 +26,7 @@
psmisc
pyOpenSSL # version in pip uses too much memory
python-devel
-redhat-rpm-config # MySQL-python rhbz-1195207 f21
+redhat-rpm-config # MySQL-python rhbz-1195207
screen
tar
tcpdump
diff --git a/files/rpms/nova b/files/rpms/nova
index 4db9a06..0312e85 100644
--- a/files/rpms/nova
+++ b/files/rpms/nova
@@ -7,7 +7,7 @@
genisoimage # required for config_drive
iptables
iputils
-kernel-modules # dist:f21,f22,f23
+kernel-modules # dist:f22,f23
kpartx
kvm # NOPRIME
libvirt-bin # NOPRIME
diff --git a/functions b/functions
index 762fc47..9495710 100644
--- a/functions
+++ b/functions
@@ -357,7 +357,9 @@
function wait_for_service {
local timeout=$1
local url=$2
+ time_start "wait_for_service"
timeout $timeout sh -c "while ! $CURL_GET -k --noproxy '*' -s $url >/dev/null; do sleep 1; done"
+ time_stop "wait_for_service"
}
diff --git a/functions-common b/functions-common
index 4a9db34..cb2998b 100644
--- a/functions-common
+++ b/functions-common
@@ -410,6 +410,8 @@
DISTRO="rhel${os_RELEASE::1}"
elif [[ "$os_VENDOR" =~ (XenServer) ]]; then
DISTRO="xs$os_RELEASE"
+ elif [[ "$os_VENDOR" =~ (kvmibm) ]]; then
+ DISTRO="${os_VENDOR}${os_RELEASE::1}"
else
# Catch-all for now is Vendor + Release + Update
DISTRO="$os_VENDOR-$os_RELEASE.$os_UPDATE"
@@ -444,7 +446,7 @@
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \
[ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "OracleLinux" ] || \
- [ "$os_VENDOR" = "CloudLinux" ]
+ [ "$os_VENDOR" = "CloudLinux" ] || [ "$os_VENDOR" = "kvmibm" ]
}
@@ -597,6 +599,7 @@
timeout=${GIT_TIMEOUT}
fi
+ time_start "git_timed"
until timeout -s SIGINT ${timeout} git "$@"; do
# 124 is timeout(1)'s special return code when it reached the
# timeout; otherwise assume fatal failure
@@ -611,6 +614,7 @@
fi
sleep 5
done
+ time_stop "git_timed"
}
# git update using reference as a branch.
@@ -975,8 +979,6 @@
function get_endpoint_url {
echo $(openstack endpoint list \
--service $1 --interface $2 \
- --os-url $KEYSTONE_SERVICE_URI_V3 \
- --os-identity-api-version=3 \
-c URL -f value)
}
@@ -1045,7 +1047,7 @@
# Uses globals ``OFFLINE``, ``*_proxy``
# apt_get operation package [package ...]
function apt_get {
- local xtrace
+ local xtrace result
xtrace=$(set +o | grep xtrace)
set +o xtrace
@@ -1062,9 +1064,11 @@
http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} \
no_proxy=${no_proxy:-} \
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@"
+ result=$?
# stop the clock
time_stop "apt-get"
+ return $result
}
function _parse_package_files {
@@ -1344,10 +1348,11 @@
exec 3>&-
exec 6>&-
- local real_logfile="${LOGDIR}/${service}.log.${CURRENT_LOG_TIME}"
+ local logfile="${service}.log.${CURRENT_LOG_TIME}"
+ local real_logfile="${LOGDIR}/${logfile}"
if [[ -n ${LOGDIR} ]]; then
exec 1>&"$real_logfile" 2>&1
- ln -sf "$real_logfile" ${LOGDIR}/${service}.log
+ bash -c "cd '$LOGDIR' && ln -sf '$logfile' ${service}.log"
if [[ -n ${SCREEN_LOGDIR} ]]; then
# Drop the backward-compat symlink
ln -sf "$real_logfile" ${SCREEN_LOGDIR}/screen-${service}.log
@@ -1408,6 +1413,7 @@
local command="$2"
local group=$3
+ time_start "run_process"
if is_service_enabled $service; then
if [[ "$USE_SCREEN" = "True" ]]; then
screen_process "$service" "$command" "$group"
@@ -1416,6 +1422,7 @@
_run_process "$service" "$command" "$group" &
fi
fi
+ time_stop "run_process"
}
# Helper to launch a process in a named screen
@@ -1434,7 +1441,8 @@
screen -S $SCREEN_NAME -X screen -t $name
- local real_logfile="${LOGDIR}/${name}.log.${CURRENT_LOG_TIME}"
+ local logfile="${name}.log.${CURRENT_LOG_TIME}"
+ local real_logfile="${LOGDIR}/${logfile}"
echo "LOGDIR: $LOGDIR"
echo "SCREEN_LOGDIR: $SCREEN_LOGDIR"
echo "log: $real_logfile"
@@ -1445,7 +1453,7 @@
fi
# If logging isn't active then avoid a broken symlink
touch "$real_logfile"
- ln -sf "$real_logfile" ${LOGDIR}/${name}.log
+ bash -c "cd '$LOGDIR' && ln -sf '$logfile' ${name}.log"
if [[ -n ${SCREEN_LOGDIR} ]]; then
# Drop the backward-compat symlink
ln -sf "$real_logfile" ${SCREEN_LOGDIR}/screen-${1}.log
@@ -2230,9 +2238,11 @@
local until=${3:-10}
local sleep=${4:-0.5}
+ time_start "test_with_retry"
if ! timeout $until sh -c "while ! $testcmd; do sleep $sleep; done"; then
die $LINENO "$failmsg"
fi
+ time_stop "test_with_retry"
}
# Timing infrastructure - figure out where large blocks of time are
diff --git a/inc/ini-config b/inc/ini-config
index d2830d7..e99b088 100644
--- a/inc/ini-config
+++ b/inc/ini-config
@@ -261,6 +261,18 @@
$xtrace
}
+# Get list of sections from an INI file
+# iniget_sections config-file
+function iniget_sections {
+ local xtrace
+ xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+
+ echo $(sed -ne "s/^\[\(.*\)\]/\1/p" "$file")
+ $xtrace
+}
+
# Restore xtrace
$INC_CONF_TRACE
diff --git a/inc/meta-config b/inc/meta-config
index b6fe437..6eb7a00 100644
--- a/inc/meta-config
+++ b/inc/meta-config
@@ -195,6 +195,25 @@
done
}
+function extract_localrc_section {
+ local configfile=$1 # top_dir/local.conf
+ local localrcfile=$2 # top_dir/localrc
+ local localautofile=$3 # top_dir/.localrc.auto
+
+ if [[ -r $configfile ]]; then
+ LRC=$(get_meta_section_files $configfile local)
+ for lfile in $LRC; do
+ if [[ "$lfile" == "localrc" ]]; then
+ if [[ -r $localrcfile ]]; then
+ echo "localrc and local.conf:[[local]] both exist, using localrc"
+ else
+ echo "# Generated file, do not edit" >$localautofile
+ get_meta_section $configfile local $lfile >>$localautofile
+ fi
+ fi
+ done
+ fi
+}
# Restore xtrace
$_XTRACE_INC_META
diff --git a/inc/python b/inc/python
index 2bf4264..35bab6f 100644
--- a/inc/python
+++ b/inc/python
@@ -81,7 +81,7 @@
# ``PIP_UPGRADE``, ``TRACK_DEPENDS``, ``*_proxy``,
# pip_install package [package ...]
function pip_install {
- local xtrace
+ local xtrace result
xtrace=$(set +o | grep xtrace)
set +o xtrace
local upgrade=""
@@ -155,10 +155,11 @@
PIP_FIND_LINKS=$PIP_FIND_LINKS \
$cmd_pip $upgrade \
$@
+ result=$?
# Also install test requirements
local test_req="${!#}/test-requirements.txt"
- if [[ -e "$test_req" ]]; then
+ if [[ $result == 0 ]] && [[ -e "$test_req" ]]; then
echo "Installing test-requirements for $test_req"
$sudo_pip \
http_proxy=${http_proxy:-} \
@@ -167,9 +168,11 @@
PIP_FIND_LINKS=$PIP_FIND_LINKS \
$cmd_pip $upgrade \
-r $test_req
+ result=$?
fi
time_stop "pip_install"
+ return $result
}
# get version of a package from global requirements file
diff --git a/lib/apache b/lib/apache
index c9e02a2..2c84c7a 100644
--- a/lib/apache
+++ b/lib/apache
@@ -185,9 +185,11 @@
# Apache can be slow to stop, doing an explicit stop, sleep, start helps
# to mitigate issues where apache will claim a port it's listening on is
# still in use and fail to start.
+ time_start "restart_apache_server"
stop_service $APACHE_NAME
sleep 3
start_service $APACHE_NAME
+ time_stop "restart_apache_server"
}
# Restore xtrace
diff --git a/lib/ceph b/lib/ceph
index 4ac498a..3e0839a 100644
--- a/lib/ceph
+++ b/lib/ceph
@@ -116,7 +116,7 @@
# check_os_support_ceph() - Check if the operating system provides a decent version of Ceph
function check_os_support_ceph {
- if [[ ! ${DISTRO} =~ (trusty|f21|f22|f23) ]]; then
+ if [[ ! ${DISTRO} =~ (trusty|f22|f23) ]]; then
echo "WARNING: your distro $DISTRO does not provide (at least) the Firefly release. Please use Ubuntu Trusty or Fedora 20 (and higher)"
if [[ "$FORCE_CEPH_INSTALL" != "yes" ]]; then
die $LINENO "If you wish to install Ceph on this distribution anyway run with FORCE_CEPH_INSTALL=yes"
diff --git a/lib/cinder_backends/ceph b/lib/cinder_backends/ceph
index c21350b..9bff5be 100644
--- a/lib/cinder_backends/ceph
+++ b/lib/cinder_backends/ceph
@@ -62,7 +62,7 @@
sudo ceph -c ${CEPH_CONF_FILE} osd pool set ${CINDER_BAK_CEPH_POOL} crush_ruleset ${RULE_ID}
fi
fi
- sudo ceph -c ${CEPH_CONF_FILE} auth get-or-create client.${CINDER_BAK_CEPH_USER} mon "allow r" osd "allow class-read object_prefix rbd_children, allow rwx pool=${CINDER_BAK_CEPH_POOL}" | sudo tee ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring
+ sudo ceph -c ${CEPH_CONF_FILE} auth get-or-create client.${CINDER_BAK_CEPH_USER} mon "allow r" osd "allow class-read object_prefix rbd_children, allow rwx pool=${CINDER_BAK_CEPH_POOL}, allow rwx pool=${CINDER_CEPH_POOL}" | sudo tee ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring
sudo chown $(whoami):$(whoami) ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring
iniset $CINDER_CONF DEFAULT backup_driver "cinder.backup.drivers.ceph"
diff --git a/lib/databases/mysql b/lib/databases/mysql
index 1bbbd62..f6cc922 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -154,6 +154,7 @@
fi
elif is_fedora; then
install_package mariadb-server
+ sudo systemctl enable mariadb
elif is_ubuntu; then
install_package mysql-server
else
diff --git a/lib/databases/postgresql b/lib/databases/postgresql
index 913e8ff..204c257 100644
--- a/lib/databases/postgresql
+++ b/lib/databases/postgresql
@@ -101,6 +101,9 @@
install_package postgresql
elif is_fedora || is_suse; then
install_package postgresql-server
+ if is_fedora; then
+ sudo systemctl enable postgresql-server
+ fi
else
exit_distro_not_supported "postgresql installation"
fi
diff --git a/lib/keystone b/lib/keystone
index f773614..733f1bb 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -421,7 +421,7 @@
local signing_dir=$3
local section=${4:-keystone_authtoken}
- iniset $conf_file $section auth_plugin password
+ iniset $conf_file $section auth_type password
iniset $conf_file $section auth_url $KEYSTONE_AUTH_URI
iniset $conf_file $section username $admin_user
iniset $conf_file $section password $SERVICE_PASSWORD
diff --git a/lib/neutron-legacy b/lib/neutron-legacy
index cc5b75e..692d5ea 100644
--- a/lib/neutron-legacy
+++ b/lib/neutron-legacy
@@ -802,7 +802,8 @@
local from_intf=$1
local to_intf=$2
local add_ovs_port=$3
- local af=$4
+ local del_ovs_port=$4
+ local af=$5
if [[ -n "$from_intf" && -n "$to_intf" ]]; then
# Remove the primary IP address from $from_intf and add it to $to_intf,
@@ -816,6 +817,7 @@
local DEFAULT_ROUTE_GW
DEFAULT_ROUTE_GW=$(ip -f $af r | awk "/default.+$from_intf/ { print \$3; exit }")
local ADD_OVS_PORT=""
+ local DEL_OVS_PORT=""
IP_BRD=$(ip -f $af a s dev $from_intf scope global primary | grep inet | awk '{ print $2, $3, $4; exit }')
@@ -827,13 +829,19 @@
ADD_OVS_PORT="sudo ovs-vsctl --may-exist add-port $to_intf $from_intf"
fi
+ if [[ "$del_ovs_port" == "True" ]]; then
+ DEL_OVS_PORT="sudo ovs-vsctl --if-exists del-port $from_intf $to_intf"
+ fi
+
if [[ "$IP_BRD" != "" ]]; then
IP_DEL="sudo ip addr del $IP_BRD dev $from_intf"
IP_ADD="sudo ip addr add $IP_BRD dev $to_intf"
IP_UP="sudo ip link set $to_intf up"
fi
- $IP_DEL; $IP_ADD; $IP_UP; $ADD_OVS_PORT; $ADD_DEFAULT_ROUTE
+ # The add/del OVS port calls have to happen either before or
+ # after the address is moved in order to not leave it orphaned.
+ $DEL_OVS_PORT; $IP_DEL; $IP_ADD; $IP_UP; $ADD_OVS_PORT; $ADD_DEFAULT_ROUTE
fi
}
@@ -842,14 +850,14 @@
function cleanup_neutron {
if [[ -n "$OVS_PHYSICAL_BRIDGE" ]]; then
- _move_neutron_addresses_route "$OVS_PHYSICAL_BRIDGE" "$PUBLIC_INTERFACE" False "inet"
+ _move_neutron_addresses_route "$OVS_PHYSICAL_BRIDGE" "$PUBLIC_INTERFACE" False True "inet"
if [[ $(ip -f inet6 a s dev "$OVS_PHYSICAL_BRIDGE" | grep -c 'global') != 0 ]]; then
# ip(8) wants the prefix length when deleting
local v6_gateway
v6_gateway=$(ip -6 a s dev $OVS_PHYSICAL_BRIDGE | grep $IPV6_PUBLIC_NETWORK_GATEWAY | awk '{ print $2 }')
sudo ip -6 addr del $v6_gateway dev $OVS_PHYSICAL_BRIDGE
- _move_neutron_addresses_route "$OVS_PHYSICAL_BRIDGE" "$PUBLIC_INTERFACE" False "inet6"
+ _move_neutron_addresses_route "$OVS_PHYSICAL_BRIDGE" "$PUBLIC_INTERFACE" False False "inet6"
fi
if is_provider_network && is_ironic_hardware; then
@@ -1044,10 +1052,10 @@
neutron_plugin_configure_l3_agent
- _move_neutron_addresses_route "$PUBLIC_INTERFACE" "$OVS_PHYSICAL_BRIDGE" True "inet"
+ _move_neutron_addresses_route "$PUBLIC_INTERFACE" "$OVS_PHYSICAL_BRIDGE" True False "inet"
if [[ $(ip -f inet6 a s dev "$PUBLIC_INTERFACE" | grep -c 'global') != 0 ]]; then
- _move_neutron_addresses_route "$PUBLIC_INTERFACE" "$OVS_PHYSICAL_BRIDGE" False "inet6"
+ _move_neutron_addresses_route "$PUBLIC_INTERFACE" "$OVS_PHYSICAL_BRIDGE" False False "inet6"
fi
}
@@ -1061,11 +1069,6 @@
if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then
iniset $Q_META_CONF_FILE AGENT root_helper_daemon "$Q_RR_DAEMON_COMMAND"
fi
-
- # Configures keystone for metadata_agent
- # The third argument "True" sets auth_url needed to communicate with keystone
- _neutron_setup_keystone $Q_META_CONF_FILE DEFAULT True
-
}
function _configure_neutron_ceilometer_notifications {
@@ -1233,17 +1236,10 @@
fi
}
-# Configures keystone integration for neutron service and agents
+# Configures keystone integration for neutron service
function _neutron_setup_keystone {
local conf_file=$1
local section=$2
- local use_auth_url=$3
-
- # Configures keystone for metadata_agent
- # metadata_agent needs auth_url to communicate with keystone
- if [[ "$use_auth_url" == "True" ]]; then
- iniset $conf_file $section auth_url $KEYSTONE_SERVICE_URI/v2.0
- fi
create_neutron_cache_dir
configure_auth_token_middleware $conf_file $Q_ADMIN_USERNAME $NEUTRON_AUTH_CACHE_DIR $section
diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base
index 91aff33..59c7737 100644
--- a/lib/neutron_plugins/ovs_base
+++ b/lib/neutron_plugins/ovs_base
@@ -67,6 +67,7 @@
restart_service openvswitch-switch
elif is_fedora; then
restart_service openvswitch
+ sudo systemctl enable openvswitch
elif is_suse; then
restart_service openvswitch-switch
fi
diff --git a/lib/nova b/lib/nova
index c75623f..c97f517 100644
--- a/lib/nova
+++ b/lib/nova
@@ -98,6 +98,10 @@
# should work in most cases.
SCHEDULER=${SCHEDULER:-nova.scheduler.filter_scheduler.FilterScheduler}
+# The following FILTERS contains SameHostFilter and DifferentHostFilter with
+# the default filters.
+FILTERS="RetryFilter,AvailabilityZoneFilter,RamFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter,DifferentHostFilter"
+
QEMU_CONF=/etc/libvirt/qemu.conf
# Set default defaults here as some hypervisor drivers override these
@@ -473,6 +477,7 @@
iniset $NOVA_CONF DEFAULT api_paste_config "$NOVA_API_PASTE_INI"
iniset $NOVA_CONF DEFAULT rootwrap_config "$NOVA_CONF_DIR/rootwrap.conf"
iniset $NOVA_CONF DEFAULT scheduler_driver "$SCHEDULER"
+ iniset $NOVA_CONF DEFAULT scheduler_default_filters "$FILTERS"
iniset $NOVA_CONF DEFAULT dhcpbridge_flagfile "$NOVA_CONF"
iniset $NOVA_CONF DEFAULT force_dhcp_release "True"
iniset $NOVA_CONF DEFAULT default_floating_pool "$PUBLIC_NETWORK_NAME"
diff --git a/lib/nova_plugins/functions-libvirt b/lib/nova_plugins/functions-libvirt
index dae55c6..0afdad8 100644
--- a/lib/nova_plugins/functions-libvirt
+++ b/lib/nova_plugins/functions-libvirt
@@ -38,7 +38,10 @@
fi
#pip_install_gr <there-si-no-guestfs-in-pypi>
elif is_fedora || is_suse; then
- install_package kvm
+ # On "KVM for IBM z Systems", kvm does not have its own package
+ if [[ ! ${DISTRO} =~ "kvmibm1" ]]; then
+ install_package kvm
+ fi
# there is a dependency issue with kvm (which is really just a
# wrapper to qemu-system-x86) that leaves some bios files out,
# so install qemu-kvm (which shouldn't strictly be needed, as
diff --git a/lib/rpc_backend b/lib/rpc_backend
index 3864ade..a44287c 100644
--- a/lib/rpc_backend
+++ b/lib/rpc_backend
@@ -48,6 +48,9 @@
# Install rabbitmq-server
install_package rabbitmq-server
fi
+ if is_fedora; then
+ sudo systemctl enable rabbitmq-server
+ fi
}
# restart the rpc backend
diff --git a/lib/tempest b/lib/tempest
index c510984..8431229 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -35,7 +35,6 @@
#
# - install_tempest
# - configure_tempest
-# - init_tempest
# Save trace setting
_XTRACE_TEMPEST=$(set +o | grep xtrace)
@@ -67,9 +66,6 @@
# have tempest installed in DevStack by default.
INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"}
-BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-${CIRROS_VERSION}"
-BOTO_CONF=/etc/boto.cfg
-
# Cinder/Volume variables
TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
TEMPEST_DEFAULT_VOLUME_VENDOR="Open Source"
@@ -131,7 +127,6 @@
local flavor_lines
local public_network_id
local public_router_id
- local boto_instance_type="m1.tiny"
local ssh_connect_method="fixed"
# Save IFS
@@ -202,14 +197,12 @@
nova flavor-create m1.nano 42 64 0 1
fi
flavor_ref=42
- boto_instance_type=m1.nano
if [[ ! ( $available_flavors =~ 'm1.micro' ) ]]; then
nova flavor-create m1.micro 84 128 0 1
fi
flavor_ref_alt=84
else
# Check Nova for existing flavors, if ``DEFAULT_INSTANCE_TYPE`` is set use it.
- boto_instance_type=$DEFAULT_INSTANCE_TYPE
IFS=$'\r\n'
flavors=""
for line in $available_flavors; do
@@ -254,15 +247,6 @@
awk '{print $2}')
fi
- EC2_URL=$(get_endpoint_url ec2 public || true)
- if [[ -z $EC2_URL ]]; then
- EC2_URL="$EC2_SERVICE_PROTOCOL://$SERVICE_HOST:8773/"
- fi
- S3_URL=$(get_endpoint_url s3 public || true)
- if [[ -z $S3_URL ]]; then
- S3_URL="http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
- fi
-
iniset $TEMPEST_CONFIG DEFAULT use_syslog $SYSLOG
# Oslo
@@ -275,8 +259,6 @@
# Timeouts
iniset $TEMPEST_CONFIG compute build_timeout $BUILD_TIMEOUT
iniset $TEMPEST_CONFIG volume build_timeout $BUILD_TIMEOUT
- iniset $TEMPEST_CONFIG boto build_timeout $BUILD_TIMEOUT
- iniset $TEMPEST_CONFIG boto http_socket_timeout 5
# Identity
iniset $TEMPEST_CONFIG identity uri "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/v2.0/"
@@ -422,16 +404,6 @@
fi
iniset $TEMPEST_CONFIG network-feature-enabled api_extensions $network_api_extensions
- # boto
- iniset $TEMPEST_CONFIG boto ec2_url "$EC2_URL"
- iniset $TEMPEST_CONFIG boto s3_url "$S3_URL"
- iniset $TEMPEST_CONFIG boto s3_materials_path "$BOTO_MATERIALS_PATH"
- iniset $TEMPEST_CONFIG boto ari_manifest cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initrd.manifest.xml
- iniset $TEMPEST_CONFIG boto ami_manifest cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-blank.img.manifest.xml
- iniset $TEMPEST_CONFIG boto aki_manifest cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-vmlinuz.manifest.xml
- iniset $TEMPEST_CONFIG boto instance_type "$boto_instance_type"
- iniset $TEMPEST_CONFIG boto http_socket_timeout 30
-
# Orchestration Tests
if is_service_enabled heat; then
if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then
@@ -529,8 +501,7 @@
# Baremetal
if [ "$VIRT_DRIVER" = "ironic" ] ; then
iniset $TEMPEST_CONFIG baremetal driver_enabled True
- iniset $TEMPEST_CONFIG baremetal unprovision_timeout $BUILD_TIMEOUT
- iniset $TEMPEST_CONFIG baremetal active_timeout $BUILD_TIMEOUT
+ iniset $TEMPEST_CONFIG baremetal deploy_timeout $BUILD_TIMEOUT
iniset $TEMPEST_CONFIG baremetal deploy_img_dir $FILES
iniset $TEMPEST_CONFIG baremetal node_uuid $IRONIC_NODE_UUID
iniset $TEMPEST_CONFIG compute-feature-enabled change_password False
@@ -574,12 +545,6 @@
iniset $TEMPEST_CONFIG service_available cinder "False"
fi
- if is_ssl_enabled_service "key" || is_service_enabled tls-proxy; then
- # Use the ``BOTO_CONFIG`` environment variable to point to this file
- iniset -sudo $BOTO_CONF Boto ca_certificates_file $SSL_BUNDLE_FILE
- sudo chown $STACK_USER $BOTO_CONF
- fi
-
# Auth
iniset $TEMPEST_CONFIG auth tempest_roles "Member"
if [[ $TEMPEST_USE_TEST_ACCOUNTS == "True" ]]; then
@@ -641,35 +606,6 @@
popd
}
-# init_tempest() - Initialize EC2 images
-function init_tempest {
- local base_image_name=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}
- # /opt/stack/devstack/files/images/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec
- local image_dir="$FILES/images/${base_image_name}-uec"
- local kernel="$image_dir/${base_image_name}-vmlinuz"
- local ramdisk="$image_dir/${base_image_name}-initrd"
- local disk_image="$image_dir/${base_image_name}-blank.img"
- if is_service_enabled nova; then
- # If the CirrOS uec downloaded and the system is UEC capable
- if [ -f "$kernel" -a -f "$ramdisk" -a -f "$disk_image" -a "$VIRT_DRIVER" != "openvz" \
- -a \( "$LIBVIRT_TYPE" != "lxc" -o "$VIRT_DRIVER" != "libvirt" \) ]; then
- echo "Prepare aki/ari/ami Images"
- mkdir -p $BOTO_MATERIALS_PATH
- ( #new namespace
- # euca2ools should be installed to call euca-* commands
- is_package_installed euca2ools || install_package euca2ools
- # tenant:demo ; user: demo
- source $TOP_DIR/accrc/demo/demo
- euca-bundle-image -r ${CIRROS_ARCH} -i "$kernel" --kernel true -d "$BOTO_MATERIALS_PATH"
- euca-bundle-image -r ${CIRROS_ARCH} -i "$ramdisk" --ramdisk true -d "$BOTO_MATERIALS_PATH"
- euca-bundle-image -r ${CIRROS_ARCH} -i "$disk_image" -d "$BOTO_MATERIALS_PATH"
- ) 2>&1 </dev/null | cat
- else
- echo "Boto materials are not prepared"
- fi
- fi
-}
-
# Restore xtrace
$_XTRACE_TEMPEST
diff --git a/pkg/elasticsearch.sh b/pkg/elasticsearch.sh
index 14d13cf..9c4f6f7 100755
--- a/pkg/elasticsearch.sh
+++ b/pkg/elasticsearch.sh
@@ -88,11 +88,7 @@
sudo dpkg -i ${FILES}/elasticsearch-${ELASTICSEARCH_VERSION}.deb
sudo update-rc.d elasticsearch defaults 95 10
elif is_fedora; then
- if [[ "$os_RELEASE" -ge "21" ]]; then
- is_package_installed java-1.8.0-openjdk-headless || install_package java-1.8.0-openjdk-headless
- else
- is_package_installed java-1.7.0-openjdk-headless || install_package java-1.7.0-openjdk-headless
- fi
+ is_package_installed java-1.8.0-openjdk-headless || install_package java-1.8.0-openjdk-headless
yum_install ${FILES}/elasticsearch-${ELASTICSEARCH_VERSION}.noarch.rpm
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
diff --git a/stack.sh b/stack.sh
index bc67ce0..1fa506c 100755
--- a/stack.sh
+++ b/stack.sh
@@ -149,19 +149,7 @@
# Phase: local
rm -f $TOP_DIR/.localrc.auto
-if [[ -r $TOP_DIR/local.conf ]]; then
- LRC=$(get_meta_section_files $TOP_DIR/local.conf local)
- for lfile in $LRC; do
- if [[ "$lfile" == "localrc" ]]; then
- if [[ -r $TOP_DIR/localrc ]]; then
- warn $LINENO "localrc and local.conf:[[local]] both exist, using localrc"
- else
- echo "# Generated file, do not edit" >$TOP_DIR/.localrc.auto
- get_meta_section $TOP_DIR/local.conf local $lfile >>$TOP_DIR/.localrc.auto
- fi
- fi
- done
-fi
+extract_localrc_section $TOP_DIR/local.conf $TOP_DIR/localrc $TOP_DIR/.localrc.auto
# ``stack.sh`` is customizable by setting environment variables. Override a
# default setting via export::
@@ -195,7 +183,7 @@
# Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``FORCE=yes ./stack``
-if [[ ! ${DISTRO} =~ (trusty|vivid|wily|7.0|wheezy|sid|testing|jessie|f21|f22|f23|rhel7) ]]; then
+if [[ ! ${DISTRO} =~ (trusty|vivid|wily|7.0|wheezy|sid|testing|jessie|f22|f23|rhel7|kvmibm1) ]]; then
echo "WARNING: this script has not been tested on $DISTRO"
if [[ "$FORCE" != "yes" ]]; then
die $LINENO "If you wish to run this script anyway run with FORCE=yes"
diff --git a/tests/test_ini_config.sh b/tests/test_ini_config.sh
index d9cb8d8..a5e1107 100755
--- a/tests/test_ini_config.sh
+++ b/tests/test_ini_config.sh
@@ -80,6 +80,11 @@
sudo chown -R root:root ${INI_TMP_ETC_DIR}
fi
+# test iniget_sections
+VAL=$(iniget_sections "${TEST_INI}")
+assert_equal "$VAL" "default aaa bbb ccc ddd eee del_separate_options \
+del_same_option del_missing_option del_missing_option_multi del_no_options"
+
# Test with missing arguments
BEFORE=$(cat ${TEST_INI})
diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh
index 9ae2ae7..193a1f7 100755
--- a/tools/fixup_stuff.sh
+++ b/tools/fixup_stuff.sh
@@ -135,7 +135,7 @@
fi
fi
- if [[ "$os_VENDOR" == "Fedora" ]] && [[ "$os_RELEASE" -ge "21" ]]; then
+ if [[ "$os_VENDOR" == "Fedora" ]] && [[ "$os_RELEASE" -ge "22" ]]; then
# requests ships vendored version of chardet/urllib3, but on
# fedora these are symlinked back to the primary versions to
# avoid duplication of code on disk. This is fine when
diff --git a/tools/image_list.sh b/tools/image_list.sh
index a27635e..27b3d46 100755
--- a/tools/image_list.sh
+++ b/tools/image_list.sh
@@ -3,6 +3,12 @@
# Keep track of the DevStack directory
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
+# The following "source" implicitly calls get_default_host_ip() in
+# stackrc and will die if the selected default IP happens to lie
+# in the default ranges for FIXED_RANGE or FLOATING_RANGE. Since we
+# do not really need HOST_IP to be properly set in the remainder of
+# this script, just set it to some dummy value and make stackrc happy.
+HOST_IP=SKIP
source $TOP_DIR/functions
# Possible virt drivers, if we have more, add them here. Always keep
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
index e24d9ed..46ff0b6 100755
--- a/tools/xen/install_os_domU.sh
+++ b/tools/xen/install_os_domU.sh
@@ -12,13 +12,6 @@
export LC_ALL=C
-# Abort if localrc is not set
-if [ ! -e ../../localrc ]; then
- echo "You must have a localrc with ALL necessary passwords defined before proceeding."
- echo "See the xen README for required passwords."
- exit 1
-fi
-
# This directory
THIS_DIR=$(cd $(dirname "$0") && pwd)
@@ -31,6 +24,10 @@
#
# Get Settings
#
+TOP_DIR=$(cd $THIS_DIR/../../ && pwd)
+source $TOP_DIR/inc/meta-config
+rm -f $TOP_DIR/.localrc.auto
+extract_localrc_section $TOP_DIR/local.conf $TOP_DIR/localrc $TOP_DIR/.localrc.auto
# Source params - override xenrc params in your localrc to suit your taste
source $THIS_DIR/xenrc