Merge "Enable swift by default."
diff --git a/exercise.sh b/exercise.sh
index 5b3c56e..3516738 100755
--- a/exercise.sh
+++ b/exercise.sh
@@ -17,9 +17,19 @@
# to refrain from exercising euca.sh use SKIP_EXERCISES=euca
SKIP_EXERCISES=${SKIP_EXERCISES:-""}
-# Locate the scripts we should run
-EXERCISE_DIR=$(dirname "$0")/exercises
-basenames=$(for b in `ls $EXERCISE_DIR/*.sh`; do basename $b .sh; done)
+# comma separated list of script basenames to run
+# to run only euca.sh use RUN_EXERCISES=euca
+basenames=${RUN_EXERCISES:-""}
+
+EXERCISE_DIR=$TOP_DIR/exercises
+
+if [ -z "${basenames}" ] ; then
+ # Locate the scripts we should run
+ basenames=$(for b in `ls $EXERCISE_DIR/*.sh`; do basename $b .sh; done)
+else
+ # If RUN_EXERCISES was specified, ignore SKIP_EXERCISES.
+ SKIP_EXERCISES=
+fi
# Track the state of each script
passes=""
diff --git a/files/apts/ceilometer-collector b/files/apts/ceilometer-collector
index c67ade3..71007ba 100644
--- a/files/apts/ceilometer-collector
+++ b/files/apts/ceilometer-collector
@@ -1,2 +1,6 @@
python-pymongo
mongodb-server
+libnspr4-dev
+pkg-config
+libxml2-dev
+libxslt-dev
\ No newline at end of file
diff --git a/files/apts/general b/files/apts/general
index 0264066..a1fcf3c 100644
--- a/files/apts/general
+++ b/files/apts/general
@@ -9,6 +9,7 @@
git
lsof # useful when debugging
openssh-server
+openssl
vim-nox
locate # useful when debugging
python-virtualenv
diff --git a/files/apts/n-vol b/files/apts/n-vol
deleted file mode 100644
index 5db06ea..0000000
--- a/files/apts/n-vol
+++ /dev/null
@@ -1,2 +0,0 @@
-tgt
-lvm2
diff --git a/files/keystone_data.sh b/files/keystone_data.sh
index 2fc8915..72b5b1e 100755
--- a/files/keystone_data.sh
+++ b/files/keystone_data.sh
@@ -168,9 +168,9 @@
keystone endpoint-create \
--region RegionOne \
--service_id $CEILOMETER_SERVICE \
- --publicurl "http://$SERVICE_HOST:8777/" \
- --adminurl "http://$SERVICE_HOST:8777/" \
- --internalurl "http://$SERVICE_HOST:8777/"
+ --publicurl "http://$SERVICE_HOST:8777" \
+ --adminurl "http://$SERVICE_HOST:8777" \
+ --internalurl "http://$SERVICE_HOST:8777"
fi
fi
diff --git a/files/ldap/openstack.ldif b/files/ldap/openstack.ldif
index 00c9861..2b76372 100644
--- a/files/ldap/openstack.ldif
+++ b/files/ldap/openstack.ldif
@@ -20,6 +20,10 @@
objectClass: organizationalUnit
ou: Projects
+dn: ou=Domains,dc=openstack,dc=org
+objectClass: organizationalUnit
+ou: Domains
+
dn: cn=9fe2ff9ee4384b1894a90878d3e92bab,ou=Roles,dc=openstack,dc=org
objectClass: organizationalRole
ou: _member_
diff --git a/files/rpms-suse/general b/files/rpms-suse/general
index 8ed74ec..b8ceeb7 100644
--- a/files/rpms-suse/general
+++ b/files/rpms-suse/general
@@ -4,6 +4,7 @@
git-core
iputils
openssh
+openssl
psmisc
python-cmd2 # dist:opensuse-12.3
python-netaddr
diff --git a/files/rpms-suse/ldap b/files/rpms-suse/ldap
new file mode 100644
index 0000000..46d26f0
--- /dev/null
+++ b/files/rpms-suse/ldap
@@ -0,0 +1,3 @@
+openldap2
+openldap2-client
+python-ldap
diff --git a/files/rpms-suse/n-spice b/files/rpms-suse/n-spice
new file mode 100644
index 0000000..c8722b9
--- /dev/null
+++ b/files/rpms-suse/n-spice
@@ -0,0 +1 @@
+python-numpy
diff --git a/files/rpms-suse/n-vol b/files/rpms-suse/n-vol
deleted file mode 100644
index e5b4727..0000000
--- a/files/rpms-suse/n-vol
+++ /dev/null
@@ -1,2 +0,0 @@
-lvm2
-tgt
diff --git a/files/rpms-suse/nova b/files/rpms-suse/nova
index 0306716..04af7f3 100644
--- a/files/rpms-suse/nova
+++ b/files/rpms-suse/nova
@@ -3,6 +3,7 @@
dnsmasq
ebtables
gawk
+genisoimage # required for config_drive
iptables
iputils
kpartx
@@ -34,6 +35,7 @@
python-mox
python-mysql
python-netaddr
+python-numpy # needed by websockify for spice console
python-paramiko
python-python-gflags
python-sqlalchemy-migrate
diff --git a/files/rpms-suse/ryu b/files/rpms-suse/ryu
index 763fd24..90b43a4 100644
--- a/files/rpms-suse/ryu
+++ b/files/rpms-suse/ryu
@@ -2,4 +2,5 @@
python-setuptools # instead of python-distribute; dist:sle11sp2
python-Sphinx
python-gevent
+python-netifaces
python-python-gflags
diff --git a/files/rpms/ceilometer-collector b/files/rpms/ceilometer-collector
index c5c855c..d7b7ea8 100644
--- a/files/rpms/ceilometer-collector
+++ b/files/rpms/ceilometer-collector
@@ -1,2 +1,3 @@
+selinux-policy-targeted
mongodb-server
pymongo
diff --git a/files/rpms/general b/files/rpms/general
index e4f143d..fc3412b 100644
--- a/files/rpms/general
+++ b/files/rpms/general
@@ -3,6 +3,7 @@
euca2ools # only for testing client
git-core
openssh-server
+openssl
psmisc
pylint
python-netaddr
diff --git a/files/rpms/n-vol b/files/rpms/n-vol
deleted file mode 100644
index df861aa..0000000
--- a/files/rpms/n-vol
+++ /dev/null
@@ -1,2 +0,0 @@
-lvm2
-scsi-target-utils
diff --git a/functions b/functions
index 27f3384..220da9d 100644
--- a/functions
+++ b/functions
@@ -53,8 +53,8 @@
}
-# Prints "message" and exits
-# die "message"
+# Prints line number and "message" then exits
+# die $LINENO "message"
function die() {
local exitcode=$?
if [ $exitcode == 0 ]; then
@@ -73,7 +73,7 @@
# Checks an environment variable is not set or has length 0 OR if the
# exit code is non-zero and prints "message" and exits
# NOTE: env-var is the variable name without a '$'
-# die_if_not_set env-var "message"
+# die_if_not_set $LINENO env-var "message"
function die_if_not_set() {
(
local exitcode=$?
@@ -123,6 +123,37 @@
}
+# Get the default value for HOST_IP
+# get_default_host_ip fixed_range floating_range host_ip_iface host_ip
+function get_default_host_ip() {
+ local fixed_range=$1
+ local floating_range=$2
+ local host_ip_iface=$3
+ local host_ip=$4
+
+ # Find the interface used for the default route
+ host_ip_iface=${host_ip_iface:-$(ip route | sed -n '/^default/{ s/.*dev \(\w\+\)\s\+.*/\1/; p; }' | head -1)}
+ # Search for an IP unless an explicit is set by ``HOST_IP`` environment variable
+ if [ -z "$host_ip" -o "$host_ip" == "dhcp" ]; then
+ host_ip=""
+ host_ips=`LC_ALL=C ip -f inet addr show ${host_ip_iface} | awk '/inet/ {split($2,parts,"/"); print parts[1]}'`
+ for IP in $host_ips; do
+ # Attempt to filter out IP addresses that are part of the fixed and
+ # floating range. Note that this method only works if the ``netaddr``
+ # python library is installed. If it is not installed, an error
+ # will be printed and the first IP from the interface will be used.
+ # If that is not correct set ``HOST_IP`` in ``localrc`` to the correct
+ # address.
+ if ! (address_in_net $IP $fixed_range || address_in_net $IP $floating_range); then
+ host_ip=$IP
+ break;
+ fi
+ done
+ fi
+ echo $host_ip
+}
+
+
function _get_package_dir() {
local pkg_dir
if is_ubuntu; then
@@ -275,6 +306,8 @@
if [[ $? -eq 0 ]]; then
os_VENDOR="openSUSE"
fi
+ elif [[ $os_VENDOR == "openSUSE project" ]]; then
+ os_VENDOR="openSUSE"
elif [[ $os_VENDOR =~ Red.*Hat ]]; then
os_VENDOR="Red Hat"
fi
@@ -557,6 +590,56 @@
fi
}
+# Get a multiple line option from an INI file
+# iniget_multiline config-file section option
+function iniget_multiline() {
+ local file=$1
+ local section=$2
+ local option=$3
+ local values
+ values=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { s/^$option[ \t]*=[ \t]*//gp; }" "$file")
+ echo ${values}
+}
+
+# Set a multiple line option in an INI file
+# iniset_multiline config-file section option value1 value2 valu3 ...
+function iniset_multiline() {
+ local file=$1
+ local section=$2
+ local option=$3
+ shift 3
+ local values
+ for v in $@; do
+ # The later sed command inserts each new value in the line next to
+ # the section identifier, which causes the values to be inserted in
+ # the reverse order. Do a reverse here to keep the original order.
+ values="$v ${values}"
+ done
+ if ! grep -q "^\[$section\]" "$file"; then
+ # Add section at the end
+ echo -e "\n[$section]" >>"$file"
+ else
+ # Remove old values
+ sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
+ fi
+ # Add new ones
+ for v in $values; do
+ sed -i -e "/^\[$section\]/ a\\
+$option = $v
+" "$file"
+ done
+}
+
+# Append a new option in an ini file without replacing the old value
+# iniadd config-file section option value1 value2 value3 ...
+function iniadd() {
+ local file=$1
+ local section=$2
+ local option=$3
+ shift 3
+ local values="$(iniget_multiline $file $section $option) $@"
+ iniset_multiline $file $section $option $values
+}
# is_service_enabled() checks if the service(s) specified as arguments are
# enabled by the user in ``ENABLED_SERVICES``.
diff --git a/lib/baremetal b/lib/baremetal
index 2659386..57048a1 100644
--- a/lib/baremetal
+++ b/lib/baremetal
@@ -63,7 +63,7 @@
# sub-driver to use for remote power management
# - nova.virt.baremetal.fake.FakePowerManager, for manual power control
-# - nova.virt.baremetal.ipmi.Ipmi, for remote IPMI
+# - nova.virt.baremetal.ipmi.IPMI, for remote IPMI
# - nova.virt.baremetal.tilera_pdu.Pdu, for TilePro hardware
BM_POWER_MANAGER=${BM_POWER_MANAGER:-nova.virt.baremetal.fake.FakePowerManager}
@@ -258,9 +258,10 @@
nova flavor-create $BM_FLAVOR_NAME $BM_FLAVOR_ID \
$BM_FLAVOR_RAM $BM_FLAVOR_ROOT_DISK $BM_FLAVOR_CPU
nova flavor-key $BM_FLAVOR_NAME set \
- cpu_arch=$BM_FLAVOR_ARCH \
- deploy_kernel_id=$aki \
- deploy_ramdisk_id=$ari
+ "cpu_arch"="$BM_FLAVOR_ARCH" \
+ "baremetal:deploy_kernel_id"="$aki" \
+ "baremetal:deploy_ramdisk_id"="$ari"
+
}
# pull run-time kernel/ramdisk out of disk image and load into glance
diff --git a/lib/ceilometer b/lib/ceilometer
index 8772867..d90694c 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -68,7 +68,7 @@
iniset $CEILOMETER_CONF DEFAULT notification_topics 'notifications,glance_notifications'
iniset $CEILOMETER_CONF DEFAULT verbose True
- iniset $CEILOMETER_CONF DEFAULT sql_connection $BASE_SQL_CONN/nova?charset=utf8
+ iniset $CEILOMETER_CONF DEFAULT `database_connection_url nova`
# Install the policy file for the API server
cp $CEILOMETER_DIR/etc/ceilometer/policy.json $CEILOMETER_CONF_DIR
@@ -88,9 +88,20 @@
iniset $CEILOMETER_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME
iniset $CEILOMETER_CONF keystone_authtoken signing_dir $CEILOMETER_AUTH_CACHE_DIR
+ configure_mongodb
+
cleanup_ceilometer
}
+function configure_mongodb() {
+ if is_fedora ; then
+ # ensure smallfiles selected to minimize freespace requirements
+ sudo sed -i '/--smallfiles/!s/OPTIONS=\"/OPTIONS=\"--smallfiles /' /etc/sysconfig/mongod
+
+ restart_service mongod
+ fi
+}
+
# init_ceilometer() - Initialize etc.
function init_ceilometer() {
# Create cache dir
diff --git a/lib/cinder b/lib/cinder
index f487c8e..b3e1904 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -171,6 +171,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 verbose True
if [ "$CINDER_MULTI_LVM_BACKEND" = "True" ]; then
iniset $CINDER_CONF DEFAULT enabled_backends lvmdriver-1,lvmdriver-2
@@ -185,9 +186,7 @@
iniset $CINDER_CONF DEFAULT volume_name_template ${VOLUME_NAME_PREFIX}%s
fi
iniset $CINDER_CONF DEFAULT iscsi_helper tgtadm
- local dburl
- database_connection_url dburl cinder
- iniset $CINDER_CONF DEFAULT sql_connection $dburl
+ iniset $CINDER_CONF DEFAULT sql_connection `database_connection_url cinder`
iniset $CINDER_CONF DEFAULT api_paste_config $CINDER_API_PASTE_INI
iniset $CINDER_CONF DEFAULT rootwrap_config "$CINDER_CONF_DIR/rootwrap.conf"
iniset $CINDER_CONF DEFAULT osapi_volume_extension cinder.api.contrib.standard_extensions
diff --git a/lib/databases/mysql b/lib/databases/mysql
index 94aedc6..ec65c36 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -115,9 +115,8 @@
}
function database_connection_url_mysql {
- local output=$1
- local db=$2
- eval "$output=$BASE_SQL_CONN/$db?charset=utf8"
+ local db=$1
+ echo "$BASE_SQL_CONN/$db?charset=utf8"
}
# Restore xtrace
diff --git a/lib/databases/postgresql b/lib/databases/postgresql
index 2c37f49..7d4a6c5 100644
--- a/lib/databases/postgresql
+++ b/lib/databases/postgresql
@@ -70,9 +70,8 @@
}
function database_connection_url_postgresql {
- local output=$1
- local db=$2
- eval "$output=$BASE_SQL_CONN/$db?client_encoding=utf8"
+ local db=$1
+ echo "$BASE_SQL_CONN/$db?client_encoding=utf8"
}
# Restore xtrace
diff --git a/lib/glance b/lib/glance
index a6b698f..9ec2112 100644
--- a/lib/glance
+++ b/lib/glance
@@ -81,8 +81,7 @@
cp $GLANCE_DIR/etc/glance-registry.conf $GLANCE_REGISTRY_CONF
iniset $GLANCE_REGISTRY_CONF DEFAULT debug True
inicomment $GLANCE_REGISTRY_CONF DEFAULT log_file
- local dburl
- database_connection_url dburl glance
+ local dburl=`database_connection_url glance`
iniset $GLANCE_REGISTRY_CONF DEFAULT sql_connection $dburl
iniset $GLANCE_REGISTRY_CONF DEFAULT use_syslog $SYSLOG
iniset $GLANCE_REGISTRY_CONF paste_deploy flavor keystone
diff --git a/lib/heat b/lib/heat
index 5b8b360..56d6f39 100644
--- a/lib/heat
+++ b/lib/heat
@@ -117,9 +117,7 @@
iniset $HEAT_ENGINE_CONF DEFAULT heat_metadata_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT
iniset $HEAT_ENGINE_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition
iniset $HEAT_ENGINE_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT
- local dburl
- database_connection_url dburl heat
- iniset $HEAT_ENGINE_CONF DEFAULT sql_connection $dburl
+ iniset $HEAT_ENGINE_CONF DEFAULT sql_connection `database_connection_url heat`
iniset $HEAT_ENGINE_CONF DEFAULT auth_encryption_key `hexdump -n 16 -v -e '/1 "%02x"' /dev/random`
iniset_rpc_backend heat $HEAT_ENGINE_CONF DEFAULT
diff --git a/lib/horizon b/lib/horizon
index 9180370..9c96b58 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -34,6 +34,24 @@
APACHE_USER=${APACHE_USER:-$USER}
APACHE_GROUP=${APACHE_GROUP:-$(id -gn $APACHE_USER)}
+# utility method of setting python option
+function _horizon_config_set() {
+ local file=$1
+ local section=$2
+ local option=$3
+ local value=$4
+
+ if grep -q "^$section" $file; then
+ line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
+ if [ -n "$line" ]; then
+ sed -i -e "/^$section/,/^}/ s/^\( *'$option'\) *:.*$/\1: $value,/" $file
+ else
+ sed -i -e "/^$section/ a\n '$option': $value,\n" $file
+ fi
+ else
+ echo -e "\n\n$section = {\n '$option': $value,\n}" >> $file
+ fi
+}
# Entry Points
# ------------
@@ -61,6 +79,11 @@
local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
cp $FILES/horizon_settings.py $local_settings
+ # enable loadbalancer dashboard in case service is enabled
+ if is_service_enabled q-lbaas; then
+ _horizon_config_set $local_settings OPENSTACK_QUANTUM_NETWORK enable_lb True
+ fi
+
# Initialize the horizon database (it stores sessions and notices shown to
# users). The user system is external (keystone).
cd $HORIZON_DIR
diff --git a/lib/keystone b/lib/keystone
index eea2c4d..17e0866 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -31,6 +31,7 @@
KEYSTONE_DIR=$DEST/keystone
KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone}
KEYSTONE_CONF=$KEYSTONE_CONF_DIR/keystone.conf
+KEYSTONE_PASTE_INI=${KEYSTONE_PASTE_INI:-$KEYSTONE_CONF_DIR/keystone-paste.ini}
KEYSTONE_AUTH_CACHE_DIR=${KEYSTONE_AUTH_CACHE_DIR:-/var/cache/keystone}
KEYSTONECLIENT_DIR=$DEST/python-keystoneclient
@@ -88,11 +89,18 @@
if [[ "$KEYSTONE_CONF_DIR" != "$KEYSTONE_DIR/etc" ]]; then
cp -p $KEYSTONE_DIR/etc/keystone.conf.sample $KEYSTONE_CONF
cp -p $KEYSTONE_DIR/etc/policy.json $KEYSTONE_CONF_DIR
+ if [[ -f "$KEYSTONE_DIR/etc/keystone-paste.ini" ]]; then
+ cp -p "$KEYSTONE_DIR/etc/keystone-paste.ini" "$KEYSTONE_PASTE_INI"
+ fi
+ fi
+ if [[ -f "$KEYSTONE_PASTE_INI" ]]; then
+ iniset "$KEYSTONE_CONF" paste_deploy config_file "$KEYSTONE_PASTE_INI"
+ else
+ # compatibility with mixed cfg and paste.deploy configuration
+ KEYSTONE_PASTE_INI="$KEYSTONE_CONF"
fi
# Rewrite stock ``keystone.conf``
- local dburl
- database_connection_url dburl keystone
if is_service_enabled ldap; then
#Set all needed ldap values
@@ -123,14 +131,8 @@
iniset $KEYSTONE_CONF DEFAULT admin_token "$SERVICE_TOKEN"
iniset $KEYSTONE_CONF signing token_format "$KEYSTONE_TOKEN_FORMAT"
- iniset $KEYSTONE_CONF sql connection $dburl
+ iniset $KEYSTONE_CONF sql connection `database_connection_url keystone`
iniset $KEYSTONE_CONF ec2 driver "keystone.contrib.ec2.backends.sql.Ec2"
- sed -e "
- /^pipeline.*ec2_extension crud_/s|ec2_extension crud_extension|ec2_extension s3_extension crud_extension|;
- " -i $KEYSTONE_CONF
-
- # Append the S3 bits
- iniset $KEYSTONE_CONF filter:s3_extension paste.filter_factory "keystone.contrib.s3:S3Extension.factory"
if [[ "$KEYSTONE_TOKEN_BACKEND" = "sql" ]]; then
iniset $KEYSTONE_CONF token driver keystone.token.backends.sql.Token
diff --git a/lib/ldap b/lib/ldap
index 5cb4534..0a0d197 100644
--- a/lib/ldap
+++ b/lib/ldap
@@ -16,13 +16,11 @@
echo "os_VENDOR is $os_VENDOR"
printf "installing"
if is_ubuntu; then
- echo "os vendor is Ubuntu"
LDAP_OLCDB_NUMBER=1
LDAP_ROOTPW_COMMAND=replace
sudo DEBIAN_FRONTEND=noninteractive apt-get install slapd ldap-utils
#automatically starts LDAP on ubuntu so no need to call start_ldap
- elif is_fedora; then
- echo "os vendor is Fedora"
+ elif is_fedora || is_suse; then
LDAP_OLCDB_NUMBER=2
LDAP_ROOTPW_COMMAND=add
start_ldap
diff --git a/lib/nova b/lib/nova
index 3749790..906a635 100644
--- a/lib/nova
+++ b/lib/nova
@@ -371,18 +371,15 @@
iniset $NOVA_CONF DEFAULT compute_scheduler_driver "$SCHEDULER"
iniset $NOVA_CONF DEFAULT dhcpbridge_flagfile "$NOVA_CONF"
iniset $NOVA_CONF DEFAULT force_dhcp_release "True"
- iniset $NOVA_CONF DEFAULT fixed_range "$FIXED_RANGE"
+ iniset $NOVA_CONF DEFAULT fixed_range ""
iniset $NOVA_CONF DEFAULT default_floating_pool "$PUBLIC_NETWORK_NAME"
iniset $NOVA_CONF DEFAULT s3_host "$SERVICE_HOST"
iniset $NOVA_CONF DEFAULT s3_port "$S3_SERVICE_PORT"
iniset $NOVA_CONF DEFAULT osapi_compute_extension "nova.api.openstack.compute.contrib.standard_extensions"
iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP"
- local dburl
- database_connection_url dburl nova
- iniset $NOVA_CONF DEFAULT sql_connection "$dburl"
+ iniset $NOVA_CONF DEFAULT sql_connection `database_connection_url nova`
if is_baremetal; then
- database_connection_url dburl nova_bm
- iniset $NOVA_CONF baremetal sql_connection $dburl
+ iniset $NOVA_CONF baremetal sql_connection `database_connection_url nova_bm`
fi
iniset $NOVA_CONF DEFAULT libvirt_type "$LIBVIRT_TYPE"
iniset $NOVA_CONF DEFAULT libvirt_cpu_mode "none"
@@ -428,8 +425,7 @@
if is_service_enabled ceilometer; then
iniset $NOVA_CONF DEFAULT instance_usage_audit "True"
iniset $NOVA_CONF DEFAULT instance_usage_audit_period "hour"
- iniset $NOVA_CONF DEFAULT notification_driver "nova.openstack.common.notifier.rpc_notifier"
- iniset $NOVA_CONF DEFAULT notification_driver "ceilometer.compute.nova_notifier"
+ iniset_multiline $NOVA_CONF DEFAULT notification_driver "nova.openstack.common.notifier.rpc_notifier" "ceilometer.compute.nova_notifier"
fi
diff --git a/lib/quantum b/lib/quantum
index 3e41d8d..66360d4 100644
--- a/lib/quantum
+++ b/lib/quantum
@@ -89,7 +89,7 @@
# Meta data IP
Q_META_DATA_IP=${Q_META_DATA_IP:-$HOST_IP}
# Allow Overlapping IP among subnets
-Q_ALLOW_OVERLAPPING_IP=${Q_ALLOW_OVERLAPPING_IP:-False}
+Q_ALLOW_OVERLAPPING_IP=${Q_ALLOW_OVERLAPPING_IP:-True}
# Use quantum-debug command
Q_USE_DEBUG_COMMAND=${Q_USE_DEBUG_COMMAND:-False}
# The name of the default q-l3 router
@@ -176,6 +176,11 @@
# Please refer to lib/quantum_plugins/README.md for details.
source $TOP_DIR/lib/quantum_plugins/$Q_PLUGIN
+# Agent loadbalancer service plugin functions
+# -------------------------------------------
+# Hardcoding for 1 service plugin for now
+source $TOP_DIR/lib/quantum_plugins/agent_loadbalancer
+
# Entry Points
# ------------
@@ -185,6 +190,10 @@
_configure_quantum_common
iniset_rpc_backend quantum $QUANTUM_CONF DEFAULT
+ # goes before q-svc to init Q_SERVICE_PLUGIN_CLASSES
+ if is_service_enabled q-lbaas; then
+ _configure_quantum_lbaas
+ fi
if is_service_enabled q-svc; then
_configure_quantum_service
fi
@@ -362,6 +371,10 @@
screen_it q-dhcp "python $AGENT_DHCP_BINARY --config-file $QUANTUM_CONF --config-file=$Q_DHCP_CONF_FILE"
screen_it q-meta "python $AGENT_META_BINARY --config-file $QUANTUM_CONF --config-file=$Q_META_CONF_FILE"
screen_it q-l3 "python $AGENT_L3_BINARY --config-file $QUANTUM_CONF --config-file=$Q_L3_CONF_FILE"
+
+ if is_service_enabled q-lbaas; then
+ screen_it q-lbaas "python $AGENT_LBAAS_BINARY --config-file $QUANTUM_CONF --config-file=$LBAAS_AGENT_CONF_FILENAME"
+ fi
}
# stop_quantum() - Stop running processes (non-screen)
@@ -403,9 +416,7 @@
Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME
cp $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE
- database_connection_url dburl $Q_DB_NAME
- iniset /$Q_PLUGIN_CONF_FILE DATABASE sql_connection $dburl
- unset dburl
+ iniset /$Q_PLUGIN_CONF_FILE DATABASE sql_connection `database_connection_url $Q_DB_NAME`
_quantum_setup_rootwrap
}
@@ -483,6 +494,13 @@
_quantum_setup_keystone $Q_META_CONF_FILE DEFAULT set_auth_url
}
+function _configure_quantum_lbaas()
+{
+ quantum_agent_lbaas_install_agent_packages
+ quantum_agent_lbaas_configure_common
+ quantum_agent_lbaas_configure_agent
+}
+
# _configure_quantum_plugin_agent() - Set config files for quantum plugin agent
# It is called when q-agt is enabled.
function _configure_quantum_plugin_agent() {
@@ -512,9 +530,14 @@
# Update either configuration file with plugin
iniset $QUANTUM_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS
+ if [[ $Q_SERVICE_PLUGIN_CLASSES != '' ]]; then
+ iniset $QUANTUM_CONF DEFAULT service_plugins $Q_SERVICE_PLUGIN_CLASSES
+ fi
+
iniset $QUANTUM_CONF DEFAULT verbose True
iniset $QUANTUM_CONF DEFAULT debug True
iniset $QUANTUM_CONF DEFAULT state_path $DATA_DIR/quantum
+ iniset $QUANTUM_CONF DEFAULT policy_file $Q_POLICY_FILE
iniset $QUANTUM_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP
iniset $QUANTUM_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY
diff --git a/lib/quantum_plugins/README.md b/lib/quantum_plugins/README.md
index a66d35a..5411de0 100644
--- a/lib/quantum_plugins/README.md
+++ b/lib/quantum_plugins/README.md
@@ -18,7 +18,7 @@
* ``quantum_plugin_create_nova_conf`` :
set ``NOVA_VIF_DRIVER`` and optionally set options in nova_conf
e.g.
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
* ``quantum_plugin_install_agent_packages`` :
install packages that is specific to plugin agent
e.g.
diff --git a/lib/quantum_plugins/agent_loadbalancer b/lib/quantum_plugins/agent_loadbalancer
new file mode 100644
index 0000000..87e7aaa
--- /dev/null
+++ b/lib/quantum_plugins/agent_loadbalancer
@@ -0,0 +1,48 @@
+# Quantum loadbalancer plugin
+# ---------------------------
+
+# Save trace setting
+MY_XTRACE=$(set +o | grep xtrace)
+set +o xtrace
+
+
+AGENT_LBAAS_BINARY="$QUANTUM_DIR/bin/quantum-lbaas-agent"
+
+function quantum_agent_lbaas_install_agent_packages() {
+ if is_ubuntu || is_fedora; then
+ install_package haproxy
+ elif is_suse; then
+ ### FIXME: Find out if package can be pushed to Factory
+ echo "HAProxy packages can be installed from server:http project in OBS"
+ fi
+}
+
+function quantum_agent_lbaas_configure_common() {
+ if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
+ Q_SERVICE_PLUGIN_CLASSES="quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin"
+ else
+ Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin"
+ fi
+}
+
+function quantum_agent_lbaas_configure_agent() {
+ LBAAS_AGENT_CONF_PATH=/etc/quantum/plugins/services/agent_loadbalancer
+ mkdir -p $LBAAS_AGENT_CONF_PATH
+
+ LBAAS_AGENT_CONF_FILENAME="$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini"
+
+ cp $QUANTUM_DIR/etc/lbaas_agent.ini /$LBAAS_AGENT_CONF_FILENAME
+
+ if [[ $Q_PLUGIN == 'linuxbridge' || $Q_PLUGIN == 'brocade' ]]; then
+ iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT interface_driver "quantum.agent.linux.interface.BridgeInterfaceDriver"
+ else
+ iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT interface_driver "quantum.agent.linux.interface.OVSInterfaceDriver"
+ fi
+
+ if is_fedora; then
+ iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT user_group "nobody"
+ fi
+}
+
+# Restore xtrace
+$MY_XTRACE
diff --git a/lib/quantum_plugins/bigswitch_floodlight b/lib/quantum_plugins/bigswitch_floodlight
index 2c928be..7d3fd96 100644
--- a/lib/quantum_plugins/bigswitch_floodlight
+++ b/lib/quantum_plugins/bigswitch_floodlight
@@ -9,7 +9,7 @@
source $TOP_DIR/lib/quantum_thirdparty/bigswitch_floodlight # for third party service specific configuration values
function quantum_plugin_create_nova_conf() {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
}
function quantum_plugin_install_agent_packages() {
diff --git a/lib/quantum_plugins/brocade b/lib/quantum_plugins/brocade
index c372c19..ac91143 100644
--- a/lib/quantum_plugins/brocade
+++ b/lib/quantum_plugins/brocade
@@ -10,7 +10,7 @@
}
function quantum_plugin_create_nova_conf() {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.QuantumLinuxBridgeVIFDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
}
function quantum_plugin_install_agent_packages() {
diff --git a/lib/quantum_plugins/linuxbridge b/lib/quantum_plugins/linuxbridge
index 0756de4..11bc585 100644
--- a/lib/quantum_plugins/linuxbridge
+++ b/lib/quantum_plugins/linuxbridge
@@ -11,7 +11,7 @@
}
function quantum_plugin_create_nova_conf() {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.QuantumLinuxBridgeVIFDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
}
function quantum_plugin_install_agent_packages() {
diff --git a/lib/quantum_plugins/openvswitch b/lib/quantum_plugins/openvswitch
index a57336e..dda1239 100644
--- a/lib/quantum_plugins/openvswitch
+++ b/lib/quantum_plugins/openvswitch
@@ -8,7 +8,7 @@
source $TOP_DIR/lib/quantum_plugins/ovs_base
function quantum_plugin_create_nova_conf() {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
iniset $NOVA_CONF DEFAULT xenapi_vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
iniset $NOVA_CONF DEFAULT xenapi_ovs_integration_bridge $FLAT_NETWORK_BRIDGE
diff --git a/lib/quantum_plugins/ovs_base b/lib/quantum_plugins/ovs_base
index 915129e..ab988d9 100644
--- a/lib/quantum_plugins/ovs_base
+++ b/lib/quantum_plugins/ovs_base
@@ -29,8 +29,8 @@
# Ensure that the service is started
restart_service openvswitch
elif is_suse; then
- ### FIXME: Find RPMs for OpenVSwitch
- echo "OpenVSwitch packages need to be located"
+ ### FIXME: Find out if package can be pushed to Factory
+ echo "OpenVSwitch packages can be installed from Cloud:OpenStack:Master in OBS"
restart_service openvswitch
fi
}
diff --git a/lib/swift b/lib/swift
index c1b5406..5c4ceab 100644
--- a/lib/swift
+++ b/lib/swift
@@ -353,6 +353,9 @@
function start_swift() {
# (re)start rsyslog
restart_service rsyslog
+ # (re)start memcached to make sure we have a clean memcache.
+ restart_service memcached
+
# Start rsync
if is_ubuntu; then
sudo /etc/init.d/rsync restart || :
diff --git a/lib/tempest b/lib/tempest
index 9cc19ae..85e643e 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -266,10 +266,6 @@
# install_tempest() - Collect source and prepare
function install_tempest() {
git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH
-
- # Tempest doesn't satisfy its dependencies on its own, so
- # install them here instead.
- pip_install -r $TEMPEST_DIR/tools/pip-requires
}
# init_tempest() - Initialize ec2 images
diff --git a/stack.sh b/stack.sh
index b8dd07c..7b4b3b7 100755
--- a/stack.sh
+++ b/stack.sh
@@ -223,27 +223,9 @@
FIXED_NETWORK_SIZE=${FIXED_NETWORK_SIZE:-256}
NETWORK_GATEWAY=${NETWORK_GATEWAY:-10.0.0.1}
-# Find the interface used for the default route
-HOST_IP_IFACE=${HOST_IP_IFACE:-$(ip route | sed -n '/^default/{ s/.*dev \(\w\+\)\s\+.*/\1/; p; }' | head -1)}
-# Search for an IP unless an explicit is set by ``HOST_IP`` environment variable
-if [ -z "$HOST_IP" -o "$HOST_IP" == "dhcp" ]; then
- HOST_IP=""
- HOST_IPS=`LC_ALL=C ip -f inet addr show ${HOST_IP_IFACE} | awk '/inet/ {split($2,parts,"/"); print parts[1]}'`
- for IP in $HOST_IPS; do
- # Attempt to filter out IP addresses that are part of the fixed and
- # floating range. Note that this method only works if the ``netaddr``
- # python library is installed. If it is not installed, an error
- # will be printed and the first IP from the interface will be used.
- # If that is not correct set ``HOST_IP`` in ``localrc`` to the correct
- # address.
- if ! (address_in_net $IP $FIXED_RANGE || address_in_net $IP $FLOATING_RANGE); then
- HOST_IP=$IP
- break;
- fi
- done
- if [ "$HOST_IP" == "" ]; then
- die $LINENO "Could not determine host ip address. Either localrc specified dhcp on ${HOST_IP_IFACE} or defaulted"
- fi
+HOST_IP=$(get_default_host_ip $FIXED_RANGE $FLOATING_RANGE "$HOST_IP_IFACE" "$HOST_IP")
+if [ "$HOST_IP" == "" ]; then
+ die $LINENO "Could not determine host ip address. Either localrc specified dhcp on ${HOST_IP_IFACE} or defaulted"
fi
# Allow the use of an alternate hostname (such as localhost/127.0.0.1) for service endpoints.
@@ -524,9 +506,9 @@
# as the template to search for, appending '.*' to match the date
# we added on earlier runs.
LOGDIR=$(dirname "$LOGFILE")
- LOGNAME=$(basename "$LOGFILE")
+ LOGFILENAME=$(basename "$LOGFILE")
mkdir -p $LOGDIR
- find $LOGDIR -maxdepth 1 -name $LOGNAME.\* -mtime +$LOGDAYS -exec rm {} \;
+ find $LOGDIR -maxdepth 1 -name $LOGFILENAME.\* -mtime +$LOGDAYS -exec rm {} \;
LOGFILE=$LOGFILE.${CURRENT_LOG_TIME}
SUMFILE=$LOGFILE.${CURRENT_LOG_TIME}.summary
@@ -556,8 +538,8 @@
echo_summary "stack.sh log $LOGFILE"
# Specified logfile name always links to the most recent log
- ln -sf $LOGFILE $LOGDIR/$LOGNAME
- ln -sf $SUMFILE $LOGDIR/$LOGNAME.summary
+ ln -sf $LOGFILE $LOGDIR/$LOGFILENAME
+ ln -sf $SUMFILE $LOGDIR/$LOGFILENAME.summary
else
# Set up output redirection without log files
# Copy stdout to fd 3
@@ -1076,9 +1058,8 @@
iniset $NOVA_CONF DEFAULT compute_driver nova.virt.baremetal.driver.BareMetalDriver
iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
iniset $NOVA_CONF DEFAULT scheduler_host_manager nova.scheduler.baremetal_host_manager.BaremetalHostManager
- # NOTE(deva): ComputeCapabilitiesFilter does not currently work with Baremetal. See bug # 1129485
- # As a work around, we disable CCFilter by explicitly enabling all the other default filters.
- iniset $NOVA_CONF DEFAULT scheduler_default_filters ComputeFilter,RetryFilter,AvailabilityZoneFilter,ImagePropertiesFilter
+ iniset $NOVA_CONF DEFAULT ram_allocation_ratio 1.0
+ iniset $NOVA_CONF DEFAULT reserved_host_memory_mb 0
iniset $NOVA_CONF baremetal instance_type_extra_specs cpu_arch:$BM_CPU_ARCH
iniset $NOVA_CONF baremetal driver $BM_DRIVER
iniset $NOVA_CONF baremetal power_manager $BM_POWER_MANAGER
diff --git a/stackrc b/stackrc
index f2c279f..6b15504 100644
--- a/stackrc
+++ b/stackrc
@@ -45,15 +45,15 @@
CEILOMETER_BRANCH=master
# ceilometer client library
-CEILOMETERCLIENT_REPO=${GIT_BASE}/openstack/python-ceilometerclient
+CEILOMETERCLIENT_REPO=${GIT_BASE}/openstack/python-ceilometerclient.git
CEILOMETERCLIENT_BRANCH=master
# volume service
-CINDER_REPO=${GIT_BASE}/openstack/cinder
+CINDER_REPO=${GIT_BASE}/openstack/cinder.git
CINDER_BRANCH=master
# volume client
-CINDERCLIENT_REPO=${GIT_BASE}/openstack/python-cinderclient
+CINDERCLIENT_REPO=${GIT_BASE}/openstack/python-cinderclient.git
CINDERCLIENT_BRANCH=master
# compute service
@@ -63,11 +63,11 @@
# storage service
SWIFT_REPO=${GIT_BASE}/openstack/swift.git
SWIFT_BRANCH=master
-SWIFT3_REPO=https://github.com/fujita/swift3.git
+SWIFT3_REPO=${GIT_BASE}/fujita/swift3.git
SWIFT3_BRANCH=master
# python swift client library
-SWIFTCLIENT_REPO=${GIT_BASE}/openstack/python-swiftclient
+SWIFTCLIENT_REPO=${GIT_BASE}/openstack/python-swiftclient.git
SWIFTCLIENT_BRANCH=master
# image catalog service
@@ -75,7 +75,7 @@
GLANCE_BRANCH=master
# python glance client library
-GLANCECLIENT_REPO=${GIT_BASE}/openstack/python-glanceclient
+GLANCECLIENT_REPO=${GIT_BASE}/openstack/python-glanceclient.git
GLANCECLIENT_BRANCH=master
# unified auth system (manages accounts/tokens)
@@ -83,7 +83,7 @@
KEYSTONE_BRANCH=master
# a websockets/html5 or flash powered VNC console for vm instances
-NOVNC_REPO=https://github.com/kanaka/noVNC.git
+NOVNC_REPO=${GIT_BASE}/kanaka/noVNC.git
NOVNC_BRANCH=master
# a websockets/html5 or flash powered SPICE console for vm instances
@@ -103,15 +103,15 @@
OPENSTACKCLIENT_BRANCH=master
# python keystone client library to nova that horizon uses
-KEYSTONECLIENT_REPO=${GIT_BASE}/openstack/python-keystoneclient
+KEYSTONECLIENT_REPO=${GIT_BASE}/openstack/python-keystoneclient.git
KEYSTONECLIENT_BRANCH=master
# quantum service
-QUANTUM_REPO=${GIT_BASE}/openstack/quantum
+QUANTUM_REPO=${GIT_BASE}/openstack/quantum.git
QUANTUM_BRANCH=master
# quantum client
-QUANTUMCLIENT_REPO=${GIT_BASE}/openstack/python-quantumclient
+QUANTUMCLIENT_REPO=${GIT_BASE}/openstack/python-quantumclient.git
QUANTUMCLIENT_BRANCH=master
# Tempest test suite
@@ -127,17 +127,17 @@
HEATCLIENT_BRANCH=master
# ryu service
-RYU_REPO=https://github.com/osrg/ryu.git
+RYU_REPO=${GIT_BASE}/osrg/ryu.git
RYU_BRANCH=master
# diskimage-builder
-BM_IMAGE_BUILD_REPO=https://github.com/stackforge/diskimage-builder.git
+BM_IMAGE_BUILD_REPO=${GIT_BASE}/stackforge/diskimage-builder.git
BM_IMAGE_BUILD_BRANCH=master
# bm_poseur
# Used to simulate a hardware environment for baremetal
# Only used if BM_USE_FAKE_ENV is set
-BM_POSEUR_REPO=https://github.com/tripleo/bm_poseur.git
+BM_POSEUR_REPO=${GIT_BASE}/tripleo/bm_poseur.git
BM_POSEUR_BRANCH=master
diff --git a/tests/functions.sh b/tests/functions.sh
index 4fe6443..27a6cfe 100755
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -60,6 +60,10 @@
[ddd]
empty =
+
+[eee]
+multi = foo1
+multi = foo2
EOF
# Test with spaces
@@ -193,6 +197,34 @@
echo "inicomment failed: $VAL"
fi
+# Test multiple line iniset/iniget
+iniset_multiline test.ini eee multi bar1 bar2
+
+VAL=$(iniget_multiline test.ini eee multi)
+if [[ "$VAL" == "bar1 bar2" ]]; then
+ echo "OK: iniset_multiline"
+else
+ echo "iniset_multiline failed: $VAL"
+fi
+
+# Test iniadd with exiting values
+iniadd test.ini eee multi bar3
+VAL=$(iniget_multiline test.ini eee multi)
+if [[ "$VAL" == "bar1 bar2 bar3" ]]; then
+ echo "OK: iniadd"
+else
+ echo "iniadd failed: $VAL"
+fi
+
+# Test iniadd with non-exiting values
+iniadd test.ini eee non-multi foobar1 foobar2
+VAL=$(iniget_multiline test.ini eee non-multi)
+if [[ "$VAL" == "foobar1 foobar2" ]]; then
+ echo "OK: iniadd with non-exiting value"
+else
+ echo "iniadd with non-exsting failed: $VAL"
+fi
+
rm test.ini
# Enabling/disabling services
diff --git a/tools/xen/devstackubuntupreseed.cfg b/tools/xen/devstackubuntupreseed.cfg
index d8caaee..c559b1e 100644
--- a/tools/xen/devstackubuntupreseed.cfg
+++ b/tools/xen/devstackubuntupreseed.cfg
@@ -257,7 +257,7 @@
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
-#d-i base-installer/kernel/image string linux-generic
+d-i base-installer/kernel/image string linux-virtual
### Account setup
# Skip creation of a root account (normal user account will be able to
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
index f0e057b..0c0e1e2 100755
--- a/tools/xen/install_os_domU.sh
+++ b/tools/xen/install_os_domU.sh
@@ -20,13 +20,13 @@
fi
# This directory
-TOP_DIR=$(cd $(dirname "$0") && pwd)
+THIS_DIR=$(cd $(dirname "$0") && pwd)
# Source lower level functions
-. $TOP_DIR/../../functions
+. $THIS_DIR/../../functions
# Include onexit commands
-. $TOP_DIR/scripts/on_exit.sh
+. $THIS_DIR/scripts/on_exit.sh
#
@@ -49,7 +49,7 @@
# including installing XenAPI plugins
#
-cd $TOP_DIR
+cd $THIS_DIR
if [ -f ./master ]
then
rm -rf ./master
@@ -271,7 +271,7 @@
HTTP_SERVER_LOCATION="/var/www/html"
mkdir -p $HTTP_SERVER_LOCATION
fi
- cp -f $TOP_DIR/devstackubuntupreseed.cfg $HTTP_SERVER_LOCATION
+ cp -f $THIS_DIR/devstackubuntupreseed.cfg $HTTP_SERVER_LOCATION
MIRROR=${MIRROR:-""}
if [ -n "$MIRROR" ]; then
sed -e "s,d-i mirror/http/hostname string .*,d-i mirror/http/hostname string $MIRROR," \
@@ -280,11 +280,11 @@
fi
# Update the template
- $TOP_DIR/scripts/install_ubuntu_template.sh $PRESEED_URL
+ $THIS_DIR/scripts/install_ubuntu_template.sh $PRESEED_URL
# create a new VM with the given template
# creating the correct VIFs and metadata
- $TOP_DIR/scripts/install-os-vpx.sh -t "$UBUNTU_INST_TEMPLATE_NAME" -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -r $OSDOMU_MEM_MB -k "flat_network_bridge=${VM_BR}"
+ $THIS_DIR/scripts/install-os-vpx.sh -t "$UBUNTU_INST_TEMPLATE_NAME" -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -r $OSDOMU_MEM_MB -k "flat_network_bridge=${VM_BR}"
# wait for install to finish
wait_for_VM_to_halt
@@ -298,7 +298,7 @@
#
# Install XenServer tools, and other such things
- $TOP_DIR/prepare_guest_template.sh "$GUEST_NAME"
+ $THIS_DIR/prepare_guest_template.sh "$GUEST_NAME"
# start the VM to run the prepare steps
xe vm-start vm="$GUEST_NAME"
@@ -320,7 +320,7 @@
#
# Inject DevStack inside VM disk
#
-$TOP_DIR/build_xva.sh "$GUEST_NAME"
+$THIS_DIR/build_xva.sh "$GUEST_NAME"
# create a snapshot before the first boot
# to allow a quick re-run with the same settings
diff --git a/tools/xen/xenrc b/tools/xen/xenrc
index 1a5a2a9..e4d8ac9 100644
--- a/tools/xen/xenrc
+++ b/tools/xen/xenrc
@@ -32,10 +32,10 @@
PUB_IP=${PUB_IP:-192.168.1.55}
# Public network
-PUB_BR=${PUB_BR:-"xenbr0"}
-PUB_DEV=${PUB_DEV:-eth0}
-PUB_VLAN=${PUB_VLAN:--1}
PUB_NETMASK=${PUB_NETMASK:-255.255.255.0}
+PUB_BR=${PUB_BR:-"xenbr0"}
+PUB_VLAN=${PUB_VLAN:--1}
+PUB_DEV=${PUB_DEV:-eth0}
# VM network params
VM_NETMASK=${VM_NETMASK:-255.255.255.0}