xenapi - cleanup
Add error on unitialised variable to the scripts. This way some issues
were identified. Also modify README with fresh variables. The patch
includes:
- Add SWIFT_HASH to the README
- Add XENAPI_CONNECTION_URL to the README
- Add VNCSERVER_PROXYCLIENT_ADDRESS to the README
- Introduce UBUNTU_INST_IFACE which is the OpenStack VM interface used
for the netinstall. It defaults to eth3. Previously this parameter
was set by the combination of HOST_IP_IFACE and the undocumented
NETINSTALL_IP
- get rid of NETINSTALL_IP
- xenrc includes CLEAN_TEMPLATES
- xenrc no longer tries to change directory
- remove chrooting from prepare_guest.sh (STAGING_DIR was always / )
- remove DO_TGZ variable from prepare_guest.sh
- use arguments to call prepare_guest.sh, instead of env vars
- Fix backslash escaping in prepare_guest_template.sh
NOTE: networking is about to be addressed in a separate change.
Related to blueprint xenapi-devstack-cleanup
Change-Id: Ie9a75321c7f41cc9a0cc051398d1e6ec2c88adfa
diff --git a/tools/xen/scripts/install_ubuntu_template.sh b/tools/xen/scripts/install_ubuntu_template.sh
index 43b6dec..00cabb0 100755
--- a/tools/xen/scripts/install_ubuntu_template.sh
+++ b/tools/xen/scripts/install_ubuntu_template.sh
@@ -7,9 +7,8 @@
# Based on a script by: David Markey <david.markey@citrix.com>
#
-# Exit on errors
set -o errexit
-# Echo commands
+set -o nounset
set -o xtrace
# This directory
@@ -54,11 +53,11 @@
pvargs="-- quiet console=hvc0 partman/default_filesystem=ext3 \
console-setup/ask_detect=false locale=${UBUNTU_INST_LOCALE} \
keyboard-configuration/layoutcode=${UBUNTU_INST_KEYBOARD} \
-netcfg/choose_interface=${HOST_IP_IFACE} \
+netcfg/choose_interface=${UBUNTU_INST_IFACE} \
netcfg/get_hostname=os netcfg/get_domain=os auto \
url=${preseed_url}"
-if [ "$NETINSTALLIP" != "dhcp" ]; then
+if [ "$UBUNTU_INST_IP" != "dhcp" ]; then
netcfgargs="netcfg/disable_autoconfig=true \
netcfg/get_nameservers=${UBUNTU_INST_NAMESERVERS} \
netcfg/get_ipaddress=${UBUNTU_INST_IP} \