Merge "Fix option for metadata access in nicira neutron plugin"
diff --git a/files/apts/cinder b/files/apts/cinder
index c45b97f..32cb3a0 100644
--- a/files/apts/cinder
+++ b/files/apts/cinder
@@ -1,3 +1,5 @@
tgt
lvm2
qemu-utils
+libpq-dev
+python-dev
diff --git a/files/default_catalog.templates b/files/default_catalog.templates
index 1ecf890..277904a 100644
--- a/files/default_catalog.templates
+++ b/files/default_catalog.templates
@@ -24,6 +24,12 @@
catalog.RegionOne.volume.name = Volume Service
+catalog.RegionOne.volumev2.publicURL = http://%SERVICE_HOST%:8776/v2/$(tenant_id)s
+catalog.RegionOne.volumev2.adminURL = http://%SERVICE_HOST%:8776/v2/$(tenant_id)s
+catalog.RegionOne.volumev2.internalURL = http://%SERVICE_HOST%:8776/v2/$(tenant_id)s
+catalog.RegionOne.volumev2.name = Volume Service V2
+
+
catalog.RegionOne.ec2.publicURL = http://%SERVICE_HOST%:8773/services/Cloud
catalog.RegionOne.ec2.adminURL = http://%SERVICE_HOST%:8773/services/Admin
catalog.RegionOne.ec2.internalURL = http://%SERVICE_HOST%:8773/services/Cloud
diff --git a/files/rpms-suse/cinder b/files/rpms-suse/cinder
index 8f4a5a7..49e2cb8 100644
--- a/files/rpms-suse/cinder
+++ b/files/rpms-suse/cinder
@@ -1,3 +1,5 @@
lvm2
tgt
qemu-tools
+python-devel
+postgresql-devel
diff --git a/files/rpms/cinder b/files/rpms/cinder
index 19dedff..699f2fc 100644
--- a/files/rpms/cinder
+++ b/files/rpms/cinder
@@ -1,3 +1,5 @@
lvm2
scsi-target-utils
qemu-img
+python-devel
+postgresql-devel
diff --git a/functions b/functions
index e9c6061..c9b94c1 100644
--- a/functions
+++ b/functions
@@ -387,8 +387,9 @@
# CentOS release 5.5 (Final)
# CentOS Linux release 6.0 (Final)
# Fedora release 16 (Verne)
+ # XenServer release 6.2.0-70446c (xenenterprise)
os_CODENAME=""
- for r in "Red Hat" CentOS Fedora; do
+ for r in "Red Hat" CentOS Fedora XenServer; do
os_VENDOR=$r
if [[ -n "`grep \"$r\" /etc/redhat-release`" ]]; then
ver=`sed -e 's/^.* \(.*\) (\(.*\)).*$/\1\|\2/' /etc/redhat-release`
@@ -451,6 +452,8 @@
elif [[ "$os_VENDOR" =~ (Red Hat) || "$os_VENDOR" =~ (CentOS) ]]; then
# Drop the . release as we assume it's compatible
DISTRO="rhel${os_RELEASE::1}"
+ elif [[ "$os_VENDOR" =~ (XenServer) ]]; then
+ DISTRO="xs$os_RELEASE"
else
# Catch-all for now is Vendor + Release + Update
DISTRO="$os_VENDOR-$os_RELEASE.$os_UPDATE"
@@ -944,13 +947,9 @@
CMD_PIP=$(get_pip_command)
fi
- if is_fedora && [[ $DISTRO =~ (rhel6) ]]; then
- # RHEL6 pip by default doesn't have this (was introduced
- # around 0.8.1 or so)
- PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-False}
- else
- PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-True}
- fi
+ # Mirror option not needed anymore because pypi has CDN available,
+ # but it's useful in certain circumstances
+ PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-False}
if [[ "$PIP_USE_MIRRORS" != "False" ]]; then
PIP_MIRROR_OPT="--use-mirrors"
fi
diff --git a/lib/cinder b/lib/cinder
index 14950c7..54cf844 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -212,7 +212,7 @@
cp $CINDER_DIR/etc/cinder/cinder.conf.sample $CINDER_CONF
iniset $CINDER_CONF DEFAULT auth_strategy keystone
- iniset $CINDER_CONF DEFAULT debug True
+ iniset $CINDER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $CINDER_CONF DEFAULT verbose True
if [ "$CINDER_MULTI_LVM_BACKEND" = "True" ]; then
iniset $CINDER_CONF DEFAULT enabled_backends lvmdriver-1,lvmdriver-2
@@ -287,6 +287,14 @@
CINDER_GLUSTERFS_SHARES=$(echo $CINDER_GLUSTERFS_SHARES | tr ";" "\n")
echo "$CINDER_GLUSTERFS_SHARES" > $CINDER_CONF_DIR/glusterfs_shares
fi
+ elif [ "$CINDER_DRIVER" == "vsphere" ]; then
+ echo_summary "Using VMware vCenter driver"
+ iniset $CINDER_CONF DEFAULT enabled_backends vmware
+ iniset $CINDER_CONF vmware host_ip "$VMWAREAPI_IP"
+ iniset $CINDER_CONF vmware host_username "$VMWAREAPI_USER"
+ iniset $CINDER_CONF vmware host_password "$VMWAREAPI_PASSWORD"
+ iniset $CINDER_CONF vmware cluster_name "$VMWAREAPI_CLUSTER"
+ iniset $CINDER_CONF vmware volume_driver "cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver"
fi
if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
@@ -343,6 +351,18 @@
--publicurl "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \
--adminurl "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \
--internalurl "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s"
+ CINDER_V2_SERVICE=$(keystone service-create \
+ --name=cinder \
+ --type=volumev2 \
+ --description="Cinder Volume Service V2" \
+ | grep " id " | get_field 2)
+ keystone endpoint-create \
+ --region RegionOne \
+ --service_id $CINDER_V2_SERVICE \
+ --publicurl "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(tenant_id)s" \
+ --adminurl "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(tenant_id)s" \
+ --internalurl "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(tenant_id)s"
+
fi
fi
}
diff --git a/lib/glance b/lib/glance
index 583f879..a18189f 100644
--- a/lib/glance
+++ b/lib/glance
@@ -71,7 +71,7 @@
# Copy over our glance configurations and update them
cp $GLANCE_DIR/etc/glance-registry.conf $GLANCE_REGISTRY_CONF
- iniset $GLANCE_REGISTRY_CONF DEFAULT debug True
+ iniset $GLANCE_REGISTRY_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
inicomment $GLANCE_REGISTRY_CONF DEFAULT log_file
local dburl=`database_connection_url glance`
iniset $GLANCE_REGISTRY_CONF DEFAULT sql_connection $dburl
@@ -87,7 +87,7 @@
iniset $GLANCE_REGISTRY_CONF keystone_authtoken signing_dir $GLANCE_AUTH_CACHE_DIR/registry
cp $GLANCE_DIR/etc/glance-api.conf $GLANCE_API_CONF
- iniset $GLANCE_API_CONF DEFAULT debug True
+ iniset $GLANCE_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
inicomment $GLANCE_API_CONF DEFAULT log_file
iniset $GLANCE_API_CONF DEFAULT sql_connection $dburl
iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG
@@ -123,7 +123,7 @@
cp -p $GLANCE_DIR/etc/glance-api-paste.ini $GLANCE_API_PASTE_INI
cp $GLANCE_DIR/etc/glance-cache.conf $GLANCE_CACHE_CONF
- iniset $GLANCE_CACHE_CONF DEFAULT debug True
+ iniset $GLANCE_CACHE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
inicomment $GLANCE_CACHE_CONF DEFAULT log_file
iniset $GLANCE_CACHE_CONF DEFAULT use_syslog $SYSLOG
iniset $GLANCE_CACHE_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/
diff --git a/lib/heat b/lib/heat
index 1b715f2..f7a76dd 100644
--- a/lib/heat
+++ b/lib/heat
@@ -68,7 +68,7 @@
# Cloudformation API
HEAT_API_CFN_CONF=$HEAT_CONF_DIR/heat-api-cfn.conf
cp $HEAT_DIR/etc/heat/heat-api-cfn.conf $HEAT_API_CFN_CONF
- iniset $HEAT_API_CFN_CONF DEFAULT debug True
+ iniset $HEAT_API_CFN_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
inicomment $HEAT_API_CFN_CONF DEFAULT log_file
iniset $HEAT_API_CFN_CONF DEFAULT use_syslog $SYSLOG
iniset $HEAT_API_CFN_CONF DEFAULT bind_host $HEAT_API_CFN_HOST
@@ -90,7 +90,7 @@
# OpenStack API
HEAT_API_CONF=$HEAT_CONF_DIR/heat-api.conf
cp $HEAT_DIR/etc/heat/heat-api.conf $HEAT_API_CONF
- iniset $HEAT_API_CONF DEFAULT debug True
+ iniset $HEAT_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
inicomment $HEAT_API_CONF DEFAULT log_file
iniset $HEAT_API_CONF DEFAULT use_syslog $SYSLOG
iniset $HEAT_API_CONF DEFAULT bind_host $HEAT_API_HOST
@@ -112,7 +112,7 @@
# engine
HEAT_ENGINE_CONF=$HEAT_CONF_DIR/heat-engine.conf
cp $HEAT_DIR/etc/heat/heat-engine.conf $HEAT_ENGINE_CONF
- iniset $HEAT_ENGINE_CONF DEFAULT debug True
+ iniset $HEAT_ENGINE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
inicomment $HEAT_ENGINE_CONF DEFAULT log_file
iniset $HEAT_ENGINE_CONF DEFAULT use_syslog $SYSLOG
iniset $HEAT_ENGINE_CONF DEFAULT bind_host $HEAT_ENGINE_HOST
@@ -128,7 +128,7 @@
# Cloudwatch API
HEAT_API_CW_CONF=$HEAT_CONF_DIR/heat-api-cloudwatch.conf
cp $HEAT_DIR/etc/heat/heat-api-cloudwatch.conf $HEAT_API_CW_CONF
- iniset $HEAT_API_CW_CONF DEFAULT debug True
+ iniset $HEAT_API_CW_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
inicomment $HEAT_API_CW_CONF DEFAULT log_file
iniset $HEAT_API_CW_CONF DEFAULT use_syslog $SYSLOG
iniset $HEAT_API_CW_CONF DEFAULT bind_host $HEAT_API_CW_HOST
@@ -197,6 +197,21 @@
done
}
+function disk_image_create {
+ local elements_path=$1
+ local elements=$2
+ local arch=$3
+ local output=$TOP_DIR/files/$4
+ if [[ -f "$output.qcow2" ]];
+ then
+ echo "Image file already exists: $output_file"
+ else
+ ELEMENTS_PATH=$elements_path disk-image-create \
+ $elements -a $arch -o $output
+ fi
+ # upload with fake URL so that image in $TOP_DIR/files is used
+ upload_image "http://localhost/$output.qcow2" $TOKEN
+}
# Restore xtrace
$XTRACE
diff --git a/lib/neutron b/lib/neutron
index 306140a..31876de 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -537,7 +537,7 @@
cp $NEUTRON_DIR/etc/dhcp_agent.ini $Q_DHCP_CONF_FILE
iniset $Q_DHCP_CONF_FILE DEFAULT verbose True
- iniset $Q_DHCP_CONF_FILE DEFAULT debug True
+ iniset $Q_DHCP_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $Q_DHCP_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
iniset $Q_DHCP_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND"
@@ -557,7 +557,7 @@
cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE
iniset $Q_L3_CONF_FILE DEFAULT verbose True
- iniset $Q_L3_CONF_FILE DEFAULT debug True
+ iniset $Q_L3_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $Q_L3_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
iniset $Q_L3_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND"
@@ -573,10 +573,12 @@
cp $NEUTRON_DIR/etc/metadata_agent.ini $Q_META_CONF_FILE
iniset $Q_META_CONF_FILE DEFAULT verbose True
- iniset $Q_META_CONF_FILE DEFAULT debug True
+ iniset $Q_META_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $Q_META_CONF_FILE DEFAULT nova_metadata_ip $Q_META_DATA_IP
iniset $Q_META_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND"
+ _neutron_setup_keystone $Q_META_CONF_FILE DEFAULT True True
+
}
function _configure_neutron_lbaas() {
@@ -597,7 +599,7 @@
# ensure that an agent's configuration can override the default
iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_COMMAND"
iniset $NEUTRON_CONF DEFAULT verbose True
- iniset $NEUTRON_CONF DEFAULT debug True
+ iniset $NEUTRON_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
# Configure agent for plugin
neutron_plugin_configure_plugin_agent
@@ -620,7 +622,7 @@
fi
iniset $NEUTRON_CONF DEFAULT verbose True
- iniset $NEUTRON_CONF DEFAULT debug True
+ iniset $NEUTRON_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $NEUTRON_CONF DEFAULT policy_file $Q_POLICY_FILE
iniset $NEUTRON_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP
@@ -687,6 +689,7 @@
local conf_file=$1
local section=$2
local use_auth_url=$3
+ local skip_auth_cache=$4
if [[ -n $use_auth_url ]]; then
iniset $conf_file $section auth_url "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT/v2.0"
else
@@ -697,11 +700,13 @@
iniset $conf_file $section admin_tenant_name $SERVICE_TENANT_NAME
iniset $conf_file $section admin_user $Q_ADMIN_USERNAME
iniset $conf_file $section admin_password $SERVICE_PASSWORD
- iniset $conf_file $section signing_dir $NEUTRON_AUTH_CACHE_DIR
- # Create cache dir
- sudo mkdir -p $NEUTRON_AUTH_CACHE_DIR
- sudo chown $STACK_USER $NEUTRON_AUTH_CACHE_DIR
- rm -f $NEUTRON_AUTH_CACHE_DIR/*
+ if [[ -z $skip_auth_cache ]]; then
+ iniset $conf_file $section signing_dir $NEUTRON_AUTH_CACHE_DIR
+ # Create cache dir
+ sudo mkdir -p $NEUTRON_AUTH_CACHE_DIR
+ sudo chown $STACK_USER $NEUTRON_AUTH_CACHE_DIR
+ rm -f $NEUTRON_AUTH_CACHE_DIR/*
+ fi
}
function _neutron_setup_interface_driver() {
diff --git a/lib/nova b/lib/nova
index 9c38498..842c098 100644
--- a/lib/nova
+++ b/lib/nova
@@ -430,7 +430,7 @@
# (Re)create ``nova.conf``
rm -f $NOVA_CONF
iniset $NOVA_CONF DEFAULT verbose "True"
- iniset $NOVA_CONF DEFAULT debug "True"
+ iniset $NOVA_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL"
iniset $NOVA_CONF DEFAULT auth_strategy "keystone"
iniset $NOVA_CONF DEFAULT allow_resize_to_same_host "True"
iniset $NOVA_CONF DEFAULT api_paste_config "$NOVA_API_PASTE_INI"
diff --git a/lib/oslo b/lib/oslo
index de5ec4e..449c4de 100644
--- a/lib/oslo
+++ b/lib/oslo
@@ -41,7 +41,7 @@
# cleanup_oslo() - purge possibly old versions of oslo
function cleanup_oslo() {
# this means we've got an old olso installed, lets get rid of it
- if find /usr | grep oslo.config | grep -v oslo.config.egg-link > /dev/null; then
+ if ! python -c 'import oslo.config' 2>/dev/null; then
echo "Found old oslo.config... removing to ensure consistency"
local PIP_CMD=$(get_pip_command)
pip_install olso.config
diff --git a/lib/tempest b/lib/tempest
index b97f0d8..0d4f370 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -24,6 +24,7 @@
# ``DEFAULT_INSTANCE_TYPE``
# ``DEFAULT_INSTANCE_USER``
# ``CINDER_MULTI_LVM_BACKEND``
+# ``HEAT_CREATE_TEST_IMAGE``
# ``stack.sh`` calls the entry points in this order:
#
# install_tempest
@@ -272,6 +273,12 @@
iniset $TEMPEST_CONF boto http_socket_timeout 30
iniset $TEMPEST_CONF boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
+ # Orchestration test image
+ if [ $HEAT_CREATE_TEST_IMAGE == "True" ]; then
+ disk_image_create /usr/share/tripleo-image-elements "vm fedora heat-cfntools" "i386" "fedora-vm-heat-cfntools-tempest"
+ iniset $TEMPEST_CONF orchestration image_ref "fedora-vm-heat-cfntools-tempest"
+ fi
+
# Scenario
iniset $TEMPEST_CONF scenario img_dir "$FILES/images/cirros-0.3.1-x86_64-uec"
diff --git a/stack.sh b/stack.sh
index 6a24ed7..8f59328 100755
--- a/stack.sh
+++ b/stack.sh
@@ -252,6 +252,9 @@
# operation.
ERROR_ON_CLONE=`trueorfalse False $ERROR_ON_CLONE`
+# Whether to enable the debug log level in OpenStack services
+ENABLE_DEBUG_LOG_LEVEL=`trueorfalse True $ENABLE_DEBUG_LOG_LEVEL`
+
# Destination path for service data
DATA_DIR=${DATA_DIR:-${DEST}/data}
sudo mkdir -p $DATA_DIR
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
index 92b1317..997644d 100755
--- a/tools/xen/install_os_domU.sh
+++ b/tools/xen/install_os_domU.sh
@@ -29,6 +29,10 @@
# xapi functions
. $THIS_DIR/functions
+# Determine what system we are running on.
+# Might not be XenServer if we're using xenserver-core
+GetDistro
+
#
# Get Settings
#