Compare commits

...

34 Commits

Author SHA1 Message Date
Ian Wienand 3c877537cc Ensure we install setuptools from requirements
Use pip_install_gr so we get the version pinned by requirements.  The
depends-on is an example of where we're trying to pin to workaround
issues.

Depends-On: I9c57c08a150571c5bb62235d502839394d53a4c1
Change-Id: I780cca681b12a3e9d228dbf2fd9fa6e8ab1a82e1
(cherry picked from commit 1e7f738f28)
(cherry picked from commit 0d2fc817ea)
2017-03-02 19:45:28 +00:00
Jordan Pittier f77d2147e2 lib/tempest: stop using deprecated config option.
Use the new name instead.

This is needed to remove the deprecated config options from Tempest as Tempest is branch less and should be able to work with devstack mitaka.

Change-Id: I31f83ec70b8803a29a7be765661517d890ffd6f1
(cherry picked from commit f5a50a0fa6)
2017-02-14 02:28:19 +00:00
Sean Dague f48b81aea0 add install_devstack_tools
An initial install for devstack-tools, this will need to use all the
fun pip extra variables for installation, however the current
pip_install always prefers python2, and we only want to do python3
here.

Change-Id: I3dcdb35130f76fad81cb7b0d4001b7e96efbbd84
2017-01-19 13:15:53 +00:00
Monty Taylor e08f45f77f Don't clone dib-utils in install_heat
It's not used, and a recent change to trim down projects lists in
devstack-gate broke devstack in the gate that enabled heat.

(Cherry-picked from 201c01f19b)

Change-Id: I405423bdc9ba8dd9b30fce6fdceacccf662d5da3
2016-10-19 16:06:53 +11:00
Bruce Tan 7964cbd7bf Fix api extension settings in tempest for Mitaka
On stable branches, we are supposed to hard code the extension list of
what API extensions are available when we branch the project so that
test cases against new features will be skipped. However, we didn't do
this on Mitaka branch for neutron, cinder and swift. So copy from
another patch[1] and added the following API extensions (not in liberty):
  network
  - address-scope
  - allowed-address-pairs
  - auto-allocated-topology
  - availability_zone
  - binding
  - default-subnetpools
  - network-ip-availability
  - network_availability_zone
  - router_availability_zone
  - standard-attr-description
  - tag
  - timestamp_core

For nova API, we are using [2] "stable API" and API extensions are
removed. So we can use "all" for "compute_api_extensions".

[1] https://review.openstack.org/#/c/380066/
[2] http://docs.openstack.org/developer/nova/stable_api.html#stable-api

Change-Id: I2112397184929d163001b72ee588c2cd1eb776e1
2016-10-15 04:09:15 +00:00
Jenkins 3342fdc5ac Merge "Set ima_disk_format to vhd when hypervisor is XenServer" into stable/mitaka 2016-10-06 05:32:40 +00:00
pratik-gadiya 18d9669293 Added fix to install zookeeper for fedora
Partially Implements: #1513855

Change-Id: Ic302461f38d76183b75cc8de0a25fa84a8a8ff69
(cherry picked from commit 5069b8d894)
2016-09-28 15:07:14 +00:00
Huan Xie 8e40f4c597 Set ima_disk_format to vhd when hypervisor is XenServer
When running tempest testcase test_minimum_basic_scenario will always fail
due to lack of configuration [scenario] img_disk_format=vhd in tempest.conf
This patchset is to add this configuration when XenServer is used.

Change-Id: I4b916200e6eefb62f148ec8b644fb23ffc7e00a6
Closes-Bug: #1589787
(cherry picked from commit 36afed4353)
2016-09-25 00:18:29 +00:00
Jenkins 09487fa3c6 Merge "tempest: toggle allow_port_security_disabled=True" into stable/mitaka 2016-09-15 18:19:57 +00:00
Monty Taylor 7af2b14cb7 Accept IPv6 RAs on the interface with the default route
Because neutron sets ipv6 forwarding settings, we stop accepting RAs
from IPv6-only host environments. This leads to a loss of external
connectivity, which is bad for zuul running tests and stuff.

Setting accept_ra to 2 will cause the RAs to be accepted.

(cherry picked from commit 85b1308be4)

Conflicts:
	lib/neutron_plugins/services/l3

Closes-bug: #1616282

Change-Id: Ia044fff2a1731ab6c04f82aea47096b425e0c0a0
2016-08-24 17:42:36 -04:00
Matt Riedemann 7b1aa72487 Revert "Switch devstack to use qcow cirros img"
This reverts commit aecfdf5562.

This change is breaking grenade on master (newton).

Change-Id: Iba8fb7494bad3f215deef1b2b978747254b3f6f6
Closes-Bug: #1615241
2016-08-20 14:53:06 +00:00
Matthew Treinish aecfdf5562 Switch devstack to use qcow cirros img
This commit switches devstack to use the published qcow2 cirros image
instead of the AMI version. Using AMI was mostly a historical artifact
dating pretty far back, but in the real world no one really uses AMI
images with openstack clouds. This change reflects that and also
enables tempest ro remove its deprecated config options for using AMI
as a fallback on misconfiguration (which was just there to support
devstack's defaults)

This is need on all branches so that tempest can remove it's deprecated
options. It's also good to use a consistent image on all branches.

Change-Id: Id65ebae73b28da7185cb349b714b659af51ef77f
(cherry picked from commit 14fa51c28b)
2016-08-17 18:15:08 -04:00
Matt Riedemann 0621ce04ec tempest: toggle allow_port_security_disabled=True
This enables a new test in Tempest to run on a per-branch
basis since by default it's disabled because it won't pass
on liberty given the bug fix isn't in liberty and won't be
backported there.

Depends-On: I20b8d5d2a300c83a59bdb33374fc20447ce2ede3

Change-Id: I18fd5e0978795fec39a763e1e0f07d758905b9b8
Related-Bug: #1175464
(cherry picked from commit 2205d87012)
2016-08-04 10:24:13 -04:00
Spyros Trigazis dcb218d63e Keep old behavior of setuptools for editable installs
In the 25.0.0 release [1] of setuptools during any install
operation the package in not overwritten. If a package is
installed from another requirement via pip and then it is
installed again from git, it is not updated causing
check_libs_from_git to fail.

[1] https://setuptools.readthedocs.io/en/latest/history.html#v25-0-0

Change-Id: Ibaa1d4157816ea649f4452756fbde25951347001
Closes-Bug: #1605998
(cherry picked from commit 88ccd47c88)
2016-07-28 12:01:29 -04:00
Sean Dague 8866201884 add local.conf modifying functions
This adds a set of local.conf modifying functions which make it easier
for consuming projects like devstack-gate to programatically add
elements to local.conf structured files.

Change-Id: I3427968c2bd43aba12b3619acc27f73c74f0dabb
Co-Authored-By: fumihiko kakuma <kakuma@valinux.co.jp>
(cherry picked from commit bb35715cfe)
2016-07-25 20:12:21 +00:00
Ihar Hrachyshka b078590721 Introduce PUBLIC_BRIDGE_MTU variable to set br-ex MTU
This variable can be used to accommodate for underlying infrastructure
that does not provide full 1500-sized traffic, or maybe instead gives
access to Jumbo frames.

Conflicts:
	lib/neutron_plugins/linuxbridge_agent
	lib/neutron_plugins/openvswitch_agent
	lib/neutron_plugins/services/l3

Change-Id: I38a80bac18673a30842a7b997d0669fed5aff976
Related-Bug: #1603268
(cherry picked from commit 7b5c7dce53)
2016-07-17 00:20:58 +02:00
Matthew Treinish e16da5130b Move tempest plugin install to the end
For the tempest plugin install inside the tox venv to hold we need to
ensure that it's the last thing run that touches the tox venv before
devstack ends. Otherwise there is a chance we'll recreate the venv in
a later step of installing and configuring tempest. This commit
moves the plugin installation into it's own function and calls that
function as last phase of the tempest setup to make sure it runs last.

Change-Id: Ie253171537e8c5a9887cc30aba1cad4b31e57663
(cherry picked from commit 7e603d1bf8)
2016-06-10 19:57:28 +00:00
Brant Knudson 3fa2d914b1 Correct keystone memcached host setting
keystone was configured to connect to memcached on the host IP
address. Unfortunately, memcached is only listening on localhost,
so this setting actually hurts performance as keystone fails to
connect to the memcached server. There's no indication of this in
the keystone logs since this is just how memcache client works
(ignoring errors).

You can verify this by
1) in /etc/memcached.conf, set -vv
2) restart memcached: service memcached restart
3) watch /var/log/memcached.log
4) There will be no output

with this change, there will be output in /var/log/memcached.log

Also the performance should be a lot better.

Change-Id: I95d798d122e2a95e27eb1d2c4e786c3cd844440b
(cherry picked from commit 75ace7a5ed)
2016-06-09 14:26:20 +00:00
yan.haifeng 0181c486f7 Fix ovs-vsctl executed in worlddump.py failed issue
add sudo before ovs-vsctl command.

Change-Id: I1a7dd9504da766beb452bd749e325931678de64e
Closes-Bug: #1576560
(cherry picked from commit 6ba17f7d01)
2016-05-28 10:02:43 +09:00
fumihiko kakuma a95ffa1c0b In worlddump, execute ovs-ofctl for an only existing bridge
When devstack fails, some or all bridges may not exist.
This change allows an only existing bridge to executes ovs-ofctl command.
And fix duplicate ofp version specified in protocol option of ovs-ofctl.

Change-Id: Ied01de727ca9b867ce87db358f72ae44838b63af
(cherry picked from commit 578459f808)
2016-05-28 00:54:48 +00:00
Jenkins db0e962826 Merge "Default to venv isolated tempest on stable mitaka" into stable/mitaka 2016-05-25 04:15:15 +00:00
Jenkins 0fbd81b4c3 Merge "Fix ironic compute_driver name" into stable/mitaka 2016-05-23 16:48:30 +00:00
fumihiko kakuma 23f5d5c2ab In worlddump, cover all supported version of OpenFlow protocol by ovs-ofctl
This change includes the following commits.

Fix a typo in comment for _get_ofp_version

OpenFlow11 -> OpenFlow10

Change-Id: I2a501ccd32f5f7a39fd4bc746f00ca3f67bd98c1
(cherry picked from commit 2bd2568bd1)

In worlddump, cover all supported version of OpenFlow protocol by ovs-ofctl

Currently ovs-ofctl command is executed for only default ofp version
(OpenFlow10).
Some Neutron's plugin uses OpenFlow13 and in that case ovs-ofctl fails.
This chage allows us to get ovs info for all ofp versions supported by ovs.
And adds dump by dump-ports and dump-ports-desc.

Change-Id: I2d3c42835a5ad0f5ebf540e8127762f466347c9c
(cherry picked from commit 6099401e00)
2016-05-20 06:29:53 +09:00
Matthew Treinish d662cfada3 Default to venv isolated tempest on stable mitaka
Tempest follows global requirements of master on openstack (as it is
branchless) when running tempest in an all in one environment with an
older branch this can cause requirements conflicts. To prevent this
issue we need to venv isolate tempest from the system to ensure that
everything is properly isolated. This also includes no following
constraints since the constraints version on stable is too old for
what we test tempest with.

Change-Id: Ie3d18bf811ae2128737d615f69ea07ad2c535388
2016-05-19 00:09:27 -04:00
vsaienko ea04618a1c Fix ironic compute_driver name
This commit fixes breaking change [0].
Long driver names like 'nova.virt.libvirt.libvirtDriver' are
no longer available and 'libvirt.libvirtDriver' should be used
instead.

Reference:
[0] https://review.openstack.org/309504

Change-Id: I27a1b75b921c7401bc8614caadfd1e09e7dd5d65
Closes-Bug: 1574990
(cherry picked from commit e3a04dd857)
2016-05-18 12:38:37 +00:00
Jenkins 1d4303db4e Merge "Remove vpnaas code from devstack" into stable/mitaka 2016-05-11 03:16:22 +00:00
Matthew Treinish 3e5b495927 Use common tempest tox venv and add plugin install variable
This commit adds a new variable to lib/tempest to provide the plugins
that should be installed into common tox venv that gets created. In
order to make this work the workarounds to handle migrating to a common
tox venv have to be removed otherwise the plugins could be installed in
a venv that isn't used. This also removes the constrained installation
steps, as the constraints packaged on mitaka will eventually conflict
with what tempest actually requires since tempest follows master
requirements and constraints.

Change-Id: I63658b8d8dfa999e0feb79f8f2968f2b32e3ff57
Depends-On: Iab2e6e04b6c5795a4d0c8214564106525b942308
(cherry picked from commit 440464ccbb)
2016-05-09 15:23:39 -04:00
Ihar Hrachyshka 95cb2ea68f Remove vpnaas code from devstack
This service is now configured by devstack plugin in master.

Change-Id: Ie5fc0d2a45c1b564f98c69ec9ea6fbdeeb465d32
(cherry picked from commit 1a791cbc44)
2016-05-06 19:10:35 -04:00
Matthew Treinish 0945f431c0 Handle common and seperate tempest tox venvs
In order to support the effort to unify the tox venvs being created
by tempest this commit temporarily cases the path of the venv being
created. Once tempest is updated to only use .tox/tempest we can
remove the if blocks and just use it unconditionally.

Change-Id: I34a69020eee07156e64026781a3c0bffdb5ab415
(cherry picked from commit 412956a973)
2016-05-02 16:35:58 -04:00
Mark Vanderwiel 603fc0c6ec Add dependency for hexdump
hexdump is used in common function generate_hex_string which is
used by nova and heat.  The current general dependencies do not
have this dependency covered, instead it is usually pulled in by
other implicit dependencies when a full devstack is built. In
cases where only a subset is built (like just Heat and keystone)
hexdump is missing.

Added unit tests for the generate_hex_string function.

Depends-On: Ib47d802a31a0f4c2a49daa7e6698e37c70a2365a
Change-Id: I77c8c2019fb8b8174cdfaed3e56ebf728f0732b7
Closes-Bug: #1558672
(cherry picked from commit d99c29032b)
2016-03-28 09:32:10 +00:00
Sean Dague 3cff013d8e run swift blocks if any services are enabled
Previously the swift blocks only ran if s-proxy is enabled, which
prevents a multinode configuration. We should run these blocks if any
swift services are enabled, and push proxy specific conditionals one
step lower.

Change-Id: I540a97615b3c19f882c8673b1a4a29cd47e36aa8
2016-03-25 18:37:35 +00:00
Sean Dague 4953b04a04 Add colorful PS4
PS4 can include functions, so when running in the LOG_COLORS=True mode
provide a grey function line so that it's easier to visually
distinguish the content from the location.

Also make it so the main prompt chunks off all the common path, which
means we can printf to 40 characters and have a pretty reasonable and
readable PS4.

Change-Id: I4a10a49db97d413349bcfceeb8c4164936fbcc40
(cherry picked from commit 646085d701)
2016-03-24 14:13:25 -04:00
Sean Dague 0206488da6 update max microversions for mitaka
Change-Id: I641cda1c51ec00ae2d550e5d08b4648cd1ac3b54
2016-03-22 19:02:34 +00:00
Sean Dague 3519faac32 update references for stable/mitaka
Change-Id: I5c100164eba416677257d7bec4c07c15fde0b944
2016-03-22 18:50:08 +00:00
26 changed files with 855 additions and 175 deletions
+1
View File
@@ -2,3 +2,4 @@
host=review.openstack.org
port=29418
project=openstack-dev/devstack.git
defaultbranch=stable/mitaka
+2
View File
@@ -13,6 +13,8 @@ if is_service_enabled tempest; then
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Initializing Tempest"
configure_tempest
echo_summary "Installing Tempest Plugins"
install_tempest_plugins
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
# local.conf Tempest option overrides
:
+1
View File
@@ -1,5 +1,6 @@
bc
bridge-utils
bsdmainutils
curl
g++
gcc
+1
View File
@@ -25,5 +25,6 @@ screen
tar
tcpdump
unzip
util-linux
wget
zlib-devel
+1
View File
@@ -30,6 +30,7 @@ screen
tar
tcpdump
unzip
util-linux
wget
which
zlib-devel
+22
View File
@@ -30,6 +30,19 @@ function function_exists {
declare -f -F $1 > /dev/null
}
# short_source prints out the current location of the caller in a way
# that strips redundant directories. This is useful for PS4 usage.
function short_source {
saveIFS=$IFS
IFS=" "
called=($(caller 0))
IFS=$saveIFS
file=${called[2]}
file=${file#$RC_DIR/}
printf "%-40s " "$file:${called[1]}:${called[0]}"
}
# Retrieve an image from a URL and upload into Glance.
# Uses the following variables:
#
@@ -655,6 +668,15 @@ function create_disk {
fi
}
# set_mtu - Set MTU on a device
function set_mtu {
local dev=$1
local mtu=$2
sudo ip link set mtu $mtu dev $dev
}
# Restore xtrace
$_XTRACE_FUNCTIONS
+164
View File
@@ -274,6 +274,170 @@ function iniget_sections {
$xtrace
}
# Set a localrc var
function localrc_set {
local file=$1
local group="local"
local conf="localrc"
local section=""
local option=$2
local value=$3
localconf_set "$file" "$group" "$conf" "$section" "$option" "$value"
}
# Check if local.conf has section.
function localconf_has_section {
local file=$1
local group=$2
local conf=$3
local section=$4
local sep
sep=$(echo -ne "\x01")
local line
line=$(sed -ne "\\${sep}^\[\[${group}|${conf}\]\]${sep},\\${sep}\[\[.*\]\]${sep}{
/\[${section}\]/p
}" "$file")
[ -n "$line" ]
}
# Check if local.conf has option.
function localconf_has_option {
local file=$1
local group=$2
local conf=$3
local section=$4
local option=$5
local sep
sep=$(echo -ne "\x01")
local line
if [[ -z "$section" ]]; then
line=$(sed -ne "\\${sep}^\[\[${group}|${conf}\]\]${sep},\\${sep}\[\[.*\]\]${sep}{
/${option}[ \t]*=.*$/p
}" "$file")
else
line=$(sed -ne "\\${sep}^\[\[${group}|${conf}\]\]${sep},\\${sep}\[\[.*\]\]${sep}{
/\[${section}\]/,/\[\[.*\]\]\|\[.*\]/{
/${option}[ \t]*=.*$/p}
}" "$file")
fi
[ -n "$line" ]
}
# Update option in local.conf.
function localconf_update_option {
local sudo=$1
local file=$2
local group=$3
local conf=$4
local section=$5
local option=$6
local value=$7
local sep
sep=$(echo -ne "\x01")
if [[ -z "$section" ]]; then
$sudo sed -i -e "\\${sep}^\[\[${group}|${conf}\]\]${sep},\\${sep}\[\[.*\]\]${sep}{
s${sep}^\(${option}[ \t]*=[ \t]*\).*\$${sep}\1${value}${sep}
}" "$file"
else
$sudo sed -i -e "\\${sep}^\[\[${group}|${conf}\]\]${sep},\\${sep}\[\[.*\]\]${sep}{
/\[${section}\]/,/\[\[.*\]\]\|\[.*\]/s${sep}^\(${option}[ \t]*=[ \t]*\).*\$${sep}\1${value}${sep}
}" "$file"
fi
}
# Add option in local.conf.
function localconf_add_option {
local sudo=$1
local file=$2
local group=$3
local conf=$4
local section=$5
local option=$6
local value=$7
local sep
sep=$(echo -ne "\x01")
if [[ -z "$section" ]]; then
$sudo sed -i -e "\\${sep}^\[\[${group}|${conf}\]\]${sep} a $option=$value" "$file"
else
$sudo sed -i -e "\\${sep}^\[\[${group}|${conf}\]\]${sep},\\${sep}\[\[.*\]\]${sep}{
/\[${section}\]/ a $option=$value
}" "$file"
fi
}
# Add section and option in local.conf.
function localconf_add_section_and_option {
local sudo=$1
local file=$2
local group=$3
local conf=$4
local section=$5
local option=$6
local value=$7
local sep
sep=$(echo -ne "\x01")
$sudo sed -i -e "\\${sep}^\[\[${group}|${conf}\]\]${sep} {
a [$section]
a $option=$value
}" "$file"
}
# Set an option in a local.conf file.
# localconf_set [-sudo] config-file group conf-name section option value
# - if the file does not exist, it is created
function localconf_set {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local sep
sep=$(echo -ne "\x01")
local sudo=""
if [ $1 == "-sudo" ]; then
sudo="sudo "
shift
fi
local file=$1
local group=$2
local conf=$3
local section=$4
local option=$5
local value=$6
if [[ -z $group || -z $conf || -z $option || -z $value ]]; then
$xtrace
return
fi
if ! grep -q "^\[\[${group}|${conf}\]\]" "$file" 2>/dev/null; then
# Add meta section at the end if it does not exist
echo -e "\n[[${group}|${conf}]]" | $sudo tee --append "$file" > /dev/null
# Add section at the end
if [[ -n "$section" ]]; then
echo -e "[$section]" | $sudo tee --append "$file" > /dev/null
fi
# Add option at the end
echo -e "$option=$value" | $sudo tee --append "$file" > /dev/null
elif [[ -z "$section" ]]; then
if ! localconf_has_option "$file" "$group" "$conf" "$section" "$option"; then
# Add option
localconf_add_option "$sudo" "$file" "$group" "$conf" "$section" "$option" "$value"
else
# Replace it
localconf_update_option "$sudo" "$file" "$group" "$conf" "$section" "$option" "$value"
fi
elif ! localconf_has_section "$file" "$group" "$conf" "$section"; then
# Add section and option in specified meta section
localconf_add_section_and_option "$sudo" "$file" "$group" "$conf" "$section" "$option" "$value"
elif ! localconf_has_option "$file" "$group" "$conf" "$section" "$option"; then
# Add option
localconf_add_option "$sudo" "$file" "$group" "$conf" "$section" "$option" "$value"
else
# Replace it
localconf_update_option "$sudo" "$file" "$group" "$conf" "$section" "$option" "$value"
fi
$xtrace
}
# Restore xtrace
$INC_CONF_TRACE
+11
View File
@@ -148,11 +148,15 @@ function pip_install {
fi
$xtrace
# adding SETUPTOOLS_SYS_PATH_TECHNIQUE is a workaround to keep
# the same behaviour of setuptools before version 25.0.0.
# related issue: https://github.com/pypa/pip/issues/3874
$sudo_pip \
http_proxy="${http_proxy:-}" \
https_proxy="${https_proxy:-}" \
no_proxy="${no_proxy:-}" \
PIP_FIND_LINKS=$PIP_FIND_LINKS \
SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite \
$cmd_pip $upgrade \
$@
result=$?
@@ -363,6 +367,13 @@ function install_python3 {
fi
}
function install_devstack_tools {
# intentionally old to ensure devstack-gate has control
local dstools_version=${DSTOOLS_VERSION:-0.1.2}
install_python3
sudo pip3 install -U devstack-tools==${dstools_version}
}
# Restore xtrace
$INC_PY_TRACE
+2
View File
@@ -93,6 +93,8 @@ function install_dlm {
if is_dlm_enabled; then
if is_ubuntu; then
install_package zookeeperd
elif is_fedora; then
install_package zookeeper
else
die $LINENO "Don't know how to install zookeeper on this platform"
fi
+1 -3
View File
@@ -40,7 +40,6 @@ HEAT_DIR=$DEST/heat
HEAT_CFNTOOLS_DIR=$DEST/heat-cfntools
HEAT_TEMPLATES_REPO_DIR=$DEST/heat-templates
OCC_DIR=$DEST/os-collect-config
DIB_UTILS_DIR=$DEST/dib-utils
ORC_DIR=$DEST/os-refresh-config
OAC_DIR=$DEST/os-apply-config
@@ -276,7 +275,6 @@ function install_heat_other {
git_clone $OAC_REPO $OAC_DIR $OAC_BRANCH
git_clone $OCC_REPO $OCC_DIR $OCC_BRANCH
git_clone $ORC_REPO $ORC_DIR $ORC_BRANCH
git_clone $DIB_UTILS_REPO $DIB_UTILS_DIR $DIB_UTILS_BRANCH
}
# start_heat() - Start running processes, including screen
@@ -420,7 +418,7 @@ function create_heat_accounts {
# build_heat_pip_mirror() - Build a pip mirror containing heat agent projects
function build_heat_pip_mirror {
local project_dirs="$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR $DIB_UTILS_DIR"
local project_dirs="$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR"
local projpath proj package
rm -rf $HEAT_PIP_REPO
+1 -1
View File
@@ -236,7 +236,7 @@ function configure_keystone {
# Enable caching
iniset $KEYSTONE_CONF cache enabled "True"
iniset $KEYSTONE_CONF cache backend "oslo_cache.memcache_pool"
iniset $KEYSTONE_CONF cache memcache_servers $SERVICE_HOST:11211
iniset $KEYSTONE_CONF cache memcache_servers localhost:11211
# Do not cache the catalog backend due to https://bugs.launchpad.net/keystone/+bug/1537617
iniset $KEYSTONE_CONF catalog caching "False"
+9 -56
View File
@@ -108,7 +108,6 @@ GITDIR["python-neutronclient"]=$DEST/python-neutronclient
NEUTRON_DIR=$DEST/neutron
NEUTRON_FWAAS_DIR=$DEST/neutron-fwaas
NEUTRON_LBAAS_DIR=$DEST/neutron-lbaas
NEUTRON_VPNAAS_DIR=$DEST/neutron-vpnaas
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
# Support entry points installation of console scripts
@@ -125,9 +124,6 @@ export NEUTRON_TEST_CONFIG_FILE=${NEUTRON_TEST_CONFIG_FILE:-"$NEUTRON_CONF_DIR/d
# Default provider for load balancer service
DEFAULT_LB_PROVIDER=LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
# Default provider for VPN service
DEFAULT_VPN_PROVIDER=VPN:openswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default
# Agent binaries. Note, binary paths for other agents are set in per-service
# scripts in lib/neutron_plugins/services/
AGENT_DHCP_BINARY="$NEUTRON_BIN_DIR/neutron-dhcp-agent"
@@ -139,7 +135,6 @@ AGENT_META_BINARY="$NEUTRON_BIN_DIR/neutron-metadata-agent"
Q_DHCP_CONF_FILE=$NEUTRON_CONF_DIR/dhcp_agent.ini
Q_L3_CONF_FILE=$NEUTRON_CONF_DIR/l3_agent.ini
Q_FWAAS_CONF_FILE=$NEUTRON_CONF_DIR/fwaas_driver.ini
Q_VPN_CONF_FILE=$NEUTRON_CONF_DIR/vpn_agent.ini
Q_META_CONF_FILE=$NEUTRON_CONF_DIR/metadata_agent.ini
# Default name for Neutron database
@@ -188,6 +183,7 @@ IPV6_PROVIDER_NETWORK_GATEWAY=${IPV6_PROVIDER_NETWORK_GATEWAY:-}
# Define the public bridge that will transmit traffic from VMs to the
# physical network - used by both the OVS and Linux Bridge drivers.
PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
PUBLIC_BRIDGE_MTU=${PUBLIC_BRIDGE_MTU:-1500}
# Use flat providernet for public network
#
@@ -231,10 +227,6 @@ Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-True}
# See _configure_neutron_common() for details about setting it up
declare -a Q_PLUGIN_EXTRA_CONF_FILES
# List of (optional) config files for VPN device drivers to use with
# the neutron-q-vpn agent
declare -a Q_VPN_EXTRA_CONF_FILES
Q_RR_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf
if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then
@@ -359,11 +351,6 @@ source $TOP_DIR/lib/neutron_plugins/services/loadbalancer
# Hardcoding for 1 service plugin for now
source $TOP_DIR/lib/neutron_plugins/services/metering
# VPN service plugin functions
# -------------------------------------------
# Hardcoding for 1 service plugin for now
source $TOP_DIR/lib/neutron_plugins/services/vpn
# Firewall Service Plugin functions
# ---------------------------------
source $TOP_DIR/lib/neutron_plugins/services/firewall
@@ -375,6 +362,9 @@ else
Q_USE_SECGROUP=False
fi
default_route_dev=$(ip route | grep ^default | awk '{print $5}')
die_if_not_set $LINENO default_route_dev "Failure retrieving default route device"
# Save trace setting
_XTRACE_NEUTRON=$(set +o | grep xtrace)
set +o xtrace
@@ -392,19 +382,6 @@ function _determine_config_server {
echo "$opts"
}
function _determine_config_vpn {
local cfg_file
local opts="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE --config-file=$Q_VPN_CONF_FILE"
if is_service_enabled q-fwaas; then
opts+=" --config-file $Q_FWAAS_CONF_FILE"
fi
for cfg_file in ${Q_VPN_EXTRA_CONF_FILES[@]}; do
opts+=" --config-file $cfg_file"
done
echo "$opts"
}
function _determine_config_l3 {
local opts="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE"
if is_service_enabled q-fwaas; then
@@ -419,7 +396,6 @@ function determine_config_files {
local opts=""
case "$1" in
"neutron-server") opts="$(_determine_config_server)" ;;
"neutron-vpn-agent") opts="$(_determine_config_vpn)" ;;
"neutron-l3-agent") opts="$(_determine_config_l3)" ;;
esac
if [ -z "$opts" ] ; then
@@ -449,10 +425,6 @@ function configure_neutron {
if is_service_enabled q-metering; then
_configure_neutron_metering
fi
if is_service_enabled q-vpn; then
deprecated "Configuring q-vpn through devstack is deprecated"
_configure_neutron_vpn
fi
if is_service_enabled q-fwaas; then
deprecated "Configuring q-fwaas through devstack is deprecated"
_configure_neutron_fwaas
@@ -660,10 +632,6 @@ function install_neutron {
git_clone $NEUTRON_LBAAS_REPO $NEUTRON_LBAAS_DIR $NEUTRON_LBAAS_BRANCH
setup_develop $NEUTRON_LBAAS_DIR
fi
if is_service_enabled q-vpn; then
git_clone $NEUTRON_VPNAAS_REPO $NEUTRON_VPNAAS_DIR $NEUTRON_VPNAAS_BRANCH
setup_develop $NEUTRON_VPNAAS_DIR
fi
if [ "$VIRT_DRIVER" == 'xenserver' ]; then
local dom0_ip
@@ -762,8 +730,6 @@ function start_neutron_other_agents {
if is_service_enabled neutron-vpnaas; then
: # Started by plugin
elif is_service_enabled q-vpn; then
run_process q-vpn "$AGENT_VPN_BINARY $(determine_config_files neutron-vpn-agent)"
else
run_process q-l3 "$AGENT_L3_BINARY $(determine_config_files neutron-l3-agent)"
fi
@@ -814,9 +780,6 @@ function stop_neutron_other {
if is_service_enabled q-fwaas; then
neutron_fwaas_stop
fi
if is_service_enabled q-vpn; then
neutron_vpn_stop
fi
if is_service_enabled q-metering; then
neutron_metering_stop
fi
@@ -1070,10 +1033,6 @@ function _configure_neutron_dhcp_agent {
function _configure_neutron_l3_agent {
Q_L3_ENABLED=True
if is_service_enabled q-vpn; then
neutron_vpn_configure_agent
fi
cp $NEUTRON_DIR/etc/l3_agent.ini.sample $Q_L3_CONF_FILE
iniset $Q_L3_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
@@ -1133,17 +1092,6 @@ function _configure_neutron_fwaas {
neutron_fwaas_configure_driver
}
function _configure_neutron_vpn {
# Uses oslo config generator to generate VPNaaS sample configuration files
(cd $NEUTRON_VPNAAS_DIR && exec ./tools/generate_config_file_samples.sh)
if [ -f $NEUTRON_VPNAAS_DIR/etc/neutron_vpnaas.conf.sample ]; then
cp $NEUTRON_VPNAAS_DIR/etc/neutron_vpnaas.conf.sample $NEUTRON_CONF_DIR/neutron_vpnaas.conf
iniset $NEUTRON_CONF_DIR/neutron_vpnaas.conf service_providers service_provider $DEFAULT_VPN_PROVIDER
fi
neutron_vpn_install_agent_packages
neutron_vpn_configure_common
}
function _configure_dvr {
iniset $NEUTRON_CONF DEFAULT router_distributed True
iniset $Q_L3_CONF_FILE DEFAULT agent_mode $Q_DVR_MODE
@@ -1400,6 +1348,11 @@ function _neutron_configure_router_v6 {
# This logic is specific to using the l3-agent for layer 3
if is_service_enabled q-l3; then
# Ensure IPv6 RAs are accepted on the interface with the default route.
# This is needed for neutron-based devstack clouds to work in
# IPv6-only clouds in the gate. Please do not remove this without
# talking to folks in Infra.
sudo sysctl -w net.ipv6.conf.$default_route_dev.accept_ra=2
# Ensure IPv6 forwarding is enabled on the host
sudo sysctl -w net.ipv6.conf.all.forwarding=1
# Configure and enable public bridge
+1
View File
@@ -48,6 +48,7 @@ function neutron_plugin_configure_dhcp_agent {
function neutron_plugin_configure_l3_agent {
sudo brctl addbr $PUBLIC_BRIDGE
set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge
iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport
}
+1 -1
View File
@@ -102,7 +102,7 @@ function neutron_plugin_configure_plugin_agent {
sudo ovs-vsctl -- --may-exist add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT
# Create external bridge and add port
_neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
_neutron_ovs_base_add_public_bridge
sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE_DEFAULT
# Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT"
+6 -1
View File
@@ -105,11 +105,16 @@ function _neutron_ovs_base_configure_l3_agent {
sudo ip link set $Q_PUBLIC_VETH_EX up
sudo ip addr flush dev $Q_PUBLIC_VETH_EX
else
_neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
_neutron_ovs_base_add_public_bridge
sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
fi
}
function _neutron_ovs_base_add_public_bridge {
_neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
}
function _neutron_ovs_base_configure_nova_vif_driver {
:
}
-58
View File
@@ -1,58 +0,0 @@
#!/bin/bash
# Neutron VPN plugin
# ---------------------------
# Save trace setting
_XTRACE_NEUTRON_VPN=$(set +o | grep xtrace)
set +o xtrace
AGENT_VPN_BINARY="$NEUTRON_BIN_DIR/neutron-vpn-agent"
VPN_PLUGIN=${VPN_PLUGIN:-"neutron_vpnaas.services.vpn.plugin.VPNDriverPlugin"}
IPSEC_PACKAGE=${IPSEC_PACKAGE:-"openswan"}
function neutron_vpn_install_agent_packages {
install_package $IPSEC_PACKAGE
if is_ubuntu && [[ "$IPSEC_PACKAGE" == "strongswan" ]]; then
sudo ln -sf /etc/apparmor.d/usr.lib.ipsec.charon /etc/apparmor.d/disable/
sudo ln -sf /etc/apparmor.d/usr.lib.ipsec.stroke /etc/apparmor.d/disable/
# NOTE: Due to https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1387220
# one must use 'sudo start apparmor ACTION=reload' for Ubuntu 14.10
restart_service apparmor
fi
}
function neutron_vpn_configure_common {
_neutron_service_plugin_class_add $VPN_PLUGIN
_neutron_deploy_rootwrap_filters $NEUTRON_VPNAAS_DIR
}
function neutron_vpn_configure_agent {
# Uses oslo config generator to generate LBaaS sample configuration files
(cd $NEUTRON_VPNAAS_DIR && exec ./tools/generate_config_file_samples.sh)
cp $NEUTRON_VPNAAS_DIR/etc/vpn_agent.ini.sample $Q_VPN_CONF_FILE
if [[ "$IPSEC_PACKAGE" == "strongswan" ]]; then
iniset_multiline $Q_VPN_CONF_FILE vpnagent vpn_device_driver neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec.StrongSwanDriver
if is_fedora; then
iniset $Q_VPN_CONF_FILE strongswan default_config_area /usr/share/strongswan/templates/config/strongswan.d
fi
else
iniset_multiline $Q_VPN_CONF_FILE vpnagent vpn_device_driver neutron_vpnaas.services.vpn.device_drivers.ipsec.OpenSwanDriver
fi
}
function neutron_vpn_stop {
local ipsec_data_dir=$DATA_DIR/neutron/ipsec
local pids
if [ -d $ipsec_data_dir ]; then
pids=$(find $ipsec_data_dir -name 'pluto.pid' -exec cat {} \;)
fi
if [ -n "$pids" ]; then
sudo kill $pids
fi
stop_process q-vpn
}
# Restore xtrace
$_XTRACE_NEUTRON_VPN
+1 -1
View File
@@ -39,7 +39,7 @@ function configure_nova_hypervisor {
configure_libvirt
LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.firewall.NoopFirewallDriver"}
iniset $NOVA_CONF DEFAULT compute_driver nova.virt.ironic.IronicDriver
iniset $NOVA_CONF DEFAULT compute_driver ironic.IronicDriver
iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
iniset $NOVA_CONF DEFAULT scheduler_host_manager ironic_host_manager
iniset $NOVA_CONF DEFAULT ram_allocation_ratio 1.0
+56 -19
View File
@@ -64,7 +64,11 @@ BUILD_TIMEOUT=${BUILD_TIMEOUT:-196}
# This must be False on stable branches, as master tempest
# deps do not match stable branch deps. Set this to True to
# have tempest installed in DevStack by default.
INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"}
INSTALL_TEMPEST=${INSTALL_TEMPEST:-"False"}
# This variable is passed directly to pip install inside the common tox venv
# that is created
TEMPEST_PLUGINS=${TEMPEST_PLUGINS:-0}
# Cinder/Volume variables
TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
@@ -288,6 +292,7 @@ function configure_tempest {
fi
if [ "$VIRT_DRIVER" = "xenserver" ]; then
iniset $TEMPEST_CONFIG image disk_formats "ami,ari,aki,vhd,raw,iso"
iniset $TEMPEST_CONFIG scenario img_disk_format vhd
fi
# Image Features
@@ -323,11 +328,9 @@ function configure_tempest {
tmp_cfg_file=$(mktemp)
cd $TEMPEST_DIR
if [[ "$OFFLINE" != "True" ]]; then
tox -revenv --notest
tox -revenv-tempest --notest
fi
# NOTE(mtreinish): Respect constraints on tempest verify-config venv
tox -evenv -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
tox -evenv -- tempest verify-config -uro $tmp_cfg_file
tox -evenv-tempest -- tempest verify-config -uro $tmp_cfg_file
local compute_api_extensions=${COMPUTE_API_EXTENSIONS:-"all"}
if [[ ! -z "$DISABLE_COMPUTE_API_EXTENSIONS" ]]; then
@@ -343,7 +346,7 @@ function configure_tempest {
# NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_compute_max_microversion"
# for stable branch on each release which should be changed from "latest" to max supported version of that release.
local tempest_compute_min_microversion=${TEMPEST_COMPUTE_MIN_MICROVERSION:-None}
local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"latest"}
local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"2.25"}
# Reset microversions to None where v2.0 is running which does not support microversion.
# Both "None" means no microversion testing.
if [[ "$TEMPEST_COMPUTE_TYPE" == "compute_legacy" ]]; then
@@ -351,16 +354,18 @@ function configure_tempest {
tempest_compute_max_microversion=None
fi
if [ "$tempest_compute_min_microversion" == "None" ]; then
inicomment $TEMPEST_CONFIG compute-feature-enabled min_microversion
inicomment $TEMPEST_CONFIG compute min_microversion
else
iniset $TEMPEST_CONFIG compute-feature-enabled min_microversion $tempest_compute_min_microversion
iniset $TEMPEST_CONFIG compute min_microversion $tempest_compute_min_microversion
fi
if [ "$tempest_compute_max_microversion" == "None" ]; then
inicomment $TEMPEST_CONFIG compute-feature-enabled max_microversion
inicomment $TEMPEST_CONFIG compute max_microversion
else
iniset $TEMPEST_CONFIG compute-feature-enabled max_microversion $tempest_compute_max_microversion
iniset $TEMPEST_CONFIG compute max_microversion $tempest_compute_max_microversion
fi
# TODO(mriedem): Remove allow_port_security_disabled after liberty-eol.
iniset $TEMPEST_CONFIG compute-feature-enabled allow_port_security_disabled True
iniset $TEMPEST_CONFIG compute-feature-enabled resize True
iniset $TEMPEST_CONFIG compute-feature-enabled live_migration ${LIVE_MIGRATION_AVAILABLE:-False}
iniset $TEMPEST_CONFIG compute-feature-enabled change_password False
@@ -393,14 +398,26 @@ function configure_tempest {
# Network
iniset $TEMPEST_CONFIG network api_version 2.0
iniset $TEMPEST_CONFIG network tenant_networks_reachable false
iniset $TEMPEST_CONFIG network project_networks_reachable false
iniset $TEMPEST_CONFIG network public_network_id "$public_network_id"
iniset $TEMPEST_CONFIG network public_router_id "$public_router_id"
iniset $TEMPEST_CONFIG network default_network "$FIXED_RANGE"
iniset $TEMPEST_CONFIG network-feature-enabled ipv6 "$IPV6_ENABLED"
iniset $TEMPEST_CONFIG network-feature-enabled ipv6_subnet_attributes "$IPV6_SUBNET_ATTRIBUTES_ENABLED"
local network_api_extensions=${NETWORK_API_EXTENSIONS:-"all"}
DEFAULT_NET_EXT="address-scope,agent,allowed-address-pairs,binding"
DEFAULT_NET_EXT+=",allowed-address-pairs,auto-allocated-topology"
DEFAULT_NET_EXT+=",availability_zone,binding,default-subnetpool"
DEFAULT_NET_EXT+=",dhcp_agent_scheduler,dns-integration"
DEFAULT_NET_EXT+=",dvr,ext-gw-mode,external-net"
DEFAULT_NET_EXT+=",extra_dhcp_opt,extraroute,flavors,fwaas"
DEFAULT_NET_EXT+=",fwaasrouterinsertion,l3-ha,l3_agent_scheduler,lbaas"
DEFAULT_NET_EXT+=",lbaas_agent_scheduler,metering,multi-provider,net-mtu"
DEFAULT_NET_EXT+="network-ip-availability,network_availability_zone,port-security"
DEFAULT_NET_EXT+=",provider,quotas,rbac-policies,router,router_availability_zone"
DEFAULT_NET_EXT+=",security-group,service-type,standard-attr-description"
DEFAULT_NET_EXT+=",subnet_allocation,tag,timestamp_core,vpnaas"
local network_api_extensions="${NETWORK_API_EXTENSIONS:-$DEFAULT_NET_EXT}"
if [[ ! -z "$DISABLE_NETWORK_API_EXTENSIONS" ]]; then
# Enabled extensions are either the ones explicitly specified or those available on the API endpoint
network_api_extensions=${NETWORK_API_EXTENSIONS:-$(iniget $tmp_cfg_file network-feature-enabled api_extensions | tr -d " ")}
@@ -442,7 +459,11 @@ function configure_tempest {
iniset $TEMPEST_CONFIG telemetry-feature-enabled events "True"
# Object Store
local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-"all"}
DEFAULT_SWIFT_OPT="account_quotas,bulk,bulk_delete,bulk_upload,container_quotas"
DEFAULT_SWIFT_OPT+=",container_sync,crossdomain,formpost,ratelimit,slo"
DEFAULT_SWIFT_OPT+=",staticweb,tempauth,tempurl"
local object_storage_api_extensions="${OBJECT_STORAGE_API_EXTENSIONS:-$DEFAULT_SWIFT_OPT}"
if [[ ! -z "$DISABLE_OBJECT_STORAGE_API_EXTENSIONS" ]]; then
# Enabled extensions are either the ones explicitly specified or those available on the API endpoint
object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-$(iniget $tmp_cfg_file object-storage-feature-enabled discoverable_apis | tr -d " ")}
@@ -464,7 +485,18 @@ function configure_tempest {
# TODO(ynesenenko): Remove the volume_services flag when Liberty and Kilo will correct work with host info.
iniset $TEMPEST_CONFIG volume-feature-enabled volume_services True
local volume_api_extensions=${VOLUME_API_EXTENSIONS:-"all"}
DEFAULT_VOL_EXT="OS-SCH-HNT,backups,capabilities,cgsnapshots,consistencygroups"
DEFAULT_VOL_EXT+=",encryption,os-admin-actions,os-availability-zone"
DEFAULT_VOL_EXT+=",os-extended-services,os-extended-snapshot-attributes"
DEFAULT_VOL_EXT+=",os-hosts,os-image-create,os-quota-class-sets,os-quota-sets"
DEFAULT_VOL_EXT+=",os-services,os-snapshot-actions,os-snapshot-manage,os-snapshot-unmanage"
DEFAULT_VOL_EXT+=",os-types-extra-specs"
DEFAULT_VOL_EXT+=",os-types-manage,os-used-limits,os-vol-host-attr,os-vol-image-meta"
DEFAULT_VOL_EXT+=",os-vol-mig-status-attr,os-vol-tenant-attr,os-volume-actions"
DEFAULT_VOL_EXT+=",os-volume-encryption-metadata,os-volume-manage"
DEFAULT_VOL_EXT+=",os-volume-replication,os-volume-transfer,os-volume-type-access"
DEFAULT_VOL_EXT+=",os-volume-unmanage,qos-specs,scheduler-stats"
local volume_api_extensions="${VOLUME_API_EXTENSIONS:-$DEFAULT_VOL_EXT}"
if [[ ! -z "$DISABLE_VOLUME_API_EXTENSIONS" ]]; then
# Enabled extensions are either the ones explicitly specified or those available on the API endpoint
volume_api_extensions=${VOLUME_API_EXTENSIONS:-$(iniget $tmp_cfg_file volume-feature-enabled api_extensions | tr -d " ")}
@@ -594,11 +626,16 @@ function install_tempest {
pip_install tox
pushd $TEMPEST_DIR
tox --notest -efull
# NOTE(mtreinish) Respect constraints in the tempest full venv, things that
# are using a tox job other than full will not be respecting constraints but
# running pip install -U on tempest requirements
$TEMPEST_DIR/.tox/full/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/full
PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
popd
}
# install_tempest_plugins() - Install any specified plugins into the tempest venv
function install_tempest_plugins {
pushd $TEMPEST_DIR
if [[ $TEMPEST_PLUGINS != 0 ]] ; then
tox -evenv-tempest -- pip install $TEMPEST_PLUGINS
fi
install_tempest_lib
popd
}
+3 -3
View File
@@ -799,7 +799,7 @@ if is_service_enabled keystone; then
fi
fi
if is_service_enabled s-proxy; then
if is_service_enabled swift; then
if is_service_enabled ceilometer; then
install_ceilometermiddleware
fi
@@ -1118,7 +1118,7 @@ fi
# Storage Service
# ---------------
if is_service_enabled s-proxy; then
if is_service_enabled swift; then
echo_summary "Configuring Swift"
init_swift
fi
@@ -1172,7 +1172,7 @@ merge_config_group $TOP_DIR/local.conf post-config
# Only run the services specified in ``ENABLED_SERVICES``
# Launch Swift Services
if is_service_enabled s-proxy; then
if is_service_enabled swift; then
echo_summary "Starting Swift"
start_swift
fi
+21 -21
View File
@@ -14,9 +14,6 @@ unset LANGUAGE
LC_ALL=C
export LC_ALL
# Make tracing more educational
export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
# Find the other rc files
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
@@ -132,6 +129,16 @@ elif [[ -f $RC_DIR/.localrc.auto ]]; then
source $RC_DIR/.localrc.auto
fi
# Use color for logging output (only available if syslog is not used)
LOG_COLOR=$(trueorfalse True LOG_COLOR)
# Make tracing more educational
if [[ "$LOG_COLOR" == "True" ]]; then
export PS4='+\[$(tput setaf 242)\]$(short_source)\[$(tput sgr0)\] '
else
export PS4='+ $(short_source): '
fi
# Configure Identity API version: 2.0, 3
IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-2.0}
@@ -205,47 +212,43 @@ REQUIREMENTS_DIR=$DEST/requirements
# block storage service
CINDER_REPO=${CINDER_REPO:-${GIT_BASE}/openstack/cinder.git}
CINDER_BRANCH=${CINDER_BRANCH:-master}
CINDER_BRANCH=${CINDER_BRANCH:-stable/mitaka}
# image catalog service
GLANCE_REPO=${GLANCE_REPO:-${GIT_BASE}/openstack/glance.git}
GLANCE_BRANCH=${GLANCE_BRANCH:-master}
GLANCE_BRANCH=${GLANCE_BRANCH:-stable/mitaka}
# heat service
HEAT_REPO=${HEAT_REPO:-${GIT_BASE}/openstack/heat.git}
HEAT_BRANCH=${HEAT_BRANCH:-master}
HEAT_BRANCH=${HEAT_BRANCH:-stable/mitaka}
# django powered web control panel for openstack
HORIZON_REPO=${HORIZON_REPO:-${GIT_BASE}/openstack/horizon.git}
HORIZON_BRANCH=${HORIZON_BRANCH:-master}
HORIZON_BRANCH=${HORIZON_BRANCH:-stable/mitaka}
# unified auth system (manages accounts/tokens)
KEYSTONE_REPO=${KEYSTONE_REPO:-${GIT_BASE}/openstack/keystone.git}
KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-master}
KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-stable/mitaka}
# neutron service
NEUTRON_REPO=${NEUTRON_REPO:-${GIT_BASE}/openstack/neutron.git}
NEUTRON_BRANCH=${NEUTRON_BRANCH:-master}
NEUTRON_BRANCH=${NEUTRON_BRANCH:-stable/mitaka}
# neutron fwaas service
NEUTRON_FWAAS_REPO=${NEUTRON_FWAAS_REPO:-${GIT_BASE}/openstack/neutron-fwaas.git}
NEUTRON_FWAAS_BRANCH=${NEUTRON_FWAAS_BRANCH:-master}
NEUTRON_FWAAS_BRANCH=${NEUTRON_FWAAS_BRANCH:-stable/mitaka}
# neutron lbaas service
NEUTRON_LBAAS_REPO=${NEUTRON_LBAAS_REPO:-${GIT_BASE}/openstack/neutron-lbaas.git}
NEUTRON_LBAAS_BRANCH=${NEUTRON_LBAAS_BRANCH:-master}
# neutron vpnaas service
NEUTRON_VPNAAS_REPO=${NEUTRON_VPNAAS_REPO:-${GIT_BASE}/openstack/neutron-vpnaas.git}
NEUTRON_VPNAAS_BRANCH=${NEUTRON_VPNAAS_BRANCH:-master}
NEUTRON_LBAAS_BRANCH=${NEUTRON_LBAAS_BRANCH:-stable/mitaka}
# compute service
NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
NOVA_BRANCH=${NOVA_BRANCH:-master}
NOVA_BRANCH=${NOVA_BRANCH:-stable/mitaka}
# object storage service
SWIFT_REPO=${SWIFT_REPO:-${GIT_BASE}/openstack/swift.git}
SWIFT_BRANCH=${SWIFT_BRANCH:-master}
SWIFT_BRANCH=${SWIFT_BRANCH:-stable/mitaka}
##############
#
@@ -255,7 +258,7 @@ SWIFT_BRANCH=${SWIFT_BRANCH:-master}
# consolidated openstack requirements
REQUIREMENTS_REPO=${REQUIREMENTS_REPO:-${GIT_BASE}/openstack/requirements.git}
REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-master}
REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-stable/mitaka}
# Tempest test suite
TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git}
@@ -785,9 +788,6 @@ SYSLOG=$(trueorfalse False SYSLOG)
SYSLOG_HOST=${SYSLOG_HOST:-$HOST_IP}
SYSLOG_PORT=${SYSLOG_PORT:-516}
# Use color for logging output (only available if syslog is not used)
LOG_COLOR=$(trueorfalse True LOG_COLOR)
# Set global ``GIT_DEPTH=<number>`` to limit the history depth of the git clone
# Set to 0 to disable shallow cloning
GIT_DEPTH=${GIT_DEPTH:-0}
+16
View File
@@ -9,6 +9,22 @@ source $TOP/functions
source $TOP/tests/unittest.sh
echo "Testing generate_hex_string()"
VAL=$(generate_hex_string 16)
if [[ ${#VAL} -eq 32 ]]; then
passed "OK"
else
failed "generate_hex_string 16 failed ${#VAL}"
fi
VAL=$(generate_hex_string 32)
if [[ ${#VAL} -eq 64 ]]; then
passed "OK"
else
failed "generate_hex_string 32 failed ${#VAL}"
fi
echo "Testing die_if_not_set()"
bash -c "source $TOP/functions; X=`echo Y && true`; die_if_not_set $LINENO X 'not OK'"
+475
View File
@@ -0,0 +1,475 @@
#!/usr/bin/env bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
# Tests for DevStack INI functions
TOP=$(cd $(dirname "$0")/.. && pwd)
# Import config functions
source $TOP/inc/ini-config
source $TOP/tests/unittest.sh
echo "Testing INI local.conf functions"
# test that can determine if file has section in specified meta-section
function test_localconf_has_section {
local file_localconf
local file_conf1
local file_conf2
file_localconf=`mktemp`
file_conf1=`mktemp`
file_conf2=`mktemp`
cat <<- EOF > $file_localconf
[[local|localrc]]
LOCALRC_VAR1=localrc_val1
LOCALRC_VAR2=localrc_val2
LOCALRC_VAR3=localrc_val3
[[post-config|$file_conf1]]
[conf1_t1]
conf1_t1_opt1=conf1_t1_val1
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt1=conf2_t1_val1
conf2_t1_opt2=conf2_t1_val2
conf2_t1_opt3=conf2_t1_val3
EOF
localconf_has_section $file_localconf post-config $file_conf1 conf1_t1
assert_equal $? 0
localconf_has_section $file_localconf post-config $file_conf1 conf1_t2
assert_equal $? 0
localconf_has_section $file_localconf post-config $file_conf1 conf1_t3
assert_equal $? 0
localconf_has_section $file_localconf post-extra $file_conf2 conf2_t1
assert_equal $? 0
localconf_has_section $file_localconf post-config $file_conf1 conf1_t4
assert_equal $? 1
localconf_has_section $file_localconf post-install $file_conf1 conf1_t1
assert_equal $? 1
localconf_has_section $file_localconf local localrc conf1_t2
assert_equal $? 1
rm -f $file_localconf $file_conf1 $file_conf2
}
# test that can determine if file has option in specified meta-section and section
function test_localconf_has_option {
local file_localconf
local file_conf1
local file_conf2
file_localconf=`mktemp`
file_conf1=`mktemp`
file_conf2=`mktemp`
cat <<- EOF > $file_localconf
[[post-config|$file_conf1]]
[conf1_t1]
conf1_t1_opt1 = conf1_t1_val1
conf1_t1_opt2 = conf1_t1_val2
conf1_t1_opt3 = conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[local|localrc]]
LOCALRC_VAR1=localrc_val1
LOCALRC_VAR2=localrc_val2
LOCALRC_VAR3=localrc_val3
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt1=conf2_t1_val1
conf2_t1_opt2=conf2_t1_val2
conf2_t1_opt3=conf2_t1_val3
EOF
localconf_has_option $file_localconf local localrc "" LOCALRC_VAR1
assert_equal $? 0
localconf_has_option $file_localconf local localrc "" LOCALRC_VAR2
assert_equal $? 0
localconf_has_option $file_localconf local localrc "" LOCALRC_VAR3
assert_equal $? 0
localconf_has_option $file_localconf post-config $file_conf1 conf1_t1 conf1_t1_opt1
assert_equal $? 0
localconf_has_option $file_localconf post-config $file_conf1 conf1_t2 conf1_t2_opt2
assert_equal $? 0
localconf_has_option $file_localconf post-config $file_conf1 conf1_t3 conf1_t3_opt3
assert_equal $? 0
localconf_has_option $file_localconf post-extra $file_conf2 conf2_t1 conf2_t1_opt2
assert_equal $? 0
localconf_has_option $file_localconf post-config $file_conf1 conf1_t1_opt4
assert_equal $? 1
localconf_has_option $file_localconf post-install $file_conf1 conf1_t1_opt1
assert_equal $? 1
localconf_has_option $file_localconf local localrc conf1_t2 conf1_t2_opt1
assert_equal $? 1
rm -f $file_localconf $file_conf1 $file_conf2
}
# test that update option in specified meta-section and section
function test_localconf_update_option {
local file_localconf
local file_localconf_expected
local file_conf1
local file_conf2
file_localconf=`mktemp`
file_localconf_expected=`mktemp`
file_conf1=`mktemp`
file_conf2=`mktemp`
cat <<- EOF > $file_localconf
[[local|localrc]]
LOCALRC_VAR1 = localrc_val1
LOCALRC_VAR2 = localrc_val2
LOCALRC_VAR3 = localrc_val3
[[post-config|$file_conf1]]
[conf1_t1]
conf1_t1_opt1=conf1_t1_val1
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt1=conf2_t1_val1
conf2_t1_opt2=conf2_t1_val2
conf2_t1_opt3=conf2_t1_val3
EOF
cat <<- EOF > $file_localconf_expected
[[local|localrc]]
LOCALRC_VAR1 = localrc_val1
LOCALRC_VAR2 = localrc_val2_update
LOCALRC_VAR3 = localrc_val3
[[post-config|$file_conf1]]
[conf1_t1]
conf1_t1_opt1=conf1_t1_val1_update
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2_update
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3_update
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt1=conf2_t1_val1
conf2_t1_opt2=conf2_t1_val2
conf2_t1_opt3=conf2_t1_val3_update
EOF
localconf_update_option "$SUDO" $file_localconf local localrc "" LOCALRC_VAR2 localrc_val2_update
localconf_update_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t1 conf1_t1_opt1 conf1_t1_val1_update
localconf_update_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t2 conf1_t2_opt2 conf1_t2_val2_update
localconf_update_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t3 conf1_t3_opt3 conf1_t3_val3_update
localconf_update_option "$SUDO" $file_localconf post-extra $file_conf2 conf2_t1 conf2_t1_opt3 conf2_t1_val3_update
result=`cat $file_localconf`
result_expected=`cat $file_localconf_expected`
assert_equal "$result" "$result_expected"
localconf_update_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t2 conf1_t3_opt1 conf1_t3_val1_update
localconf_update_option "$SUDO" $file_localconf post-extra $file_conf2 conf2_t1 conf2_t1_opt4 conf2_t1_val4_update
localconf_update_option "$SUDO" $file_localconf post-install $file_conf2 conf2_t1 conf2_t1_opt1 conf2_t1_val1_update
localconf_update_option "$SUDO" $file_localconf local localrc "" LOCALRC_VAR4 localrc_val4_update
result=`cat $file_localconf`
result_expected=`cat $file_localconf_expected`
assert_equal "$result" "$result_expected"
rm -f $file_localconf $file_localconf_expected $file_conf1 $file_conf2
}
# test that add option in specified meta-section and section
function test_localconf_add_option {
local file_localconf
local file_localconf_expected
local file_conf1
local file_conf2
file_localconf=`mktemp`
file_localconf_expected=`mktemp`
file_conf1=`mktemp`
file_conf2=`mktemp`
cat <<- EOF > $file_localconf
[[post-config|$file_conf1]]
[conf1_t1]
conf1_t1_opt1=conf1_t1_val1
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[local|localrc]]
LOCALRC_VAR1=localrc_val1
LOCALRC_VAR2=localrc_val2
LOCALRC_VAR3=localrc_val3
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt1 = conf2_t1_val1
conf2_t1_opt2 = conf2_t1_val2
conf2_t1_opt3 = conf2_t1_val3
EOF
cat <<- EOF > $file_localconf_expected
[[post-config|$file_conf1]]
[conf1_t1]
conf1_t1_opt4 = conf1_t1_val4
conf1_t1_opt1=conf1_t1_val1
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt4 = conf1_t2_val4
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt4 = conf1_t3_val4
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[local|localrc]]
LOCALRC_VAR4 = localrc_val4
LOCALRC_VAR1=localrc_val1
LOCALRC_VAR2=localrc_val2
LOCALRC_VAR3=localrc_val3
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt4 = conf2_t1_val4
conf2_t1_opt1 = conf2_t1_val1
conf2_t1_opt2 = conf2_t1_val2
conf2_t1_opt3 = conf2_t1_val3
EOF
localconf_add_option "$SUDO" $file_localconf local localrc "" LOCALRC_VAR4 localrc_val4
localconf_add_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t1 conf1_t1_opt4 conf1_t1_val4
localconf_add_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t2 conf1_t2_opt4 conf1_t2_val4
localconf_add_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t3 conf1_t3_opt4 conf1_t3_val4
localconf_add_option "$SUDO" $file_localconf post-extra $file_conf2 conf2_t1 conf2_t1_opt4 conf2_t1_val4
result=`cat $file_localconf`
result_expected=`cat $file_localconf_expected`
assert_equal "$result" "$result_expected"
localconf_add_option "$SUDO" $file_localconf local localrc.conf "" LOCALRC_VAR4 localrc_val4_update
localconf_add_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t4 conf1_t4_opt1 conf1_t4_val1
localconf_add_option "$SUDO" $file_localconf post-extra $file_conf2 conf2_t2 conf2_t2_opt4 conf2_t2_val4
localconf_add_option "$SUDO" $file_localconf post-install $file_conf2 conf2_t1 conf2_t1_opt4 conf2_t2_val4
result=`cat $file_localconf`
result_expected=`cat $file_localconf_expected`
assert_equal "$result" "$result_expected"
rm -f $file_localconf $file_localconf_expected $file_conf1 $file_conf2
}
# test that add section and option in specified meta-section
function test_localconf_add_section_and_option {
local file_localconf
local file_localconf_expected
local file_conf1
local file_conf2
file_localconf=`mktemp`
file_localconf_expected=`mktemp`
file_conf1=`mktemp`
file_conf2=`mktemp`
cat <<- EOF > $file_localconf
[[post-config|$file_conf1]]
[conf1_t1]
conf1_t1_opt1=conf1_t1_val1
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[local|localrc]]
LOCALRC_VAR1=localrc_val1
LOCALRC_VAR2=localrc_val2
LOCALRC_VAR3=localrc_val3
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt1=conf2_t1_val1
conf2_t1_opt2=conf2_t1_val2
conf2_t1_opt3=conf2_t1_val3
EOF
cat <<- EOF > $file_localconf_expected
[[post-config|$file_conf1]]
[conf1_t4]
conf1_t4_opt1 = conf1_t4_val1
[conf1_t1]
conf1_t1_opt1=conf1_t1_val1
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[local|localrc]]
LOCALRC_VAR1=localrc_val1
LOCALRC_VAR2=localrc_val2
LOCALRC_VAR3=localrc_val3
[[post-extra|$file_conf2]]
[conf2_t2]
conf2_t2_opt1 = conf2_t2_val1
[conf2_t1]
conf2_t1_opt1=conf2_t1_val1
conf2_t1_opt2=conf2_t1_val2
conf2_t1_opt3=conf2_t1_val3
EOF
localconf_add_section_and_option "$SUDO" $file_localconf post-config $file_conf1 conf1_t4 conf1_t4_opt1 conf1_t4_val1
localconf_add_section_and_option "$SUDO" $file_localconf post-extra $file_conf2 conf2_t2 conf2_t2_opt1 conf2_t2_val1
result=`cat $file_localconf`
result_expected=`cat $file_localconf_expected`
assert_equal "$result" "$result_expected"
localconf_add_section_and_option "$SUDO" $file_localconf post-install $file_conf2 conf2_t2 conf2_t2_opt1 conf2_t2_val1
result=`cat $file_localconf`
result_expected=`cat $file_localconf_expected`
assert_equal "$result" "$result_expected"
rm -f $file_localconf $file_localconf_expected $file_conf1 $file_conf2
}
# test that add section and option in specified meta-section
function test_localconf_set {
local file_localconf
local file_localconf_expected
local file_conf1
local file_conf2
file_localconf=`mktemp`
file_localconf_expected=`mktemp`
file_conf1=`mktemp`
file_conf2=`mktemp`
cat <<- EOF > $file_localconf
[[local|localrc]]
LOCALRC_VAR1=localrc_val1
LOCALRC_VAR2=localrc_val2
LOCALRC_VAR3=localrc_val3
[[post-config|$file_conf1]]
[conf1_t1]
conf1_t1_opt1=conf1_t1_val1
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt1=conf2_t1_val1
conf2_t1_opt2=conf2_t1_val2
conf2_t1_opt3=conf2_t1_val3
EOF
cat <<- EOF > $file_localconf_expected
[[local|localrc]]
LOCALRC_VAR1=localrc_val1
LOCALRC_VAR2=localrc_val2_update
LOCALRC_VAR3=localrc_val3
[[post-config|$file_conf1]]
[conf1_t4]
conf1_t4_opt1 = conf1_t4_val1
[conf1_t1]
conf1_t1_opt1=conf1_t1_val1
conf1_t1_opt2=conf1_t1_val2
conf1_t1_opt3=conf1_t1_val3
[conf1_t2]
conf1_t2_opt1=conf1_t2_val1
conf1_t2_opt2=conf1_t2_val2
conf1_t2_opt3=conf1_t2_val3
[conf1_t3]
conf1_t3_opt1=conf1_t3_val1
conf1_t3_opt2=conf1_t3_val2
conf1_t3_opt3=conf1_t3_val3
[[post-extra|$file_conf2]]
[conf2_t1]
conf2_t1_opt4 = conf2_t1_val4
conf2_t1_opt1=conf2_t1_val1
conf2_t1_opt2=conf2_t1_val2
conf2_t1_opt3=conf2_t1_val3
[[post-install|/etc/neutron/plugin/ml2/ml2_conf.ini]]
[ml2]
ml2_opt1 = ml2_val1
EOF
if [[ -n "$SUDO" ]]; then
SUDO_ARG="-sudo"
else
SUDO_ARG=""
fi
localconf_set $SUDO_ARG $file_localconf post-install /etc/neutron/plugin/ml2/ml2_conf.ini ml2 ml2_opt1 ml2_val1
localconf_set $SUDO_ARG $file_localconf local localrc "" LOCALRC_VAR2 localrc_val2_update
localconf_set $SUDO_ARG $file_localconf post-config $file_conf1 conf1_t4 conf1_t4_opt1 conf1_t4_val1
localconf_set $SUDO_ARG $file_localconf post-extra $file_conf2 conf2_t1 conf2_t1_opt4 conf2_t1_val4
result=`cat $file_localconf`
result_expected=`cat $file_localconf_expected`
assert_equal "$result" "$result_expected"
rm -f $file_localconf $file_localconf_expected $file_conf1 $file_conf2
}
test_localconf_has_section
test_localconf_has_option
test_localconf_update_option
test_localconf_add_option
test_localconf_add_section_and_option
test_localconf_set
+1 -1
View File
@@ -15,7 +15,7 @@
echo "Ensuring we don't have crazy refs"
REFS=`grep BRANCH stackrc | grep -v -- '-master'`
REFS=`grep BRANCH stackrc | grep -v -- '-master' | grep -v -- '-stable/mitaka'`
rc=$?
if [[ $rc -eq 0 ]]; then
echo "Branch defaults must be master. Found:"
+16
View File
@@ -7,6 +7,22 @@
# Warning: This script just for development purposes
set -o errexit
# short_source prints out the current location of the caller in a way
# that strips redundant directories. This is useful for PS4
# usage. Needed before we start tracing due to how we set
# PS4. Normally we'd pick this up from stackrc, but that's not sourced
# here.
function short_source {
saveIFS=$IFS
IFS=" "
called=($(caller 0))
IFS=$saveIFS
file=${called[2]}
file=${file#$RC_DIR/}
printf "%-40s " "$file:${called[1]}:${called[0]}"
}
set -o xtrace
ACCOUNT_DIR=./accrc
+7 -2
View File
@@ -11,7 +11,6 @@
# - if USE_PYTHON3=True, PYTHON3_VERSION refers to a version already installed
set -o errexit
set -o xtrace
# Keep track of the current directory
TOOLS_DIR=$(cd $(dirname "$0") && pwd)
@@ -23,6 +22,9 @@ cd $TOP_DIR
# Import common functions
source $TOP_DIR/stackrc
# don't start tracing until after we've sourced the world
set -o xtrace
FILES=$TOP_DIR/files
PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
@@ -132,6 +134,9 @@ if [[ -n $PYPI_ALTERNATIVE_URL ]]; then
fi
set -x
pip_install -U setuptools
# Note setuptools is part of requirements.txt and we want to make sure
# we obey any versioning as described there.
pip_install_gr setuptools
get_versions
+35 -8
View File
@@ -76,6 +76,31 @@ def _header(name):
print
def _bridge_list():
process = subprocess.Popen(['sudo', 'ovs-vsctl', 'list-br'],
stdout=subprocess.PIPE)
stdout, _ = process.communicate()
return stdout.split()
# This method gets a max openflow version supported by openvswitch.
# For example 'ovs-ofctl --version' displays the following:
#
# ovs-ofctl (Open vSwitch) 2.0.2
# Compiled Dec 9 2015 14:08:08
# OpenFlow versions 0x1:0x4
#
# The above shows that openvswitch supports from OpenFlow10 to OpenFlow13.
# This method gets max version searching 'OpenFlow versions 0x1:0x'.
# And return a version value converted to an integer type.
def _get_ofp_version():
process = subprocess.Popen(['ovs-ofctl', '--version'], stdout=subprocess.PIPE)
stdout, _ = process.communicate()
find_str = 'OpenFlow versions 0x1:0x'
offset = stdout.find(find_str)
return int(stdout[offset + len(find_str):-1]) - 1
def disk_space():
# the df output
_header("File System Summary")
@@ -139,15 +164,17 @@ def ovs_dump():
if not _find_cmd('ovs-vsctl'):
return
# NOTE(ihrachys): worlddump is used outside of devstack context (f.e. in
# grenade), so there is no single place to determine the bridge names from.
# Hardcode for now.
bridges = ('br-int', 'br-tun', 'br-ex')
bridges = _bridge_list()
ofctl_cmds = ('show', 'dump-ports-desc', 'dump-ports', 'dump-flows')
ofp_max = _get_ofp_version()
vers = 'OpenFlow10'
for i in range(1, ofp_max + 1):
vers += ',OpenFlow1' + str(i)
_dump_cmd("sudo ovs-vsctl show")
for bridge in bridges:
_dump_cmd("sudo ovs-ofctl show %s" % bridge)
for bridge in bridges:
_dump_cmd("sudo ovs-ofctl dump-flows %s" % bridge)
for ofctl_cmd in ofctl_cmds:
for bridge in bridges:
args = {'vers': vers, 'cmd': ofctl_cmd, 'bridge': bridge}
_dump_cmd("sudo ovs-ofctl --protocols=%(vers)s %(cmd)s %(bridge)s" % args)
def process_list():