Merge "Colorize heat engine log"
diff --git a/exercises/boot_from_volume.sh b/exercises/boot_from_volume.sh
index a3a14eb..36524ed 100755
--- a/exercises/boot_from_volume.sh
+++ b/exercises/boot_from_volume.sh
@@ -174,7 +174,8 @@
fi
# Get the instance IP
-IP=$(nova show $VM_UUID | grep "$PRIVATE_NETWORK_NAME" | get_field 2)
+IP=$(get_instance_ip $VM_UUID $PRIVATE_NETWORK_NAME)
+
die_if_not_set $LINENO IP "Failure retrieving IP address"
# Private IPs can be pinged in single node deployments
diff --git a/exercises/floating_ips.sh b/exercises/floating_ips.sh
index ac65cf7..f93a727 100755
--- a/exercises/floating_ips.sh
+++ b/exercises/floating_ips.sh
@@ -132,7 +132,7 @@
fi
# Get the instance IP
-IP=$(nova show $VM_UUID | grep "$PRIVATE_NETWORK_NAME" | get_field 2)
+IP=$(get_instance_ip $VM_UUID $PRIVATE_NETWORK_NAME)
die_if_not_set $LINENO IP "Failure retrieving IP address"
# Private IPs can be pinged in single node deployments
diff --git a/exercises/neutron-adv-test.sh b/exercises/neutron-adv-test.sh
index 4367e2e..abb29cf 100755
--- a/exercises/neutron-adv-test.sh
+++ b/exercises/neutron-adv-test.sh
@@ -272,12 +272,12 @@
}
function ping_ip {
- # Test agent connection. Assumes namespaces are disabled, and
- # that DHCP is in use, but not L3
- local VM_NAME=$1
- local NET_NAME=$2
- IP=`nova show $VM_NAME | grep 'network' | awk '{print $5}'`
- ping_check $NET_NAME $IP $BOOT_TIMEOUT
+ # Test agent connection. Assumes namespaces are disabled, and
+ # that DHCP is in use, but not L3
+ local VM_NAME=$1
+ local NET_NAME=$2
+ IP=$(get_instance_ip $VM_NAME $NET_NAME)
+ ping_check $NET_NAME $IP $BOOT_TIMEOUT
}
function check_vm {
diff --git a/exercises/volumes.sh b/exercises/volumes.sh
index b2b391c..028d19b 100755
--- a/exercises/volumes.sh
+++ b/exercises/volumes.sh
@@ -135,7 +135,8 @@
fi
# Get the instance IP
-IP=$(nova show $VM_UUID | grep "$PRIVATE_NETWORK_NAME" | get_field 2)
+IP=$(get_instance_ip $VM_UUID $PRIVATE_NETWORK_NAME)
+
die_if_not_set $LINENO IP "Failure retrieving IP address"
# Private IPs can be pinged in single node deployments
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..37876e0 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
@@ -1437,6 +1436,19 @@
fi
}
+# Get ip of instance
+function get_instance_ip(){
+ local vm_id=$1
+ local network_name=$2
+ local nova_result="$(nova show $vm_id)"
+ local ip=$(echo "$nova_result" | grep "$network_name" | get_field 2)
+ if [[ $ip = "" ]];then
+ echo "$nova_result"
+ die $LINENO "[Fail] Coudn't get ipaddress of VM"
+ exit 1
+ fi
+ echo $ip
+}
# ssh check
diff --git a/lib/cinder b/lib/cinder
index 3472dcd..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
@@ -234,6 +234,10 @@
iniset $CINDER_CONF DEFAULT state_path $CINDER_STATE_PATH
iniset $CINDER_CONF DEFAULT periodic_interval $CINDER_PERIODIC_INTERVAL
+ if is_service_enabled ceilometer; then
+ iniset $CINDER_CONF DEFAULT notification_driver "cinder.openstack.common.notifier.rpc_notifier"
+ fi
+
if is_service_enabled tls-proxy; then
# Set the service port for a proxy to take the original
iniset $CINDER_CONF DEFAULT osapi_volume_listen_port $CINDER_SERVICE_PORT_INT
@@ -283,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
@@ -339,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 568f4d0..fb4002b 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
@@ -136,7 +136,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
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/neutron_plugins/nicira b/lib/neutron_plugins/nicira
index eabc417..e9deb64 100644
--- a/lib/neutron_plugins/nicira
+++ b/lib/neutron_plugins/nicira
@@ -90,7 +90,7 @@
iniset /$Q_PLUGIN_CONF_FILE DEFAULT default_l3_gw_service_uuid $DEFAULT_L3_GW_SVC_UUID
Q_L3_ENABLED=True
Q_L3_ROUTER_PER_TENANT=True
- iniset /$Q_PLUGIN_CONF_FILE nvp enable_metadata_access_network True
+ iniset /$Q_PLUGIN_CONF_FILE nvp metadata_mode access_network
fi
if [[ "$DEFAULT_L2_GW_SVC_UUID" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE DEFAULT default_l2_gw_service_uuid $DEFAULT_L2_GW_SVC_UUID
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 5142f24..0d4f370 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -202,6 +202,7 @@
mkdir -p $TEMPEST_STATE_PATH
iniset $TEMPEST_CONF DEFAULT use_stderr False
iniset $TEMPEST_CONF DEFAULT log_file tempest.log
+ iniset $TEMPEST_CONF DEFAULT debug True
# Timeouts
iniset $TEMPEST_CONF compute build_timeout $BUILD_TIMEOUT
diff --git a/stack.sh b/stack.sh
index 22a23c8..8f59328 100755
--- a/stack.sh
+++ b/stack.sh
@@ -234,8 +234,10 @@
fi
# Create the destination directory and ensure it is writable by the user
+# and read/executable by everybody for daemons (e.g. apache run for horizon)
sudo mkdir -p $DEST
sudo chown -R $STACK_USER $DEST
+chmod 0755 $DEST
# a basic test for $DEST path permissions (fatal on error unless skipped)
check_path_perm_sanity ${DEST}
@@ -250,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
@@ -581,6 +586,10 @@
# Configure an appropriate python environment
$TOP_DIR/tools/install_pip.sh
+# Do the ugly hacks for borken packages and distros
+$TOP_DIR/tools/fixup_stuff.sh
+
+
# System-specific preconfigure
# ============================
diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh
new file mode 100755
index 0000000..60d0f46
--- /dev/null
+++ b/tools/fixup_stuff.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+# **fixup_stuff.sh**
+
+# fixup_stuff.sh
+#
+# All distro and package specific hacks go in here
+# - prettytable 0.7.2 permissions are 600 in the package and
+# pip 1.4 doesn't fix it (1.3 did)
+# - httplib2 0.8 permissions are 600 in the package and
+# pip 1.4 doesn't fix it (1.3 did)
+
+# Keep track of the current directory
+TOOLS_DIR=$(cd $(dirname "$0") && pwd)
+TOP_DIR=`cd $TOOLS_DIR/..; pwd`
+
+# Change dir to top of devstack
+cd $TOP_DIR
+
+# Import common functions
+source $TOP_DIR/functions
+
+FILES=$TOP_DIR/files
+
+# Pre-install affected packages so we can fix the permissions
+sudo pip install prettytable
+sudo pip install httplib2
+
+SITE_DIRS=$(python -c "import site; import os; print os.linesep.join(site.getsitepackages())")
+for dir in $SITE_DIRS; do
+
+ # Fix prettytable 0.7.2 permissions
+ if [[ -r $dir/prettytable.py ]]; then
+ sudo chmod +r $dir/prettytable-0.7.2*/*
+ fi
+
+ # Fix httplib2 0.8 permissions
+ httplib_dir=httplib2-0.8.egg-info
+ if [[ -d $dir/$httplib_dir ]]; then
+ sudo chmod +r $dir/$httplib_dir/*
+ fi
+
+done
diff --git a/tools/install_pip.sh b/tools/install_pip.sh
index 0ea8f53..6e3e9d2 100755
--- a/tools/install_pip.sh
+++ b/tools/install_pip.sh
@@ -81,10 +81,12 @@
}
function install_pip_tarball() {
- curl -O $PIP_TAR_URL
- tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz
- cd pip-$INSTALL_PIP_VERSION
- sudo python setup.py install
+ (cd $FILES; \
+ curl -O $PIP_TAR_URL; \
+ tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz; \
+ cd pip-$INSTALL_PIP_VERSION; \
+ sudo python setup.py install; \
+ )
}
# Show starting versions
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
index e762f6d..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
#
@@ -167,8 +171,8 @@
#
GUEST_NAME=${GUEST_NAME:-"DevStackOSDomU"}
-TNAME="devstack_template"
-SNAME_PREPARED="template_prepared"
+TNAME="jeos_template_for_devstack"
+SNAME_TEMPLATE="jeos_snapshot_for_devstack"
SNAME_FIRST_BOOT="before_first_boot"
function wait_for_VM_to_halt() {
@@ -234,21 +238,8 @@
vm_uuid=$(xe_min vm-list name-label="$GUEST_NAME")
xe vm-param-set actions-after-reboot=Restart uuid="$vm_uuid"
- #
- # Prepare VM for DevStack
- #
-
- # Install XenServer tools, and other such things
- $THIS_DIR/prepare_guest_template.sh "$GUEST_NAME"
-
- # start the VM to run the prepare steps
- xe vm-start vm="$GUEST_NAME"
-
- # Wait for prep script to finish and shutdown system
- wait_for_VM_to_halt
-
# Make template from VM
- snuuid=$(xe vm-snapshot vm="$GUEST_NAME" new-name-label="$SNAME_PREPARED")
+ snuuid=$(xe vm-snapshot vm="$GUEST_NAME" new-name-label="$SNAME_TEMPLATE")
xe snapshot-clone uuid=$snuuid new-name-label="$TNAME"
else
#
@@ -257,6 +248,19 @@
vm_uuid=$(xe vm-install template="$TNAME" new-name-label="$GUEST_NAME")
fi
+#
+# Prepare VM for DevStack
+#
+
+# Install XenServer tools, and other such things
+$THIS_DIR/prepare_guest_template.sh "$GUEST_NAME"
+
+# start the VM to run the prepare steps
+xe vm-start vm="$GUEST_NAME"
+
+# Wait for prep script to finish and shutdown system
+wait_for_VM_to_halt
+
## Setup network cards
# Wipe out all
destroy_all_vifs_of "$GUEST_NAME"