Merge "Generate an IPv6 address when PUBLIC_BRIDGE does not have one"
diff --git a/doc/source/guides/neutron.rst b/doc/source/guides/neutron.rst
index 59b7a9d..dc2fc71 100644
--- a/doc/source/guides/neutron.rst
+++ b/doc/source/guides/neutron.rst
@@ -23,7 +23,7 @@
eth1 is manually configured at boot to not have an IP address.
Consult your operating system documentation for the appropriate
-technique. For Ubuntu, the contents of `/etc/networking/interfaces`
+technique. For Ubuntu, the contents of `/etc/network/interfaces`
contains:
::
diff --git a/functions b/functions
index f31a59a..c7a3b9d 100644
--- a/functions
+++ b/functions
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# functions - DevStack-specific functions
#
# The following variables are assumed to be defined by certain functions:
diff --git a/functions-common b/functions-common
index 24507fe..94ab347 100644
--- a/functions-common
+++ b/functions-common
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# functions-common - Common functions used by DevStack components
#
# The canonical copy of this file is maintained in the DevStack repo.
@@ -831,15 +833,14 @@
fi
# Gets user id
local user_id=$(
- # Gets user id
- $os_cmd user show $1 $domain -f value -c id 2>/dev/null ||
- # Creates new user
+ # Creates new user with --or-show
$os_cmd user create \
$1 \
--password "$2" \
--project $3 \
$email \
$domain \
+ --or-show \
-f value -c id
)
echo $user_id
@@ -856,10 +857,8 @@
os_cmd="$os_cmd --os-url=$KEYSTONE_SERVICE_URI/v3 --os-identity-api-version=3"
fi
local project_id=$(
- # Gets project id
- $os_cmd project show $1 $domain -f value -c id 2>/dev/null ||
- # Creates new project if not exists
- $os_cmd project create $1 $domain -f value -c id
+ # Creates new project with --or-show
+ $os_cmd project create $1 $domain --or-show -f value -c id
)
echo $project_id
}
@@ -868,10 +867,8 @@
# Usage: get_or_create_role <name>
function get_or_create_role {
local role_id=$(
- # Gets role id
- openstack role show $1 -f value -c id 2>/dev/null ||
- # Creates role if not exists
- openstack role create $1 -f value -c id
+ # Creates role with --or-show
+ openstack role create $1 --or-show -f value -c id
)
echo $role_id
}
@@ -1165,7 +1162,7 @@
if is_ubuntu; then
apt_get purge "$@"
elif is_fedora; then
- sudo yum remove -y "$@"
+ sudo $YUM remove -y "$@" ||:
elif is_suse; then
sudo zypper rm "$@"
else
@@ -1174,7 +1171,7 @@
}
# Wrapper for ``yum`` to set proxy environment variables
-# Uses globals ``OFFLINE``, ``*_proxy``
+# Uses globals ``OFFLINE``, ``*_proxy``, ``YUM``
# yum_install package [package ...]
function yum_install {
[[ "$OFFLINE" = "True" ]] && return
@@ -1186,7 +1183,7 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=965567
$sudo http_proxy=$http_proxy https_proxy=$https_proxy \
no_proxy=$no_proxy \
- yum install -y "$@" 2>&1 | \
+ $YUM install -y "$@" 2>&1 | \
awk '
BEGIN { fail=0 }
/No package/ { fail=1 }
@@ -1196,7 +1193,7 @@
# also ensure we catch a yum failure
if [[ ${PIPESTATUS[0]} != 0 ]]; then
- die $LINENO "Yum install failure"
+ die $LINENO "$YUM install failure"
fi
}
diff --git a/lib/apache b/lib/apache
index 2c43681..c7d69f2 100644
--- a/lib/apache
+++ b/lib/apache
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/apache
# Functions to control configuration and operation of apache web server
diff --git a/lib/ceilometer b/lib/ceilometer
index b43a4ed..1f480ea 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/ceilometer
# Install and start **Ceilometer** service
diff --git a/lib/ceph b/lib/ceph
index 5214306..3b62a91 100644
--- a/lib/ceph
+++ b/lib/ceph
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/ceph
# Functions to control the configuration and operation of the **Ceph** storage service
@@ -72,7 +74,7 @@
# ------------
function get_ceph_version {
- local ceph_version_str=$(sudo ceph daemon mon.$(hostname) version | cut -d '"' -f 4)
+ local ceph_version_str=$(sudo ceph daemon mon.$(hostname) version | cut -d '"' -f 4 | cut -f 1,2 -d '.')
echo $ceph_version_str
}
@@ -167,7 +169,7 @@
# pools data and metadata were removed in the Giant release so depending on the version we apply different commands
local ceph_version=$(get_ceph_version)
# change pool replica size according to the CEPH_REPLICAS set by the user
- if [[ ${ceph_version%.*} -eq 0 ]] && [[ ${ceph_version##*.} -lt 87 ]]; then
+ if [[ ${ceph_version%%.*} -eq 0 ]] && [[ ${ceph_version##*.} -lt 87 ]]; then
sudo ceph -c ${CEPH_CONF_FILE} osd pool set rbd size ${CEPH_REPLICAS}
sudo ceph -c ${CEPH_CONF_FILE} osd pool set data size ${CEPH_REPLICAS}
sudo ceph -c ${CEPH_CONF_FILE} osd pool set metadata size ${CEPH_REPLICAS}
diff --git a/lib/cinder b/lib/cinder
index 611e1ca..930119c 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder
# Install and start **Cinder** volume service
diff --git a/lib/cinder_backends/ceph b/lib/cinder_backends/ceph
index e9d2a02..415ce94 100644
--- a/lib/cinder_backends/ceph
+++ b/lib/cinder_backends/ceph
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_backends/ceph
# Configure the ceph backend
diff --git a/lib/cinder_backends/glusterfs b/lib/cinder_backends/glusterfs
index dd772a8..00c62e0 100644
--- a/lib/cinder_backends/glusterfs
+++ b/lib/cinder_backends/glusterfs
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_backends/glusterfs
# Configure the glusterfs backend
diff --git a/lib/cinder_backends/lvm b/lib/cinder_backends/lvm
index 8f8ab79..a3ab5bf 100644
--- a/lib/cinder_backends/lvm
+++ b/lib/cinder_backends/lvm
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_backends/lvm
# Configure the LVM backend
diff --git a/lib/cinder_backends/netapp_iscsi b/lib/cinder_backends/netapp_iscsi
index 7a67da7..be9442e 100644
--- a/lib/cinder_backends/netapp_iscsi
+++ b/lib/cinder_backends/netapp_iscsi
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_backends/netapp_iscsi
# Configure the NetApp iSCSI driver
diff --git a/lib/cinder_backends/netapp_nfs b/lib/cinder_backends/netapp_nfs
index d90b7f7..dc919ad 100644
--- a/lib/cinder_backends/netapp_nfs
+++ b/lib/cinder_backends/netapp_nfs
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_backends/netapp_nfs
# Configure the NetApp NFS driver
diff --git a/lib/cinder_backends/nfs b/lib/cinder_backends/nfs
index 7648788..fc51b2b 100644
--- a/lib/cinder_backends/nfs
+++ b/lib/cinder_backends/nfs
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_backends/nfs
# Configure the nfs backend
diff --git a/lib/cinder_backends/solidfire b/lib/cinder_backends/solidfire
index 95ffce1..7cc70fc 100644
--- a/lib/cinder_backends/solidfire
+++ b/lib/cinder_backends/solidfire
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_backends/solidfire
# Configure the solidfire driver
diff --git a/lib/cinder_backends/vmdk b/lib/cinder_backends/vmdk
index b32c4b2..d5b9453 100644
--- a/lib/cinder_backends/vmdk
+++ b/lib/cinder_backends/vmdk
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_backends/vmdk
# Configure the VMware vmdk backend
diff --git a/lib/cinder_backends/xiv b/lib/cinder_backends/xiv
index ee5da2d..6eadaae 100644
--- a/lib/cinder_backends/xiv
+++ b/lib/cinder_backends/xiv
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Copyright 2014 IBM Corp.
# Copyright (c) 2014 OpenStack Foundation
# All Rights Reserved.
@@ -82,4 +84,3 @@
# Local variables:
# mode: shell-script
# End:
-
diff --git a/lib/cinder_plugins/XenAPINFS b/lib/cinder_plugins/XenAPINFS
index fa10715..f730695 100644
--- a/lib/cinder_plugins/XenAPINFS
+++ b/lib/cinder_plugins/XenAPINFS
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_plugins/XenAPINFS
# Configure the XenAPINFS driver
diff --git a/lib/cinder_plugins/glusterfs b/lib/cinder_plugins/glusterfs
index b4196e4..35ceb27 100644
--- a/lib/cinder_plugins/glusterfs
+++ b/lib/cinder_plugins/glusterfs
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_plugins/glusterfs
# Configure the glusterfs driver
diff --git a/lib/cinder_plugins/nfs b/lib/cinder_plugins/nfs
index 5f4cc53..83b3993 100644
--- a/lib/cinder_plugins/nfs
+++ b/lib/cinder_plugins/nfs
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_plugins/nfs
# Configure the nfs driver
diff --git a/lib/cinder_plugins/sheepdog b/lib/cinder_plugins/sheepdog
index 30c60c6..ca343f7 100644
--- a/lib/cinder_plugins/sheepdog
+++ b/lib/cinder_plugins/sheepdog
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_plugins/sheepdog
# Configure the sheepdog driver
diff --git a/lib/cinder_plugins/vsphere b/lib/cinder_plugins/vsphere
index 436b060..f14ddf0 100644
--- a/lib/cinder_plugins/vsphere
+++ b/lib/cinder_plugins/vsphere
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/cinder_plugins/vsphere
# Configure the vsphere driver
diff --git a/lib/config b/lib/config
index a4d0328..c0756bf 100644
--- a/lib/config
+++ b/lib/config
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/config - Configuration file manipulation functions
# These functions have no external dependencies and the following side-effects:
diff --git a/lib/database b/lib/database
index e226515..366d2b3 100644
--- a/lib/database
+++ b/lib/database
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/database
# Interface for interacting with different database backends
diff --git a/lib/databases/mysql b/lib/databases/mysql
index eab1aa4..d39d966 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/databases/mysql
# Functions to control the configuration and operation of the **MySQL** database backend
diff --git a/lib/databases/postgresql b/lib/databases/postgresql
index fb6d304..76491c4 100644
--- a/lib/databases/postgresql
+++ b/lib/databases/postgresql
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/databases/postgresql
# Functions to control the configuration and operation of the **PostgreSQL** database backend
diff --git a/lib/dib b/lib/dib
index 30b31ec..177f4c1 100644
--- a/lib/dib
+++ b/lib/dib
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/dib
# Install and build images with **diskimage-builder**
diff --git a/lib/dstat b/lib/dstat
index 4ec10dc..8f456a8 100644
--- a/lib/dstat
+++ b/lib/dstat
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/dstat
# Functions to start and stop dstat
diff --git a/lib/gantt b/lib/gantt
index 485613f..5bd28c2 100644
--- a/lib/gantt
+++ b/lib/gantt
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/gantt
# Install and start **Gantt** scheduler service
diff --git a/lib/glance b/lib/glance
index 0970f94..8cda6be 100644
--- a/lib/glance
+++ b/lib/glance
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/glance
# Functions to control the configuration and operation of the **Glance** service
diff --git a/lib/heat b/lib/heat
index 3ed9a5f..49ed533 100644
--- a/lib/heat
+++ b/lib/heat
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/heat
# Install and start **Heat** service
@@ -251,17 +253,6 @@
get_or_create_role "heat_stack_user"
if [[ $HEAT_DEFERRED_AUTH == trusts ]]; then
-
- # heat_stack_owner role is given to users who create Heat stacks,
- # it's the default role used by heat to delegate to the heat service
- # user (for performing deferred operations via trusts), see heat.conf
- local heat_owner_role=$(get_or_create_role "heat_stack_owner")
-
- # Give the role to the demo and admin users so they can create stacks
- # in either of the projects created by devstack
- get_or_add_user_role $heat_owner_role demo demo
- get_or_add_user_role $heat_owner_role admin demo
- get_or_add_user_role $heat_owner_role admin admin
iniset $HEAT_CONF DEFAULT deferred_auth_method trusts
fi
diff --git a/lib/horizon b/lib/horizon
index 9fd1b85..3f3b1ca 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/horizon
# Functions to control the configuration and operation of the horizon service
diff --git a/lib/infra b/lib/infra
index cd439e7..57df07d 100644
--- a/lib/infra
+++ b/lib/infra
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/infra
#
# Functions to install infrastructure projects needed by other projects
diff --git a/lib/ironic b/lib/ironic
index 28f8fe8..571202d 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/ironic
# Functions to control the configuration and operation of the **Ironic** service
@@ -60,7 +62,7 @@
IRONIC_SSH_USERNAME=${IRONIC_SSH_USERNAME:-`whoami`}
IRONIC_SSH_KEY_DIR=${IRONIC_SSH_KEY_DIR:-$IRONIC_DATA_DIR/ssh_keys}
IRONIC_SSH_KEY_FILENAME=${IRONIC_SSH_KEY_FILENAME:-ironic_key}
-IRONIC_KEY_FILE=$IRONIC_SSH_KEY_DIR/$IRONIC_SSH_KEY_FILENAME
+IRONIC_KEY_FILE=${IRONIC_KEY_FILE:-$IRONIC_SSH_KEY_DIR/$IRONIC_SSH_KEY_FILENAME}
IRONIC_SSH_VIRT_TYPE=${IRONIC_SSH_VIRT_TYPE:-virsh}
IRONIC_TFTPBOOT_DIR=${IRONIC_TFTPBOOT_DIR:-$IRONIC_DATA_DIR/tftpboot}
IRONIC_TFTPSERVER_IP=${IRONIC_TFTPSERVER_IP:-$HOST_IP}
@@ -442,13 +444,6 @@
fi
}
-function is_ironic {
- if ( is_service_enabled ir-cond && is_service_enabled ir-api ); then
- return 0
- fi
- return 1
-}
-
function create_ovs_taps {
local ironic_net_id=$(neutron net-list | grep private | get_field 1)
@@ -460,7 +455,7 @@
# intentional sleep to make sure the tag has been set to port
sleep 10
- local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep tap | cut -d':' -f2 | cut -b2-)
+ local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -b2-)
local tag_id=$(sudo ovs-vsctl show |grep ${tapdev} -A1 -m1 | grep tag | cut -d':' -f2 | cut -b2-)
# make sure veth pair is not existing, otherwise delete its links
@@ -564,10 +559,8 @@
# we create the bare metal flavor with minimum value
local node_options="-i ipmi_address=$ipmi_address -i ipmi_password=$ironic_ipmi_passwd\
-i ipmi_username=$ironic_ipmi_username"
- if is_deployed_by_agent; then
- node_options+=" -i $_IRONIC_DEPLOY_KERNEL_KEY=$IRONIC_DEPLOY_KERNEL_ID"
- node_options+=" -i $_IRONIC_DEPLOY_RAMDISK_KEY=$IRONIC_DEPLOY_RAMDISK_ID"
- fi
+ node_options+=" -i $_IRONIC_DEPLOY_KERNEL_KEY=$IRONIC_DEPLOY_KERNEL_ID"
+ node_options+=" -i $_IRONIC_DEPLOY_RAMDISK_KEY=$IRONIC_DEPLOY_RAMDISK_ID"
fi
local node_id=$(ironic node-create --chassis_uuid $chassis_id \
@@ -591,11 +584,7 @@
local adjusted_disk=$(($ironic_node_disk - $ironic_ephemeral_disk))
nova flavor-create --ephemeral $ironic_ephemeral_disk baremetal 551 $ironic_node_ram $adjusted_disk $ironic_node_cpu
- # TODO(lucasagomes): Remove the 'baremetal:deploy_kernel_id'
- # and 'baremetal:deploy_ramdisk_id' parameters
- # from the flavor after the completion of
- # https://blueprints.launchpad.net/ironic/+spec/add-node-instance-info
- nova flavor-key baremetal set "cpu_arch"="x86_64" "baremetal:deploy_kernel_id"="$IRONIC_DEPLOY_KERNEL_ID" "baremetal:deploy_ramdisk_id"="$IRONIC_DEPLOY_RAMDISK_ID"
+ nova flavor-key baremetal set "cpu_arch"="x86_64"
if [ "$VIRT_DRIVER" == "ironic" ]; then
wait_for_nova_resources $total_nodes
@@ -632,15 +621,16 @@
}
function configure_ironic_ssh_keypair {
- # Generating ssh key pair for stack user
- if [[ ! -d $IRONIC_SSH_KEY_DIR ]]; then
- mkdir -p $IRONIC_SSH_KEY_DIR
- fi
if [[ ! -d $HOME/.ssh ]]; then
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
fi
- echo -e 'n\n' | ssh-keygen -q -t rsa -P '' -f $IRONIC_KEY_FILE
+ if [[ ! -e $IRONIC_KEY_FILE ]]; then
+ if [[ ! -d $(dirname $IRONIC_KEY_FILE) ]]; then
+ mkdir -p $(dirname $IRONIC_KEY_FILE)
+ fi
+ echo -e 'n\n' | ssh-keygen -q -t rsa -P '' -f $IRONIC_KEY_FILE
+ fi
cat $IRONIC_KEY_FILE.pub | tee -a $IRONIC_AUTHORIZED_KEYS_FILE
}
@@ -657,7 +647,7 @@
function configure_ironic_auxiliary {
configure_ironic_ssh_keypair
- ironic_ssh_check $IRONIC_SSH_KEY_DIR/$IRONIC_SSH_KEY_FILENAME $IRONIC_VM_SSH_ADDRESS $IRONIC_VM_SSH_PORT $IRONIC_SSH_USERNAME 10
+ ironic_ssh_check $IRONIC_KEY_FILE $IRONIC_VM_SSH_ADDRESS $IRONIC_VM_SSH_PORT $IRONIC_SSH_USERNAME 10
}
function build_ipa_coreos_ramdisk {
@@ -740,6 +730,9 @@
}
function prepare_baremetal_basic_ops {
+ if ! is_ironic_hardware; then
+ configure_ironic_auxiliary
+ fi
upload_baremetal_ironic_deploy
if ! is_ironic_hardware; then
create_bridge_and_vms
@@ -747,9 +740,6 @@
enroll_nodes
configure_tftpd
configure_iptables
- if ! is_ironic_hardware; then
- configure_ironic_auxiliary
- fi
}
function cleanup_baremetal_basic_ops {
diff --git a/lib/keystone b/lib/keystone
index 72a79be..9c0b013 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/keystone
# Functions to control the configuration and operation of **Keystone**
@@ -212,6 +214,7 @@
# Configure rabbitmq credentials
if is_service_enabled rabbit; then
+ iniset $KEYSTONE_CONF DEFAULT rabbit_userid $RABBIT_USERID
iniset $KEYSTONE_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $KEYSTONE_CONF DEFAULT rabbit_host $RABBIT_HOST
fi
diff --git a/lib/ldap b/lib/ldap
index 2a3ba64..d69d3f8 100644
--- a/lib/ldap
+++ b/lib/ldap
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/ldap
# Functions to control the installation and configuration of **ldap**
diff --git a/lib/neutron b/lib/neutron
index c1311db..8517102 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/neutron
# functions - functions specific to neutron
@@ -99,6 +101,9 @@
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
@@ -596,6 +601,18 @@
function install_neutron {
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
setup_develop $NEUTRON_DIR
+ if is_service_enabled q-fwaas; then
+ git_clone $NEUTRON_FWAAS_REPO $NEUTRON_FWAAS_DIR $NEUTRON_FWAAS_BRANCH
+ setup_develop $NEUTRON_FWAAS_DIR
+ fi
+ if is_service_enabled q-lbaas; then
+ 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
diff --git a/lib/neutron_plugins/bigswitch_floodlight b/lib/neutron_plugins/bigswitch_floodlight
index 9e84f2e..4166131 100644
--- a/lib/neutron_plugins/bigswitch_floodlight
+++ b/lib/neutron_plugins/bigswitch_floodlight
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neuton Big Switch/FloodLight plugin
# ------------------------------------
diff --git a/lib/neutron_plugins/brocade b/lib/neutron_plugins/brocade
index 511fb71..b8166d9 100644
--- a/lib/neutron_plugins/brocade
+++ b/lib/neutron_plugins/brocade
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Brocade Neutron Plugin
# ----------------------
diff --git a/lib/neutron_plugins/cisco b/lib/neutron_plugins/cisco
index 95e0ab3..b067aa6 100644
--- a/lib/neutron_plugins/cisco
+++ b/lib/neutron_plugins/cisco
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron Cisco plugin
# ---------------------------
diff --git a/lib/neutron_plugins/embrane b/lib/neutron_plugins/embrane
index 7dafdc0..6b4819e 100644
--- a/lib/neutron_plugins/embrane
+++ b/lib/neutron_plugins/embrane
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron Embrane plugin
# ---------------------------
diff --git a/lib/neutron_plugins/ibm b/lib/neutron_plugins/ibm
index 39b0040..3660a9f 100644
--- a/lib/neutron_plugins/ibm
+++ b/lib/neutron_plugins/ibm
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron IBM SDN-VE plugin
# ---------------------------
diff --git a/lib/neutron_plugins/linuxbridge_agent b/lib/neutron_plugins/linuxbridge_agent
index 2638dd3..ec17c01 100644
--- a/lib/neutron_plugins/linuxbridge_agent
+++ b/lib/neutron_plugins/linuxbridge_agent
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron Linux Bridge L2 agent
# -----------------------------
diff --git a/lib/neutron_plugins/midonet b/lib/neutron_plugins/midonet
index 6ccd502..eb27ed6 100644
--- a/lib/neutron_plugins/midonet
+++ b/lib/neutron_plugins/midonet
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron MidoNet plugin
# ----------------------
diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2
index f9a9774..e3b2c4d 100644
--- a/lib/neutron_plugins/ml2
+++ b/lib/neutron_plugins/ml2
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron Modular Layer 2 plugin
# ------------------------------
diff --git a/lib/neutron_plugins/nec b/lib/neutron_plugins/nec
index f8d98c3..3b1a257 100644
--- a/lib/neutron_plugins/nec
+++ b/lib/neutron_plugins/nec
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron NEC OpenFlow plugin
# ---------------------------
diff --git a/lib/neutron_plugins/nuage b/lib/neutron_plugins/nuage
index 70de8fa..7bce233 100644
--- a/lib/neutron_plugins/nuage
+++ b/lib/neutron_plugins/nuage
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Nuage Neutron Plugin
# ----------------------
diff --git a/lib/neutron_plugins/ofagent_agent b/lib/neutron_plugins/ofagent_agent
index 90b37f1..915badc 100644
--- a/lib/neutron_plugins/ofagent_agent
+++ b/lib/neutron_plugins/ofagent_agent
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# OpenFlow Agent plugin
# ----------------------
diff --git a/lib/neutron_plugins/oneconvergence b/lib/neutron_plugins/oneconvergence
index 4fd8c7c..48a368a 100644
--- a/lib/neutron_plugins/oneconvergence
+++ b/lib/neutron_plugins/oneconvergence
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron One Convergence plugin
# ------------------------------
diff --git a/lib/neutron_plugins/openvswitch b/lib/neutron_plugins/openvswitch
index 3b6567c..891ab49 100644
--- a/lib/neutron_plugins/openvswitch
+++ b/lib/neutron_plugins/openvswitch
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Common code used by cisco and embrane plugins
# ---------------------------------------------
diff --git a/lib/neutron_plugins/openvswitch_agent b/lib/neutron_plugins/openvswitch_agent
index e1a6f4a..2ab61b0 100644
--- a/lib/neutron_plugins/openvswitch_agent
+++ b/lib/neutron_plugins/openvswitch_agent
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron Open vSwitch L2 agent
# -----------------------------
diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base
index 07aa7cc..cde5298 100644
--- a/lib/neutron_plugins/ovs_base
+++ b/lib/neutron_plugins/ovs_base
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# common functions for ovs based plugin
# -------------------------------------
diff --git a/lib/neutron_plugins/plumgrid b/lib/neutron_plugins/plumgrid
index 7950ac0..0d711fe 100644
--- a/lib/neutron_plugins/plumgrid
+++ b/lib/neutron_plugins/plumgrid
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# PLUMgrid Neutron Plugin
# Edgar Magana emagana@plumgrid.com
# ------------------------------------
diff --git a/lib/neutron_plugins/services/firewall b/lib/neutron_plugins/services/firewall
index b5253db..a1c13ed 100644
--- a/lib/neutron_plugins/services/firewall
+++ b/lib/neutron_plugins/services/firewall
@@ -5,7 +5,7 @@
FW_XTRACE=$(set +o | grep xtrace)
set +o xtrace
-FWAAS_PLUGIN=neutron.services.firewall.fwaas_plugin.FirewallPlugin
+FWAAS_PLUGIN=neutron_fwaas.services.firewall.fwaas_plugin.FirewallPlugin
function neutron_fwaas_configure_common {
_neutron_service_plugin_class_add $FWAAS_PLUGIN
@@ -16,7 +16,7 @@
cp $NEUTRON_DIR/etc/fwaas_driver.ini $FWAAS_DRIVER_CONF_FILENAME
iniset_multiline $FWAAS_DRIVER_CONF_FILENAME fwaas enabled True
- iniset_multiline $FWAAS_DRIVER_CONF_FILENAME fwaas driver "neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver"
+ iniset_multiline $FWAAS_DRIVER_CONF_FILENAME fwaas driver "neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver"
}
function neutron_fwaas_stop {
diff --git a/lib/neutron_plugins/services/loadbalancer b/lib/neutron_plugins/services/loadbalancer
index f84b710..bd9dc87 100644
--- a/lib/neutron_plugins/services/loadbalancer
+++ b/lib/neutron_plugins/services/loadbalancer
@@ -7,7 +7,7 @@
AGENT_LBAAS_BINARY="$NEUTRON_BIN_DIR/neutron-lbaas-agent"
-LBAAS_PLUGIN=neutron.services.loadbalancer.plugin.LoadBalancerPlugin
+LBAAS_PLUGIN=neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin
function neutron_agent_lbaas_install_agent_packages {
if is_ubuntu || is_fedora || is_suse; then
diff --git a/lib/neutron_plugins/services/vpn b/lib/neutron_plugins/services/vpn
index 2478c47..07f1f35 100644
--- a/lib/neutron_plugins/services/vpn
+++ b/lib/neutron_plugins/services/vpn
@@ -7,7 +7,7 @@
AGENT_VPN_BINARY="$NEUTRON_BIN_DIR/neutron-vpn-agent"
-VPN_PLUGIN=${VPN_PLUGIN:-"neutron.services.vpn.plugin.VPNDriverPlugin"}
+VPN_PLUGIN=${VPN_PLUGIN:-"neutron_vpnaas.services.vpn.plugin.VPNDriverPlugin"}
IPSEC_PACKAGE=${IPSEC_PACKAGE:-"openswan"}
function neutron_vpn_install_agent_packages {
diff --git a/lib/neutron_plugins/vmware_nsx b/lib/neutron_plugins/vmware_nsx
index f4eb82d..4cbedd6 100644
--- a/lib/neutron_plugins/vmware_nsx
+++ b/lib/neutron_plugins/vmware_nsx
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Neutron VMware NSX plugin
# -------------------------
diff --git a/lib/neutron_thirdparty/bigswitch_floodlight b/lib/neutron_thirdparty/bigswitch_floodlight
index 033731e..e3f4689 100644
--- a/lib/neutron_thirdparty/bigswitch_floodlight
+++ b/lib/neutron_thirdparty/bigswitch_floodlight
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Big Switch/FloodLight OpenFlow Controller
# ------------------------------------------
diff --git a/lib/neutron_thirdparty/midonet b/lib/neutron_thirdparty/midonet
index 099a66e..2c82d48 100644
--- a/lib/neutron_thirdparty/midonet
+++ b/lib/neutron_thirdparty/midonet
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# MidoNet
# -------
diff --git a/lib/neutron_thirdparty/ryu b/lib/neutron_thirdparty/ryu
index eaf088b..1f78a21 100644
--- a/lib/neutron_thirdparty/ryu
+++ b/lib/neutron_thirdparty/ryu
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Ryu SDN Framework
# -----------------
diff --git a/lib/neutron_thirdparty/trema b/lib/neutron_thirdparty/trema
index 3e59ef2..075f013 100644
--- a/lib/neutron_thirdparty/trema
+++ b/lib/neutron_thirdparty/trema
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Trema Sliceable Switch
# ----------------------
diff --git a/lib/neutron_thirdparty/vmware_nsx b/lib/neutron_thirdparty/vmware_nsx
index 7a20c64..7027a29 100644
--- a/lib/neutron_thirdparty/vmware_nsx
+++ b/lib/neutron_thirdparty/vmware_nsx
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# VMware NSX
# ----------
diff --git a/lib/nova b/lib/nova
index 0e6c6af..cbfbdfa 100644
--- a/lib/nova
+++ b/lib/nova
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/nova
# Functions to control the configuration and operation of the **Nova** service
@@ -264,9 +266,6 @@
configure_nova_rootwrap
if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then
- # Remove legacy paste config if present
- rm -f $NOVA_DIR/bin/nova-api-paste.ini
-
# Get the sample configuration file in place
cp $NOVA_DIR/etc/nova/api-paste.ini $NOVA_CONF_DIR
@@ -588,8 +587,8 @@
fi
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF db sync
- $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=guest --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1
- $NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=guest --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1
+ $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1
+ $NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1
fi
}
diff --git a/lib/nova_plugins/functions-libvirt b/lib/nova_plugins/functions-libvirt
index d3c4eab..4601eea 100644
--- a/lib/nova_plugins/functions-libvirt
+++ b/lib/nova_plugins/functions-libvirt
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/nova_plugins/functions-libvirt
# Common libvirt configuration functions
diff --git a/lib/nova_plugins/hypervisor-fake b/lib/nova_plugins/hypervisor-fake
index dc93633..3180d91 100644
--- a/lib/nova_plugins/hypervisor-fake
+++ b/lib/nova_plugins/hypervisor-fake
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/nova_plugins/hypervisor-fake
# Configure the fake hypervisor
diff --git a/lib/nova_plugins/hypervisor-ironic b/lib/nova_plugins/hypervisor-ironic
index abf59b8..4c2043b 100644
--- a/lib/nova_plugins/hypervisor-ironic
+++ b/lib/nova_plugins/hypervisor-ironic
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/nova_plugins/hypervisor-ironic
# Configure the ironic hypervisor
diff --git a/lib/nova_plugins/hypervisor-libvirt b/lib/nova_plugins/hypervisor-libvirt
index 123ca82..b1b4400 100644
--- a/lib/nova_plugins/hypervisor-libvirt
+++ b/lib/nova_plugins/hypervisor-libvirt
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/nova_plugins/hypervisor-libvirt
# Configure the libvirt hypervisor
diff --git a/lib/nova_plugins/hypervisor-openvz b/lib/nova_plugins/hypervisor-openvz
index a1636ad..cce36b8 100644
--- a/lib/nova_plugins/hypervisor-openvz
+++ b/lib/nova_plugins/hypervisor-openvz
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/nova_plugins/hypervisor-openvz
# Configure the openvz hypervisor
diff --git a/lib/nova_plugins/hypervisor-vsphere b/lib/nova_plugins/hypervisor-vsphere
index 9933a3c..c406e09 100644
--- a/lib/nova_plugins/hypervisor-vsphere
+++ b/lib/nova_plugins/hypervisor-vsphere
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/nova_plugins/hypervisor-vsphere
# Configure the vSphere hypervisor
diff --git a/lib/nova_plugins/hypervisor-xenserver b/lib/nova_plugins/hypervisor-xenserver
index 0dba471..db19cc2 100644
--- a/lib/nova_plugins/hypervisor-xenserver
+++ b/lib/nova_plugins/hypervisor-xenserver
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/nova_plugins/hypervisor-xenserver
# Configure the XenServer hypervisor
diff --git a/lib/opendaylight b/lib/opendaylight
index 831329a..936a17c 100644
--- a/lib/opendaylight
+++ b/lib/opendaylight
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/opendaylight
# Functions to control the configuration and operation of the opendaylight service
diff --git a/lib/oslo b/lib/oslo
index 1fff1f5..31c9d34 100644
--- a/lib/oslo
+++ b/lib/oslo
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/oslo
#
# Functions to install oslo libraries from git
@@ -36,6 +38,7 @@
GITDIR["pycadf"]=$DEST/pycadf
GITDIR["stevedore"]=$DEST/stevedore
GITDIR["taskflow"]=$DEST/taskflow
+GITDIR["tooz"]=$DEST/tooz
# Support entry points installation of console scripts
OSLO_BIN_DIR=$(get_python_exec_prefix)
@@ -69,6 +72,7 @@
_do_install_oslo_lib "pycadf"
_do_install_oslo_lib "stevedore"
_do_install_oslo_lib "taskflow"
+ _do_install_oslo_lib "tooz"
}
# Restore xtrace
diff --git a/lib/rpc_backend b/lib/rpc_backend
index 14c78fb..6afec37 100644
--- a/lib/rpc_backend
+++ b/lib/rpc_backend
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/rpc_backend
# Interface for interactig with different rpc backend
# rpc backend settings
@@ -5,7 +7,7 @@
# Dependencies:
#
# - ``functions`` file
-# - ``RABBIT_{HOST|PASSWORD}`` must be defined when RabbitMQ is used
+# - ``RABBIT_{HOST|PASSWORD|USERID}`` must be defined when RabbitMQ is used
# - ``RPC_MESSAGING_PROTOCOL`` option for configuring the messaging protocol
# ``stack.sh`` calls the entry points in this order:
@@ -66,6 +68,9 @@
function cleanup_rpc_backend {
if is_service_enabled rabbit; then
# Obliterate rabbitmq-server
+ if [ -n "$RABBIT_USERID" ]; then
+ sudo rabbitmqctl delete_user "$RABBIT_USERID"
+ fi
uninstall_package rabbitmq-server
sudo killall epmd || sudo killall -9 epmd
if is_ubuntu; then
@@ -178,15 +183,16 @@
# service is not started by default
restart_service rabbitmq-server
fi
+ rabbit_setuser "$RABBIT_USERID" "$RABBIT_PASSWORD"
# change the rabbit password since the default is "guest"
- sudo rabbitmqctl change_password guest $RABBIT_PASSWORD && break
+ sudo rabbitmqctl change_password $RABBIT_USERID $RABBIT_PASSWORD && break
[[ $i -eq "10" ]] && die $LINENO "Failed to set rabbitmq password"
done
if is_service_enabled n-cell; then
# Add partitioned access for the child cell
if [ -z `sudo rabbitmqctl list_vhosts | grep child_cell` ]; then
sudo rabbitmqctl add_vhost child_cell
- sudo rabbitmqctl set_permissions -p child_cell guest ".*" ".*" ".*"
+ sudo rabbitmqctl set_permissions -p child_cell $RABBIT_USERID ".*" ".*" ".*"
fi
fi
elif is_service_enabled qpid; then
@@ -223,6 +229,7 @@
iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_kombu
iniset $file $section rabbit_hosts $RABBIT_HOST
iniset $file $section rabbit_password $RABBIT_PASSWORD
+ iniset $file $section rabbit_userid $RABBIT_USERID
fi
}
@@ -237,6 +244,21 @@
( ! is_suse )
}
+function rabbit_setuser {
+ local user="$1" pass="$2" found="" out=""
+ out=$(sudo rabbitmqctl list_users) ||
+ { echo "failed to list users" 1>&2; return 1; }
+ found=$(echo "$out" | awk '$1 == user { print $1 }' "user=$user")
+ if [ "$found" = "$user" ]; then
+ sudo rabbitmqctl change_password "$user" "$pass" ||
+ { echo "failed changing pass for '$user'" 1>&2; return 1; }
+ else
+ sudo rabbitmqctl add_user "$user" "$pass" ||
+ { echo "failed changing pass for $user"; return 1; }
+ fi
+ sudo rabbitmqctl set_permissions "$user" ".*" ".*" ".*"
+}
+
# Set up the various configuration files used by the qpidd broker
function _configure_qpid {
diff --git a/lib/sahara b/lib/sahara
index 4f1ba22..c902d38 100644
--- a/lib/sahara
+++ b/lib/sahara
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/sahara
# Dependencies:
diff --git a/lib/stackforge b/lib/stackforge
index 2d80dad..cc3a689 100644
--- a/lib/stackforge
+++ b/lib/stackforge
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/stackforge
#
# Functions to install stackforge libraries that we depend on so
diff --git a/lib/swift b/lib/swift
index 9e61331..41f9e84 100644
--- a/lib/swift
+++ b/lib/swift
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/swift
# Functions to control the configuration and operation of the **Swift** service
diff --git a/lib/tempest b/lib/tempest
index 46c9e26..6fc157f 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/tempest
# Install and configure Tempest
@@ -63,6 +65,7 @@
BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-${CIRROS_VERSION}"
+BOTO_CONF=$TEMPEST_DIR/boto.cfg
# Cinder/Volume variables
TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
@@ -78,6 +81,18 @@
# Functions
# ---------
+# remove_disabled_extension - removes disabled extensions from the list of extensions
+# to test for a given service
+function remove_disabled_extensions {
+ local extensions_list=$1
+ shift
+ local disabled_exts=$*
+ for ext_to_remove in ${disabled_exts//,/ } ; do
+ extensions_list=${extensions_list/$ext_to_remove","}
+ done
+ echo $extensions_list
+}
+
# configure_tempest() - Set config files, create data dirs, etc
function configure_tempest {
setup_develop $TEMPEST_DIR
@@ -247,7 +262,7 @@
fi
fi
- iniset $TEMPEST_CONF DEFAULT use_syslog $SYSLOG
+ iniset $TEMPEST_CONFIG DEFAULT use_syslog $SYSLOG
# Oslo
iniset $TEMPEST_CONFIG DEFAULT lock_path $TEMPEST_STATE_PATH
mkdir -p $TEMPEST_STATE_PATH
@@ -284,8 +299,10 @@
iniset $TEMPEST_CONFIG image http_image $TEMPEST_HTTP_IMAGE
fi
+ # Auth
+ iniset $TEMPEST_CONFIG auth allow_tenant_isolation ${TEMPEST_ALLOW_TENANT_ISOLATION:-True}
+
# Compute
- iniset $TEMPEST_CONFIG compute allow_tenant_isolation ${TEMPEST_ALLOW_TENANT_ISOLATION:-True}
iniset $TEMPEST_CONFIG compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED
iniset $TEMPEST_CONFIG compute network_for_ssh $PRIVATE_NETWORK_NAME
iniset $TEMPEST_CONFIG compute ip_version_for_ssh 4
@@ -299,12 +316,24 @@
iniset $TEMPEST_CONFIG compute ssh_connect_method $ssh_connect_method
# Compute Features
+ # Run verify_tempest_config -ur to retrieve enabled extensions on API endpoints
+ # NOTE(mtreinish): This must be done after auth settings are added to the tempest config
+ local tmp_cfg_file=$(mktemp)
+ $TEMPEST_DIR/tempest/cmd/verify_tempest_config.py -uro $tmp_cfg_file
+
+ local compute_api_extensions=${COMPUTE_API_EXTENSIONS:-"all"}
+ if [[ ! -z "$DISABLE_COMPUTE_API_EXTENSIONS" ]]; then
+ # Enabled extensions are either the ones explicitly specified or those available on the API endpoint
+ compute_api_extensions=${COMPUTE_API_EXTENSIONS:-$(iniget $tmp_cfg_file compute-feature-enabled api_extensions | tr -d " ")}
+ # Remove disabled extensions
+ compute_api_extensions=$(remove_disabled_extensions $compute_api_extensions $DISABLE_COMPUTE_API_EXTENSIONS)
+ fi
+
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
iniset $TEMPEST_CONFIG compute-feature-enabled block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
- iniset $TEMPEST_CONFIG compute-feature-enabled api_extensions ${COMPUTE_API_EXTENSIONS:-"all"}
- iniset $TEMPEST_CONFIG compute-feature-disabled api_extensions ${DISABLE_COMPUTE_API_EXTENSIONS}
+ iniset $TEMPEST_CONFIG compute-feature-enabled api_extensions $compute_api_extensions
# Compute admin
iniset $TEMPEST_CONFIG "compute-admin" username $ADMIN_USERNAME
@@ -319,8 +348,15 @@
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"
- iniset $TEMPEST_CONFIG network-feature-enabled api_extensions ${NETWORK_API_EXTENSIONS:-"all"}
- iniset $TEMPEST_CONFIG network-feature-disabled api_extensions ${DISABLE_NETWORK_API_EXTENSIONS}
+
+ local network_api_extensions=${NETWORK_API_EXTENSIONS:-"all"}
+ 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 " ")}
+ # Remove disabled extensions
+ network_api_extensions=$(remove_disabled_extensions $network_api_extensions $DISABLE_NETWORK_API_EXTENSIONS)
+ fi
+ iniset $TEMPEST_CONFIG network-feature-enabled api_extensions $network_api_extensions
# boto
iniset $TEMPEST_CONFIG boto ec2_url "$EC2_SERVICE_PROTOCOL://$SERVICE_HOST:8773/services/Cloud"
@@ -362,12 +398,25 @@
iniset $TEMPEST_CONFIG telemetry too_slow_to_test "False"
# Object storage
- iniset $TEMPEST_CONFIG object-storage-feature-enabled discoverable_apis ${OBJECT_STORAGE_API_EXTENSIONS:-"all"}
- iniset $TEMPEST_CONFIG object-storage-feature-disabled discoverable_apis ${OBJECT_STORAGE_DISABLE_API_EXTENSIONS}
+ local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-"all"}
+ 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 " ")}
+ # Remove disabled extensions
+ object_storage_api_extensions=$(remove_disabled_extensions $object_storage_api_extensions $DISABLE_STORAGE_API_EXTENSIONS)
+ fi
+ iniset $TEMPEST_CONFIG object-storage-feature-enabled discoverable_apis $object_storage_api_extensions
# Volume
- iniset $TEMPEST_CONFIG volume-feature-enabled api_extensions ${VOLUME_API_EXTENSIONS:-"all"}
- iniset $TEMPEST_CONFIG volume-feature-disabled api_extensions ${DISABLE_VOLUME_API_EXTENSIONS}
+ local volume_api_extensions=${VOLUME_API_EXTENSIONS:-"all"}
+ 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 " ")}
+ # Remove disabled extensions
+ volume_api_extensions=$(remove_disabled_extensions $volume_api_extensions $DISABLE_VOLUME_API_EXTENSIONS)
+ fi
+ iniset $TEMPEST_CONFIG volume-feature-enabled api_extensions $volume_api_extensions
+
if ! is_service_enabled c-bak; then
iniset $TEMPEST_CONFIG volume-feature-enabled backup False
fi
@@ -389,8 +438,8 @@
iniset $TEMPEST_CONFIG volume vendor_name "$TEMPEST_VOLUME_VENDOR"
fi
if [ $TEMPEST_VOLUME_DRIVER != "default" -o \
- $TEMPEST_STORAGE_PROTOCOL != $TEMPEST_DEFAULT_STORAGE_PROTOCOL ]; then
- iniset $TEMPEST_CONFIG volume storage_protocol $TEMPEST_STORAGE_PROTOCOL
+ "$TEMPEST_STORAGE_PROTOCOL" != "$TEMPEST_DEFAULT_STORAGE_PROTOCOL" ]; then
+ iniset $TEMPEST_CONFIG volume storage_protocol "$TEMPEST_STORAGE_PROTOCOL"
fi
# Dashboard
@@ -424,6 +473,12 @@
fi
done
+ if is_ssl_enabled_service "keystone" || is_service_enabled tls-proxy; then
+ # Use the BOTO_CONFIG environment variable to point to this file
+ iniset $BOTO_CONF Boto ca_certificates_file $SSL_BUNDLE_FILE
+ sudo chown $STACK_USER $BOTO_CONF
+ fi
+
# Restore IFS
IFS=$ifs
}
diff --git a/lib/template b/lib/template
index f77409b..2703788 100644
--- a/lib/template
+++ b/lib/template
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/template
# Functions to control the configuration and operation of the XXXX service
# <do not include this template file in ``stack.sh``!>
diff --git a/lib/tls b/lib/tls
index fdb798f..677895b 100644
--- a/lib/tls
+++ b/lib/tls
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/tls
# Functions to control the configuration and operation of the TLS proxy service
diff --git a/lib/trove b/lib/trove
index 60b2bdb..4149b0d 100644
--- a/lib/trove
+++ b/lib/trove
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/trove
# Functions to control the configuration and operation of the **Trove** service
@@ -132,6 +134,7 @@
rm -f $TROVE_CONF_DIR/trove-taskmanager.conf
rm -f $TROVE_CONF_DIR/trove-conductor.conf
+ iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_userid $RABBIT_USERID
iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $TROVE_CONF_DIR/trove.conf DEFAULT sql_connection `database_connection_url trove`
iniset $TROVE_CONF_DIR/trove.conf DEFAULT default_datastore $TROVE_DATASTORE_TYPE
@@ -143,6 +146,7 @@
if is_service_enabled tr-tmgr; then
TROVE_AUTH_ENDPOINT=$KEYSTONE_AUTH_URI/v$IDENTITY_API_VERSION
+ iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_userid $RABBIT_USERID
iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT sql_connection `database_connection_url trove`
iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT taskmanager_manager trove.taskmanager.manager.Manager
@@ -155,6 +159,7 @@
# (Re)create trove conductor conf file if needed
if is_service_enabled tr-cond; then
+ iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_userid $RABBIT_USERID
iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT sql_connection `database_connection_url trove`
iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT nova_proxy_admin_user radmin
@@ -166,6 +171,7 @@
fi
# Set up Guest Agent conf
+ iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_userid $RABBIT_USERID
iniset $TROVE_CONF_DIR/trove-guestagent.conf DEFAULT rabbit_host $TROVE_HOST_GATEWAY
iniset $TROVE_CONF_DIR/trove-guestagent.conf DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $TROVE_CONF_DIR/trove-guestagent.conf DEFAULT nova_proxy_admin_user radmin
diff --git a/lib/zaqar b/lib/zaqar
index 22ef5ef..0d1f6f4 100644
--- a/lib/zaqar
+++ b/lib/zaqar
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# lib/zaqar
# Install and start **Zaqar** service
diff --git a/stack.sh b/stack.sh
index cd1c200..d97139a 100755
--- a/stack.sh
+++ b/stack.sh
@@ -643,6 +643,7 @@
# Rabbit connection info
if is_service_enabled rabbit; then
+ RABBIT_USERID=${RABBIT_USERID:-stackrabbit}
RABBIT_HOST=${RABBIT_HOST:-$SERVICE_HOST}
read_password RABBIT_PASSWORD "ENTER A PASSWORD TO USE FOR RABBIT."
fi
@@ -780,7 +781,7 @@
git_clone_by_name "python-openstackclient"
setup_dev_lib "python-openstackclient"
else
- pip_install python-openstackclient
+ pip_install 'python-openstackclient>=1.0.0'
fi
diff --git a/stackrc b/stackrc
index ac79889..b154297 100644
--- a/stackrc
+++ b/stackrc
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# stackrc
#
# Find the other rc files
@@ -185,6 +187,18 @@
NEUTRON_REPO=${NEUTRON_REPO:-${GIT_BASE}/openstack/neutron.git}
NEUTRON_BRANCH=${NEUTRON_BRANCH:-master}
+# neutron fwaas service
+NEUTRON_FWAAS_REPO=${NEUTRON_FWAAS_REPO:-${GIT_BASE}/openstack/neutron-fwaas.git}
+NEUTRON_FWAAS_BRANCH=${NEUTRON_FWAAS_BRANCH:-master}
+
+# 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}
+
# compute service
NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
NOVA_BRANCH=${NOVA_BRANCH:-master}
@@ -346,6 +360,10 @@
GITREPO["taskflow"]=${TASKFLOW_REPO:-${GIT_BASE}/openstack/taskflow.git}
GITBRANCH["taskflow"]=${TASKFLOW_BRANCH:-master}
+# tooz plugin manager
+GITREPO["tooz"]=${TOOZ_REPO:-${GIT_BASE}/openstack/tooz.git}
+GITBRANCH["tooz"]=${TOOZ_BRANCH:-master}
+
# pbr drives the setuptools configs
GITREPO["pbr"]=${PBR_REPO:-${GIT_BASE}/openstack-dev/pbr.git}
GITBRANCH["pbr"]=${PBR_BRANCH:-master}
@@ -621,6 +639,12 @@
# Service startup timeout
SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60}
+# Support alternative yum -- in future Fedora 'dnf' will become the
+# only supported installer, but for now 'yum' and 'dnf' are both
+# available in parallel with compatible CLIs. Allow manual switching
+# till we get to the point we need to handle this automatically
+YUM=${YUM:-yum}
+
# Following entries need to be last items in file
# Local variables:
diff --git a/tests/test_libs_from_pypi.sh b/tests/test_libs_from_pypi.sh
index 1b576d8..7e96bae 100755
--- a/tests/test_libs_from_pypi.sh
+++ b/tests/test_libs_from_pypi.sh
@@ -27,7 +27,7 @@
fi
done
-ALL_LIBS="python-novaclient oslo.config pbr oslo.context python-troveclient python-keystoneclient taskflow oslo.middleware pycadf python-glanceclient python-ironicclient tempest-lib oslo.messaging oslo.log cliff python-heatclient stevedore python-cinderclient glance_store oslo.concurrency oslo.db oslo.vmware keystonemiddleware oslo.serialization python-saharaclient django_openstack_auth python-openstackclient oslo.rootwrap oslo.i18n python-ceilometerclient oslo.utils python-swiftclient python-neutronclient"
+ALL_LIBS="python-novaclient oslo.config pbr oslo.context python-troveclient python-keystoneclient taskflow oslo.middleware pycadf python-glanceclient python-ironicclient tempest-lib oslo.messaging oslo.log cliff python-heatclient stevedore python-cinderclient glance_store oslo.concurrency oslo.db oslo.vmware keystonemiddleware oslo.serialization python-saharaclient django_openstack_auth python-openstackclient oslo.rootwrap oslo.i18n python-ceilometerclient oslo.utils python-swiftclient python-neutronclient tooz"
# Generate the above list with
# echo ${!GITREPO[@]}
diff --git a/tools/upload_image.sh b/tools/upload_image.sh
index d81a5c8..5d23f31 100755
--- a/tools/upload_image.sh
+++ b/tools/upload_image.sh
@@ -37,6 +37,7 @@
# Glance connection info. Note the port must be specified.
GLANCE_HOSTPORT=${GLANCE_HOSTPORT:-$GLANCE_HOST:9292}
+GLANCE_SERVICE_PROTOCOL=${GLANCE_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
for IMAGE in "$*"; do
upload_image $IMAGE $TOKEN
diff --git a/tools/xen/functions b/tools/xen/functions
index c8efd57..4e9fede 100644
--- a/tools/xen/functions
+++ b/tools/xen/functions
@@ -10,7 +10,7 @@
}
function xapi_plugin_location {
- for PLUGIN_DIR in "/etc/xapi.d/plugins/" "/usr/lib/xcp/plugins/" "/usr/lib/xapi/plugins"; do
+ for PLUGIN_DIR in "/etc/xapi.d/plugins/" "/usr/lib/xcp/plugins/" "/usr/lib/xapi/plugins" "/usr/lib64/xapi/plugins"; do
if [ -d $PLUGIN_DIR ]; then
echo $PLUGIN_DIR
return 0