Merge "fixed_key: By default use a hardcoded fixed_key across devstack envs"
diff --git a/.zuul.yaml b/.zuul.yaml
index f03d30a..25bd757 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -9,6 +9,36 @@
- controller
- nodeset:
+ name: devstack-single-node-centos-7
+ nodes:
+ - name: controller
+ label: centos-7
+ groups:
+ - name: tempest
+ nodes:
+ - controller
+
+- nodeset:
+ name: devstack-single-node-opensuse-423
+ nodes:
+ - name: controller
+ label: opensuse-423
+ groups:
+ - name: tempest
+ nodes:
+ - controller
+
+- nodeset:
+ name: devstack-single-node-fedora-27
+ nodes:
+ - name: controller
+ label: fedora-27
+ groups:
+ - name: tempest
+ nodes:
+ - controller
+
+- nodeset:
name: openstack-two-node
nodes:
- name: controller
@@ -26,46 +56,47 @@
- name: subnode
nodes:
- compute1
+ - name: switch
+ nodes:
+ - controller
+ - name: peers
+ nodes:
+ - compute1
- job:
- name: devstack
+ name: devstack-base
parent: multinode
- description: Base devstack job
- nodeset: openstack-single-node
+ abstract: true
+ description: |
+ Base abstract Devstack job.
+
+ Defines plays and base variables, but it does not include any project
+ and it does not run any service by default. This is a common base for
+ all single Devstack jobs, single or multinode.
+ Variables are defined in job.vars, which is what is then used by single
+ node jobs and by multi node jobs for the controller, as well as in
+ job.group-vars.peers, which is what is used by multi node jobs for peer
+ nodes (everything but the controller).
required-projects:
- openstack-dev/devstack
- - openstack/cinder
- - openstack/glance
- - openstack/keystone
- - openstack/neutron
- - openstack/nova
- - openstack/requirements
- - openstack/swift
roles:
- zuul: openstack-infra/devstack-gate
- zuul: openstack-infra/openstack-zuul-jobs
- timeout: 7200
vars:
- test_matrix_configs: [neutron, tlsproxy]
devstack_localrc:
DATABASE_PASSWORD: secretdatabase
RABBIT_PASSWORD: secretrabbit
ADMIN_PASSWORD: secretadmin
SERVICE_PASSWORD: secretservice
NETWORK_GATEWAY: 10.1.0.1
- Q_USE_DEBUG_COMMAND: true
FIXED_RANGE: 10.1.0.0/20
IPV4_ADDRS_SAFE_TO_USE: 10.1.0.0/20
FLOATING_RANGE: 172.24.5.0/24
PUBLIC_NETWORK_GATEWAY: 172.24.5.1
- FLOATING_HOST_PREFIX: 172.24.4
- FLOATING_HOST_MASK: 23
- SWIFT_REPLICAS: 1
- SWIFT_START_ALL_SERVICES: false
- SWIFT_HASH: 1234123412341234
LOGFILE: /opt/stack/logs/devstacklog.txt
LOG_COLOR: false
VERBOSE: true
+ VERBOSE_NO_TIMESTAMP: true
NOVNC_FROM_PACKAGE: true
ERROR_ON_CLONE: true
# Gate jobs can't deal with nested virt. Disable it.
@@ -75,11 +106,11 @@
# from the location below for all the CI jobs.
ETCD_DOWNLOAD_URL: http://tarballs.openstack.org/etcd/
devstack_services:
- horizon: false
- tempest: false
+ base: false
zuul_copy_output:
'{{ devstack_conf_dir }}/local.conf': 'logs'
'{{ devstack_conf_dir }}/localrc': 'logs'
+ '{{ devstack_conf_dir }}/.localrc.auto': 'logs'
'{{ devstack_conf_dir }}/.stackenv': 'logs'
'{{ devstack_log_dir }}/dstat-csv.log': 'logs'
'{{ devstack_log_dir }}/devstacklog.txt': 'logs'
@@ -111,6 +142,34 @@
'/etc/glusterfs/glusterd.vol': 'logs'
'/etc/resolv.conf': 'logs'
'/var/log/unbound.log': 'logs'
+ extensions_to_txt:
+ conf: True
+ log: True
+ localrc: True
+ stackenv: True
+ auto: True
+ group-vars:
+ peers:
+ devstack_localrc:
+ DATABASE_PASSWORD: secretdatabase
+ RABBIT_PASSWORD: secretrabbit
+ ADMIN_PASSWORD: secretadmin
+ SERVICE_PASSWORD: secretservice
+ NETWORK_GATEWAY: 10.1.0.1
+ FIXED_RANGE: 10.1.0.0/20
+ IPV4_ADDRS_SAFE_TO_USE: 10.1.0.0/20
+ FLOATING_RANGE: 172.24.5.0/24
+ PUBLIC_NETWORK_GATEWAY: 172.24.5.1
+ LOGFILE: /opt/stack/logs/devstacklog.txt
+ LOG_COLOR: false
+ VERBOSE: true
+ VERBOSE_NO_TIMESTAMP: true
+ NOVNC_FROM_PACKAGE: true
+ ERROR_ON_CLONE: true
+ LIBVIRT_TYPE: qemu
+ ETCD_DOWNLOAD_URL: http://tarballs.openstack.org/etcd/
+ devstack_services:
+ base: false
pre-run: playbooks/pre.yaml
run: playbooks/devstack.yaml
post-run: playbooks/post.yaml
@@ -124,8 +183,40 @@
- ^.*/locale/.*po$
- job:
+ name: devstack
+ parent: devstack-base
+ description: |
+ Single node devstack job for integration gate.
+ nodeset: openstack-single-node
+ required-projects:
+ - openstack/cinder
+ - openstack/glance
+ - openstack/keystone
+ - openstack/neutron
+ - openstack/nova
+ - openstack/requirements
+ - openstack/swift
+ timeout: 7200
+ vars:
+ test_matrix_configs: [neutron, tlsproxy]
+ devstack_localrc:
+ # Common OpenStack services settings
+ SWIFT_REPLICAS: 1
+ SWIFT_START_ALL_SERVICES: false
+ SWIFT_HASH: 1234123412341234
+ CINDER_PERIODIC_INTERVAL: 10
+ DEBUG_LIBVIRT_COREDUMPS: True
+ NOVA_VNC_ENABLED: true
+ VNCSERVER_LISTEN: 0.0.0.0
+ VNCSERVER_PROXYCLIENT_ADDRESS: "{{ hostvars[inventory_hostname]['nodepool']['private_ipv4'] }}"
+ devstack_services:
+ base: true
+ horizon: false
+ tempest: false
+
+- job:
name: devstack-multinode
- parent: devstack
+ parent: devstack-base
description: Base devstack multinode job
nodeset: openstack-two-node
# NOTE(andreaf) The multinode job is useful to see the setup of different
@@ -133,6 +224,31 @@
# ready yet. Until then this job should stay non-voting.
voting: false
+# NOTE(ianw) Platform tests have traditionally been non-voting because
+# we often have to rush things through devstack to stabilise the gate,
+# and these platforms don't have the round-the-clock support to avoid
+# becoming blockers in that situation.
+- job:
+ name: devstack-platform-centos-7
+ parent: tempest-full
+ description: Centos 7 platform test
+ nodeset: devstack-single-node-centos-7
+ voting: false
+
+- job:
+ name: devstack-platform-opensuse-423
+ parent: tempest-full
+ description: OpenSuSE 43.2 platform test
+ nodeset: devstack-single-node-opensuse-423
+ voting: false
+
+- job:
+ name: devstack-platform-fedora-27
+ parent: tempest-full
+ description: Fedora 27 platform test
+ nodeset: devstack-single-node-fedora-27
+ voting: false
+
- job:
name: devstack-tox-base
parent: devstack
@@ -187,11 +303,34 @@
- playbooks/tox/pre.yaml
run: playbooks/tox/run.yaml
+- job:
+ name: devstack-unit-tests
+ description: |
+ Runs unit tests on devstack project.
+
+ It runs ``run_tests.sh``.
+ pre-run: playbooks/unit-tests/pre.yaml
+ run: playbooks/unit-tests/run.yaml
+
- project:
check:
jobs:
- devstack
+ - devstack-platform-centos-7
+ - devstack-platform-opensuse-423
+ - devstack-platform-fedora-27
- devstack-multinode
+ - devstack-unit-tests
gate:
jobs:
- devstack
+ - devstack-unit-tests
+ # Please add a note on each job and conditions for the job not
+ # being experimental any more, so we can keep this list somewhat
+ # pruned.
+ #
+ # * nova-next: maintained by nova for unreleased/undefaulted
+ # things like cellsv2 and placement-api
+ experimental:
+ jobs:
+ - nova-next
diff --git a/doc/requirements.txt b/doc/requirements.txt
index e140bc0..f65e9df 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -8,3 +8,4 @@
blockdiag
sphinxcontrib-blockdiag
sphinxcontrib-nwdiag
+zuul-sphinx>=0.2.0
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 780237f..e9708fa 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -26,7 +26,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = [ 'openstackdocstheme', 'sphinxcontrib.blockdiag', 'sphinxcontrib.nwdiag' ]
+extensions = [ 'sphinx.ext.autodoc', 'zuul_sphinx', 'openstackdocstheme', 'sphinxcontrib.blockdiag', 'sphinxcontrib.nwdiag' ]
# openstackdocstheme options
repository_name = 'openstack-dev/devstack'
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 49cad05..1d02395 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -286,6 +286,18 @@
LOG_COLOR=False
+When using the logfile, by default logs are sent to the console and
+the file. You can set ``VERBOSE`` to ``false`` if you only wish the
+logs to be sent to the file (this may avoid having double-logging in
+some cases where you are capturing the script output and the log
+files). If ``VERBOSE`` is ``true`` you can additionally set
+``VERBOSE_NO_TIMESTAMP`` to avoid timestamps being added to each
+output line sent to the console. This can be useful in some
+situations where the console output is being captured by a runner or
+framework (e.g. Ansible) that adds its own timestamps. Note that the
+log lines sent to the ``LOGFILE`` will still be prefixed with a
+timestamp.
+
Logging the Service Output
~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 47087c5..9254c23 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -139,6 +139,8 @@
Enable :doc:`devstack plugins <plugins>` to support additional
services, features, and configuration not present in base devstack.
+Use devstack in your CI with :doc:`Ansible roles <roles>` for Zuul V3.
+
Get :doc:`the big picture <overview>` of what we are trying to do
with devstack, and help us by :doc:`contributing to the project
<hacking>`.
diff --git a/doc/source/plugin-registry.rst b/doc/source/plugin-registry.rst
index d830507..591e226 100644
--- a/doc/source/plugin-registry.rst
+++ b/doc/source/plugin-registry.rst
@@ -157,6 +157,7 @@
python-openstacksdk `git://git.openstack.org/openstack/python-openstacksdk <https://git.openstack.org/cgit/openstack/python-openstacksdk>`__
qinling `git://git.openstack.org/openstack/qinling <https://git.openstack.org/cgit/openstack/qinling>`__
rally `git://git.openstack.org/openstack/rally <https://git.openstack.org/cgit/openstack/rally>`__
+rally-openstack `git://git.openstack.org/openstack/rally-openstack <https://git.openstack.org/cgit/openstack/rally-openstack>`__
sahara `git://git.openstack.org/openstack/sahara <https://git.openstack.org/cgit/openstack/sahara>`__
sahara-dashboard `git://git.openstack.org/openstack/sahara-dashboard <https://git.openstack.org/cgit/openstack/sahara-dashboard>`__
scalpels `git://git.openstack.org/openstack/scalpels <https://git.openstack.org/cgit/openstack/scalpels>`__
@@ -169,6 +170,7 @@
tacker `git://git.openstack.org/openstack/tacker <https://git.openstack.org/cgit/openstack/tacker>`__
tap-as-a-service `git://git.openstack.org/openstack/tap-as-a-service <https://git.openstack.org/cgit/openstack/tap-as-a-service>`__
tap-as-a-service-dashboard `git://git.openstack.org/openstack/tap-as-a-service-dashboard <https://git.openstack.org/cgit/openstack/tap-as-a-service-dashboard>`__
+tatu `git://git.openstack.org/openstack/tatu <https://git.openstack.org/cgit/openstack/tatu>`__
telemetry-tempest-plugin `git://git.openstack.org/openstack/telemetry-tempest-plugin <https://git.openstack.org/cgit/openstack/telemetry-tempest-plugin>`__
tricircle `git://git.openstack.org/openstack/tricircle <https://git.openstack.org/cgit/openstack/tricircle>`__
trio2o `git://git.openstack.org/openstack/trio2o <https://git.openstack.org/cgit/openstack/trio2o>`__
diff --git a/doc/source/roles.rst b/doc/source/roles.rst
new file mode 100644
index 0000000..5baa1e4
--- /dev/null
+++ b/doc/source/roles.rst
@@ -0,0 +1,4 @@
+Roles
+=====
+
+.. zuul:autoroles::
diff --git a/files/rpms-suse/general b/files/rpms-suse/general
index 0c1a281..0b69cb1 100644
--- a/files/rpms-suse/general
+++ b/files/rpms-suse/general
@@ -19,6 +19,7 @@
net-tools
openssh
openssl
+pcre-devel # python-pcre
postgresql-devel # psycopg2
psmisc
python-cmd2 # dist:opensuse-12.3
diff --git a/functions b/functions
index 959133c..24994c0 100644
--- a/functions
+++ b/functions
@@ -446,7 +446,12 @@
ID=""
while [[ "\$ID" == "" ]]; do
sleep 1
- ID=\$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" compute service list --host `hostname` --service nova-compute -c ID -f value)
+ if [[ "$VIRT_DRIVER" = 'fake' ]]; then
+ # When using the fake driver the compute hostnames have a suffix of 1 to NUMBER_FAKE_NOVA_COMPUTE
+ ID=\$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" compute service list --host `hostname`1 --service nova-compute -c ID -f value)
+ else
+ ID=\$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" compute service list --host `hostname` --service nova-compute -c ID -f value)
+ fi
done
EOF
time_stop "wait_for_service"
@@ -712,7 +717,7 @@
# Create a loopback disk and format it to XFS.
if [[ -e ${disk_image} ]]; then
if egrep -q ${storage_data_dir} /proc/mounts; then
- sudo umount ${storage_data_dir}/drives/sdb1
+ sudo umount ${storage_data_dir}
sudo rm -f ${disk_image}
fi
fi
@@ -805,13 +810,11 @@
#
# Write out various useful state information to /etc/devstack-version
function write_devstack_version {
- cat - > /tmp/devstack-version <<EOF
+ cat - <<EOF | sudo tee /etc/devstack-version >/dev/null
DevStack Version: ${DEVSTACK_SERIES}
Change: $(git log --format="%H %s %ci" -1)
OS Version: ${os_VENDOR} ${os_RELEASE} ${os_CODENAME}
EOF
- sudo install -m 644 /tmp/devstack-version /etc/devstack-version
- rm /tmp/devstack-version
}
# Restore xtrace
diff --git a/lib/cinder b/lib/cinder
index 96a7d5b..a1d6871 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -101,7 +101,7 @@
if is_fedora; then
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-lioadm}
if [[ ${CINDER_ISCSI_HELPER} != "lioadm" ]]; then
- die "lioadm is the only valid Cinder iscsi_helper config on this platform"
+ die "lioadm is the only valid Cinder target_helper config on this platform"
fi
else
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm}
@@ -230,7 +230,7 @@
iniset $CINDER_CONF DEFAULT auth_strategy keystone
iniset $CINDER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
- iniset $CINDER_CONF DEFAULT iscsi_helper "$CINDER_ISCSI_HELPER"
+ iniset $CINDER_CONF DEFAULT target_helper "$CINDER_ISCSI_HELPER"
iniset $CINDER_CONF database 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"
@@ -372,7 +372,7 @@
get_or_create_endpoint \
"block-storage" \
"$REGION_NAME" \
- "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST/"
+ "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST/volume/"
get_or_create_endpoint \
"volume" \
diff --git a/lib/cinder_backends/fake_gate b/lib/cinder_backends/fake_gate
index 6b1f848..3ffd9a6 100644
--- a/lib/cinder_backends/fake_gate
+++ b/lib/cinder_backends/fake_gate
@@ -50,7 +50,7 @@
iniset $CINDER_CONF $be_name volume_backend_name $be_name
iniset $CINDER_CONF $be_name volume_driver "cinder.tests.fake_driver.FakeGateDriver"
iniset $CINDER_CONF $be_name volume_group $VOLUME_GROUP_NAME-$be_name
- iniset $CINDER_CONF $be_name iscsi_helper "$CINDER_ISCSI_HELPER"
+ iniset $CINDER_CONF $be_name target_helper "$CINDER_ISCSI_HELPER"
iniset $CINDER_CONF $be_name lvm_type "$CINDER_LVM_TYPE"
if [[ "$CINDER_VOLUME_CLEAR" == "non" ]]; then
diff --git a/lib/cinder_backends/lvm b/lib/cinder_backends/lvm
index 03e1880..497081c 100644
--- a/lib/cinder_backends/lvm
+++ b/lib/cinder_backends/lvm
@@ -50,7 +50,7 @@
iniset $CINDER_CONF $be_name volume_backend_name $be_name
iniset $CINDER_CONF $be_name volume_driver "cinder.volume.drivers.lvm.LVMVolumeDriver"
iniset $CINDER_CONF $be_name volume_group $VOLUME_GROUP_NAME-$be_name
- iniset $CINDER_CONF $be_name iscsi_helper "$CINDER_ISCSI_HELPER"
+ iniset $CINDER_CONF $be_name target_helper "$CINDER_ISCSI_HELPER"
iniset $CINDER_CONF $be_name lvm_type "$CINDER_LVM_TYPE"
}
diff --git a/lib/horizon b/lib/horizon
index 3d2f68d..fab41bb 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -26,9 +26,6 @@
# Defaults
# --------
-# Set up default directories
-GITDIR["django_openstack_auth"]=$DEST/django_openstack_auth
-
HORIZON_DIR=$DEST/horizon
# local_settings.py is used to customize Dashboard settings.
@@ -159,20 +156,6 @@
}
-# install_django_openstack_auth() - Collect source and prepare
-function install_django_openstack_auth {
- if use_library_from_git "django_openstack_auth"; then
- local dir=${GITDIR["django_openstack_auth"]}
- git_clone_by_name "django_openstack_auth"
- # Compile message catalogs before installation
- _prepare_message_catalog_compilation
- (cd $dir; $PYTHON setup.py compile_catalog)
- setup_dev_lib "django_openstack_auth"
- fi
- # if we aren't using this library from git, then we just let it
- # get dragged in by the horizon setup.
-}
-
# install_horizon() - Collect source and prepare
function install_horizon {
# Apache installation, because we mark it NOPRIME
@@ -191,13 +174,6 @@
stop_apache_server
}
-# NOTE: It can be moved to common functions, but it is only used by compilation
-# of django_openstack_auth catalogs at the moment.
-function _prepare_message_catalog_compilation {
- pip_install_gr Babel
-}
-
-
# Restore xtrace
$_XTRACE_HORIZON
diff --git a/lib/neutron b/lib/neutron
index c5839f5..0834792 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -42,6 +42,7 @@
NEUTRON_DHCP_CONF=$NEUTRON_CONF_DIR/dhcp_agent.ini
NEUTRON_L3_CONF=$NEUTRON_CONF_DIR/l3_agent.ini
NEUTRON_AGENT_CONF=$NEUTRON_CONF_DIR/
+NEUTRON_CREATE_INITIAL_NETWORKS=${NEUTRON_CREATE_INITIAL_NETWORKS:-True}
NEUTRON_STATE_PATH=${NEUTRON_STATE_PATH:=$DATA_DIR/neutron}
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
@@ -438,7 +439,7 @@
if is_service_enabled neutron-l3; then
run_process neutron-l3 "$NEUTRON_BIN_DIR/$NEUTRON_L3_BINARY --config-file $NEUTRON_CONF --config-file $NEUTRON_L3_CONF"
fi
- if is_service_enabled neutron-api; then
+ if is_service_enabled neutron-api && [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "True" ]]; then
# XXX(sc68cal) - Here's where plugins can wire up their own networks instead
# of the code in lib/neutron_plugins/services/l3
if type -p neutron_plugin_create_initial_networks > /dev/null; then
diff --git a/lib/neutron-legacy b/lib/neutron-legacy
index bb76c5f..9701ee7 100644
--- a/lib/neutron-legacy
+++ b/lib/neutron-legacy
@@ -929,7 +929,7 @@
}
function _get_net_id {
- neutron --os-cloud devstack-admin --os-region "$REGION_NAME" --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD net-list | grep $1 | awk '{print $2}'
+ openstack --os-cloud devstack-admin --os-region-name="$REGION_NAME" --os-project-name admin --os-username admin --os-password $ADMIN_PASSWORD network list | grep $1 | awk '{print $2}'
}
function _get_probe_cmd_prefix {
diff --git a/lib/nova b/lib/nova
index fea2b85..580f87f 100644
--- a/lib/nova
+++ b/lib/nova
@@ -82,6 +82,10 @@
NOVA_SERVICE_PROTOCOL="https"
fi
+# Whether to use TLS for comms between the VNC/SPICE/serial proxy
+# services and the compute node
+NOVA_CONSOLE_PROXY_COMPUTE_TLS=${NOVA_CONSOLE_PROXY_COMPUTE_TLS:-False}
+
# Public facing bits
NOVA_SERVICE_HOST=${NOVA_SERVICE_HOST:-$SERVICE_HOST}
NOVA_SERVICE_PORT=${NOVA_SERVICE_PORT:-8774}
@@ -197,6 +201,13 @@
return 1
}
+# is_nova_console_proxy_compute_tls_enabled() - Test if the Nova Console Proxy
+# service has TLS enabled
+function is_nova_console_proxy_compute_tls_enabled {
+ [[ ${NOVA_CONSOLE_PROXY_COMPUTE_TLS} = "True" ]] && return 0
+ return 1
+}
+
# Helper to clean iptables rules
function clean_iptables {
# Delete rules
@@ -424,7 +435,7 @@
iniset $NOVA_CONF DEFAULT osapi_compute_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
iniset $NOVA_CONF DEFAULT metadata_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
- iniset $NOVA_CONF key_manager api_class nova.keymgr.conf_key_mgr.ConfKeyManager
+ iniset $NOVA_CONF key_manager backend nova.keymgr.conf_key_mgr.ConfKeyManager
if is_fedora || is_suse; then
# nova defaults to /usr/local/bin, but fedora and suse pip like to
@@ -524,6 +535,17 @@
iniset $NOVA_CONF vnc server_proxyclient_address "$VNCSERVER_PROXYCLIENT_ADDRESS"
iniset $NOVA_CONF vnc novncproxy_host "$NOVA_SERVICE_LISTEN_ADDRESS"
iniset $NOVA_CONF vnc xvpvncproxy_host "$NOVA_SERVICE_LISTEN_ADDRESS"
+
+ if is_nova_console_proxy_compute_tls_enabled ; then
+ iniset $NOVA_CONF vnc auth_schemes "vencrypt"
+ iniset $NOVA_CONF vnc vencrypt_client_key "/etc/pki/nova-novnc/client-key.pem"
+ iniset $NOVA_CONF vnc vencrypt_client_cert "/etc/pki/nova-novnc/client-cert.pem"
+ iniset $NOVA_CONF vnc vencrypt_ca_certs "/etc/pki/nova-novnc/ca-cert.pem"
+
+ sudo mkdir -p /etc/pki/nova-novnc
+ deploy_int_CA /etc/pki/nova-novnc/ca-cert.pem
+ deploy_int_cert /etc/pki/nova-novnc/client-cert.pem /etc/pki/nova-novnc/client-key.pem
+ fi
else
iniset $NOVA_CONF vnc enabled false
fi
@@ -877,7 +899,7 @@
# creating or modifying real configurations. Each fake
# gets its own configuration and own log file.
local fake_conf="${NOVA_FAKE_CONF}-${i}"
- iniset $fake_conf DEFAULT nhost "${HOSTNAME}${i}"
+ iniset $fake_conf DEFAULT host "${HOSTNAME}${i}"
run_process "n-cpu-${i}" "$NOVA_BIN_DIR/nova-compute --config-file $NOVA_CPU_CONF --config-file $fake_conf"
done
else
@@ -978,7 +1000,7 @@
# because of the dom0/domU split. Just ignore for now.
return
fi
- wait_for_compute 60
+ wait_for_compute $NOVA_READY_TIMEOUT
}
function start_nova {
diff --git a/lib/nova_plugins/functions-libvirt b/lib/nova_plugins/functions-libvirt
index 147ed8b..fcb4777 100644
--- a/lib/nova_plugins/functions-libvirt
+++ b/lib/nova_plugins/functions-libvirt
@@ -149,6 +149,18 @@
fi
fi
+ if is_nova_console_proxy_compute_tls_enabled ; then
+ if is_service_enabled n-novnc ; then
+ echo "vnc_tls = 1" | sudo tee -a $QEMU_CONF
+ echo "vnc_tls_x509_verify = 1" | sudo tee -a $QEMU_CONF
+
+ sudo mkdir -p /etc/pki/libvirt-vnc
+ sudo chown libvirt-qemu:libvirt-qemu /etc/pki/libvirt-vnc
+ deploy_int_CA /etc/pki/libvirt-vnc/ca-cert.pem
+ deploy_int_cert /etc/pki/libvirt-vnc/server-cert.pem /etc/pki/libvirt-vnc/server-key.pem
+ fi
+ fi
+
# Service needs to be started on redhat/fedora -- do a restart for
# sanity after fiddling the config.
restart_service $LIBVIRT_DAEMON
diff --git a/lib/nova_plugins/hypervisor-ironic b/lib/nova_plugins/hypervisor-ironic
index ee1a0e0..c91f70b 100644
--- a/lib/nova_plugins/hypervisor-ironic
+++ b/lib/nova_plugins/hypervisor-ironic
@@ -58,6 +58,9 @@
iniset $NOVA_CONF ironic project_domain_id default
iniset $NOVA_CONF ironic user_domain_id default
iniset $NOVA_CONF ironic project_name demo
+
+ iniset $NOVA_CONF ironic api_max_retries 300
+ iniset $NOVA_CONF ironic api_retry_interval 5
}
# install_nova_hypervisor() - Install external components
diff --git a/lib/swift b/lib/swift
index 1601e2b..1187846 100644
--- a/lib/swift
+++ b/lib/swift
@@ -827,7 +827,8 @@
else
# The container-sync daemon is strictly needed to pass the container
# sync Tempest tests.
- swift-init --run-dir=${SWIFT_DATA_DIR}/run container-sync start
+ enable_service s-container-sync
+ run_process s-container-sync "$SWIFT_BIN_DIR/swift-container-sync ${SWIFT_CONF_DIR}/container-server/1.conf"
fi
else
swift-init --run-dir=${SWIFT_DATA_DIR}/run all restart || true
diff --git a/lib/tls b/lib/tls
index 0bc389b..a72b708 100644
--- a/lib/tls
+++ b/lib/tls
@@ -340,6 +340,24 @@
fi
}
+# Deploy the service cert & key to a service specific
+# location
+function deploy_int_cert {
+ local cert_target_file=$1
+ local key_target_file=$2
+
+ sudo cp "$INT_CA_DIR/$DEVSTACK_CERT_NAME.crt" "$cert_target_file"
+ sudo cp "$INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key" "$key_target_file"
+}
+
+# Deploy the intermediate CA cert bundle file to a service
+# specific location
+function deploy_int_CA {
+ local ca_target_file=$1
+
+ sudo cp "$INT_CA_DIR/ca-chain.pem" "$ca_target_file"
+}
+
# If a non-system python-requests is installed then it will use the
# built-in CA certificate store rather than the distro-specific
# CA certificate store. Detect this and symlink to the correct
diff --git a/playbooks/post.yaml b/playbooks/post.yaml
index d8ee99e..9e66f20 100644
--- a/playbooks/post.yaml
+++ b/playbooks/post.yaml
@@ -24,12 +24,6 @@
# capture-system-logs should be the last role before stage-output
- capture-system-logs
- role: stage-output
- extensions_to_txt:
- - conf
- - log
- - localrc
- - stackenv
- - summary
# NOTE(andreaf) We need fetch-devstack-log-dir only as long as the base job
# starts pulling logs for us from {{ ansible_user_dir }}/logs.
# Meanwhile we already store things in ansible_user_dir and use
diff --git a/playbooks/unit-tests/pre.yaml b/playbooks/unit-tests/pre.yaml
new file mode 100644
index 0000000..cfa1676
--- /dev/null
+++ b/playbooks/unit-tests/pre.yaml
@@ -0,0 +1,13 @@
+- hosts: all
+
+ tasks:
+
+ - name: Install prerequisites
+ shell:
+ chdir: '{{ zuul.project.src_dir }}'
+ executable: /bin/bash
+ cmd: |
+ set -e
+ set -x
+ echo "IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20" >> localrc
+ ./tools/install_prereqs.sh
diff --git a/playbooks/unit-tests/run.yaml b/playbooks/unit-tests/run.yaml
new file mode 100644
index 0000000..181521f
--- /dev/null
+++ b/playbooks/unit-tests/run.yaml
@@ -0,0 +1,12 @@
+- hosts: all
+
+ tasks:
+
+ - name: Run run_tests.sh
+ shell:
+ chdir: '{{ zuul.project.src_dir }}'
+ executable: /bin/bash
+ cmd: |
+ set -e
+ set -x
+ ./run_tests.sh
diff --git a/roles/apache-logs-conf/tasks/main.yaml b/roles/apache-logs-conf/tasks/main.yaml
index 7fd490e..bd64574 100644
--- a/roles/apache-logs-conf/tasks/main.yaml
+++ b/roles/apache-logs-conf/tasks/main.yaml
@@ -10,11 +10,13 @@
path: "/var/log/apache2"
file_type: any
register: debian_suse_apache_logs
+
- name: Dereference files
stat:
path: "{{ item.path }}"
with_items: "{{ debian_suse_apache_logs.files }}"
register: debian_suse_apache_deref_logs
+
- name: Create hard links
file:
src: "{{ item.stat.lnk_source | default(item.stat.path) }}"
@@ -24,6 +26,7 @@
when:
- item.stat.isreg or item.stat.islnk
when: ansible_os_family in ('Debian', 'Suse')
+ no_log: true
- name: Link apache logs on RedHat
block:
@@ -32,11 +35,13 @@
path: "/var/log/httpd"
file_type: any
register: redhat_apache_logs
+
- name: Dereference files
stat:
path: "{{ item.path }}"
with_items: "{{ redhat_apache_logs.files }}"
register: redhat_apache_deref_logs
+
- name: Create hard links
file:
src: "{{ item.stat.lnk_source | default(item.stat.path) }}"
@@ -45,7 +50,8 @@
with_items: "{{ redhat_apache_deref_logs.results }}"
when:
- item.stat.isreg or item.stat.islnk
- when: ansible_os_family == 'Redhat'
+ when: ansible_os_family == 'RedHat'
+ no_log: true
- name: Ensure {{ stage_dir }}/apache_config apache_config exists
file:
@@ -57,19 +63,21 @@
apache_config_paths:
'Debian': '/etc/apache2/sites-enabled/'
'Suse': '/etc/apache2/conf.d/'
- 'Redhat': '/etc/httpd/conf.d/'
+ 'RedHat': '/etc/httpd/conf.d/'
- name: Discover configurations
find:
path: "{{ apache_config_paths[ansible_os_family] }}"
file_type: any
register: apache_configs
+ no_log: true
- name: Dereference configurations
stat:
path: "{{ item.path }}"
with_items: "{{ apache_configs.files }}"
register: apache_configs_deref
+ no_log: true
- name: Link configurations
file:
@@ -78,3 +86,4 @@
state: hard
with_items: "{{ apache_configs_deref.results }}"
when: item.stat.isreg or item.stat.islnk
+ no_log: true
diff --git a/roles/capture-system-logs/tasks/main.yaml b/roles/capture-system-logs/tasks/main.yaml
index cd8f4f0..de4f8ed 100644
--- a/roles/capture-system-logs/tasks/main.yaml
+++ b/roles/capture-system-logs/tasks/main.yaml
@@ -1,6 +1,7 @@
# TODO(andreaf) Make this into proper Ansible
- name: Stage various logs and reports
shell:
+ executable: /bin/bash
cmd: |
sudo iptables-save > {{ stage_dir }}/iptables.txt
df -h > {{ stage_dir }}/df.txt
diff --git a/roles/devstack-project-conf/tasks/main.yaml b/roles/devstack-project-conf/tasks/main.yaml
index 9c6e06b..917cdbc 100644
--- a/roles/devstack-project-conf/tasks/main.yaml
+++ b/roles/devstack-project-conf/tasks/main.yaml
@@ -8,6 +8,7 @@
path: "/etc/{{ item.value.short_name }}"
with_dict: "{{ zuul.projects }}"
register: project_configs
+ no_log: true
- name: Copy configuration files
command: cp -pRL {{ item.stat.path }} {{ stage_dir }}/etc/{{ item.item.value.short_name }}
diff --git a/roles/run-devstack/README.rst b/roles/run-devstack/README.rst
index e53f060..d77eb15 100644
--- a/roles/run-devstack/README.rst
+++ b/roles/run-devstack/README.rst
@@ -6,9 +6,3 @@
:default: /opt/stack
The devstack base directory.
-
-.. zuul:rolevar:: devstack_early_log
- :default: /opt/stack/log/devstack-early.txt
-
- The full devstack log that includes the whatever stack.sh logs before
- the LOGFILE variable in local.conf is honoured.
diff --git a/roles/run-devstack/defaults/main.yaml b/roles/run-devstack/defaults/main.yaml
index dc4528f..fea05c8 100644
--- a/roles/run-devstack/defaults/main.yaml
+++ b/roles/run-devstack/defaults/main.yaml
@@ -1,2 +1 @@
devstack_base_dir: /opt/stack
-devstack_early_log: /opt/stack/logs/devstack-early.txt
diff --git a/roles/run-devstack/tasks/main.yaml b/roles/run-devstack/tasks/main.yaml
index f532129..1ff8295 100644
--- a/roles/run-devstack/tasks/main.yaml
+++ b/roles/run-devstack/tasks/main.yaml
@@ -1,5 +1,8 @@
- name: Run devstack
- shell: ./stack.sh 2>&1 {{ devstack_early_log }}
+ shell:
+ cmd: |
+ ./stack.sh 2>&1
+ echo "*** FINISHED ***"
args:
chdir: "{{devstack_base_dir}}/devstack"
become: true
diff --git a/roles/setup-stack-user/tasks/main.yaml b/roles/setup-stack-user/tasks/main.yaml
index 8384515..0fc7c2d 100644
--- a/roles/setup-stack-user/tasks/main.yaml
+++ b/roles/setup-stack-user/tasks/main.yaml
@@ -21,10 +21,12 @@
group: stack
become: yes
-- name: Set stack user home directory permissions
+- name: Set stack user home directory permissions and ownership
file:
path: '{{ devstack_stack_home_dir }}'
mode: 0755
+ owner: stack
+ group: stack
become: yes
- name: Copy 50_stack_sh file to /etc/sudoers.d
@@ -36,7 +38,7 @@
group: root
become: yes
-- name: Create new/.cache folder within BASE
+- name: Create .cache folder within BASE
file:
path: '{{ devstack_stack_home_dir }}/.cache'
state: directory
diff --git a/stack.sh b/stack.sh
index f723475..94e5ee4 100755
--- a/stack.sh
+++ b/stack.sh
@@ -282,7 +282,7 @@
# Some distros need to add repos beyond the defaults provided by the vendor
# to pick up required packages.
-function _install_epel_and_rdo {
+function _install_epel {
# NOTE: We always remove and install latest -- some environments
# use snapshot images, and if EPEL version updates they break
# unless we update them to latest version.
@@ -313,13 +313,28 @@
yum_install epel-release || \
die $LINENO "Error installing EPEL repo, cannot continue"
sudo rm -f /etc/yum.repos.d/epel-bootstrap.repo
+}
- # ... and also optional to be enabled
+function _install_rdo {
+ # There are multiple options for this, including using CloudSIG
+ # repositories (centos-release-*), trunk versions, etc. Since
+ # we're not interested in the actual openstack distributions
+ # (since we're using git to run!) but only peripherial packages
+ # like kvm or ovs, this has been reliable.
+
+ # TODO(ianw): figure out how to best mirror -- probably use infra
+ # mirror RDO reverse proxy. We could either have test
+ # infrastructure set it up disabled like EPEL, or fiddle it here.
+ # Per the point above, it's a bunch of repos so starts getting a
+ # little messy...
+ if ! is_package_installed rdo-release ; then
+ yum_install https://rdoproject.org/repos/rdo-release.rpm
+ fi
+
+ # Also enable optional for RHEL7 proper. Note this is a silent
+ # no-op on other platforms.
sudo yum-config-manager --enable rhel-7-server-optional-rpms
- # install the lastest RDO
- is_package_installed rdo-release || yum_install https://rdoproject.org/repos/rdo-release.rpm
-
if is_oraclelinux; then
sudo yum-config-manager --enable ol7_optional_latest ol7_addons ol7_MySQL56
fi
@@ -362,20 +377,22 @@
# to speed things up
SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL)
-# If we have /etc/nodepool/provider assume we're on a OpenStack CI
-# node, where EPEL is already pointing at our internal mirror and RDO
-# is pre-installed.
-if [[ -f /etc/nodepool/provider ]]; then
- SKIP_EPEL_INSTALL=True
- if is_fedora; then
- # However, EPEL is not enabled by default.
+if [[ $DISTRO == "rhel7" ]]; then
+ # If we have /etc/ci/mirror_info.sh assume we're on a OpenStack CI
+ # node, where EPEL is installed (but disabled) and already
+ # pointing at our internal mirror
+ if [[ -f /etc/ci/mirror_info.sh ]]; then
+ SKIP_EPEL_INSTALL=True
sudo yum-config-manager --enable epel
fi
-fi
-if is_fedora && [[ $DISTRO == "rhel7" ]] && \
- [[ ${SKIP_EPEL_INSTALL} != True ]]; then
- _install_epel_and_rdo
+ if [[ ${SKIP_EPEL_INSTALL} != True ]]; then
+ _install_epel
+ fi
+ # Along with EPEL, CentOS (and a-likes) require some packages only
+ # available in RDO repositories (e.g. OVS, or later versions of
+ # kvm) to run.
+ _install_rdo
fi
# Ensure python is installed
@@ -388,6 +405,7 @@
# Set up logging level
VERBOSE=$(trueorfalse True VERBOSE)
+VERBOSE_NO_TIMESTAMP=$(trueorfalse False VERBOSE)
# Draw a spinner so the user knows something is happening
function spinner {
@@ -453,8 +471,12 @@
# stdout later.
exec 3>&1
if [[ "$VERBOSE" == "True" ]]; then
+ _of_args="-v"
+ if [[ "$VERBOSE_NO_TIMESTAMP" == "True" ]]; then
+ _of_args="$_of_args --no-timestamp"
+ fi
# Set fd 1 and 2 to write the log file
- exec 1> >( $TOP_DIR/tools/outfilter.py -v -o "${LOGFILE}" ) 2>&1
+ exec 1> >( $TOP_DIR/tools/outfilter.py $_of_args -o "${LOGFILE}" ) 2>&1
# Set fd 6 to summary log file
exec 6> >( $TOP_DIR/tools/outfilter.py -o "${SUMFILE}" )
else
@@ -894,8 +916,6 @@
fi
if is_service_enabled horizon; then
- # django openstack_auth
- install_django_openstack_auth
# dashboard
stack_install_service horizon
fi
@@ -942,17 +962,15 @@
if [[ $SYSLOG != "False" ]]; then
if [[ "$SYSLOG_HOST" = "$HOST_IP" ]]; then
# Configure the master host to receive
- cat <<EOF >/tmp/90-stack-m.conf
+ cat <<EOF | sudo tee /etc/rsyslog.d/90-stack-m.conf >/dev/null
\$ModLoad imrelp
\$InputRELPServerRun $SYSLOG_PORT
EOF
- sudo mv /tmp/90-stack-m.conf /etc/rsyslog.d
else
# Set rsyslog to send to remote host
- cat <<EOF >/tmp/90-stack-s.conf
+ cat <<EOF | sudo tee /etc/rsyslog.d/90-stack-s.conf >/dev/null
*.* :omrelp:$SYSLOG_HOST:$SYSLOG_PORT
EOF
- sudo mv /tmp/90-stack-s.conf /etc/rsyslog.d
fi
RSYSLOGCONF="/etc/rsyslog.conf"
@@ -1366,15 +1384,6 @@
merge_config_group $TOP_DIR/local.conf post-extra
-# Run local script
-# ----------------
-
-# Run ``local.sh`` if it exists to perform user-managed tasks
-if [[ -x $TOP_DIR/local.sh ]]; then
- echo "Running user script $TOP_DIR/local.sh"
- $TOP_DIR/local.sh
-fi
-
# Sanity checks
# =============
@@ -1409,6 +1418,15 @@
fi
fi
+# Run local script
+# ----------------
+
+# Run ``local.sh`` if it exists to perform user-managed tasks
+if [[ -x $TOP_DIR/local.sh ]]; then
+ echo "Running user script $TOP_DIR/local.sh"
+ $TOP_DIR/local.sh
+fi
+
# Bash completion
# ===============
diff --git a/stackrc b/stackrc
index 7ed8a67..4f627cc 100644
--- a/stackrc
+++ b/stackrc
@@ -13,6 +13,18 @@
# Source required DevStack functions and globals
source $RC_DIR/functions
+# Set the target branch. This is used so that stable branching
+# does not need to update each repo below.
+TARGET_BRANCH=master
+
+# Cycle trailing projects need to branch later than the others.
+TRAILING_TARGET_BRANCH=master
+
+# And some repos do not create stable branches, so this is used
+# to make it explicit and avoid accidentally setting to a stable
+# branch.
+BRANCHLESS_TARGET_BRANCH=master
+
# Destination path for installation
DEST=/opt/stack
@@ -246,7 +258,7 @@
# Setting the variable to 'ALL' will activate the download for all
# libraries.
-DEVSTACK_SERIES="queens"
+DEVSTACK_SERIES="rocky"
##############
#
@@ -256,35 +268,35 @@
# block storage service
CINDER_REPO=${CINDER_REPO:-${GIT_BASE}/openstack/cinder.git}
-CINDER_BRANCH=${CINDER_BRANCH:-master}
+CINDER_BRANCH=${CINDER_BRANCH:-$TARGET_BRANCH}
# image catalog service
GLANCE_REPO=${GLANCE_REPO:-${GIT_BASE}/openstack/glance.git}
-GLANCE_BRANCH=${GLANCE_BRANCH:-master}
+GLANCE_BRANCH=${GLANCE_BRANCH:-$TARGET_BRANCH}
# django powered web control panel for openstack
HORIZON_REPO=${HORIZON_REPO:-${GIT_BASE}/openstack/horizon.git}
-HORIZON_BRANCH=${HORIZON_BRANCH:-master}
+HORIZON_BRANCH=${HORIZON_BRANCH:-$TARGET_BRANCH}
# unified auth system (manages accounts/tokens)
KEYSTONE_REPO=${KEYSTONE_REPO:-${GIT_BASE}/openstack/keystone.git}
-KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-master}
+KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-$TARGET_BRANCH}
# neutron service
NEUTRON_REPO=${NEUTRON_REPO:-${GIT_BASE}/openstack/neutron.git}
-NEUTRON_BRANCH=${NEUTRON_BRANCH:-master}
+NEUTRON_BRANCH=${NEUTRON_BRANCH:-$TARGET_BRANCH}
# neutron fwaas service
NEUTRON_FWAAS_REPO=${NEUTRON_FWAAS_REPO:-${GIT_BASE}/openstack/neutron-fwaas.git}
-NEUTRON_FWAAS_BRANCH=${NEUTRON_FWAAS_BRANCH:-master}
+NEUTRON_FWAAS_BRANCH=${NEUTRON_FWAAS_BRANCH:-$TARGET_BRANCH}
# compute service
NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
-NOVA_BRANCH=${NOVA_BRANCH:-master}
+NOVA_BRANCH=${NOVA_BRANCH:-$TARGET_BRANCH}
# object storage service
SWIFT_REPO=${SWIFT_REPO:-${GIT_BASE}/openstack/swift.git}
-SWIFT_BRANCH=${SWIFT_BRANCH:-master}
+SWIFT_BRANCH=${SWIFT_BRANCH:-$TARGET_BRANCH}
##############
#
@@ -294,11 +306,11 @@
# consolidated openstack requirements
REQUIREMENTS_REPO=${REQUIREMENTS_REPO:-${GIT_BASE}/openstack/requirements.git}
-REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-master}
+REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-$TARGET_BRANCH}
# Tempest test suite
TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git}
-TEMPEST_BRANCH=${TEMPEST_BRANCH:-master}
+TEMPEST_BRANCH=${TEMPEST_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
##############
@@ -310,56 +322,56 @@
# volume client
GITREPO["python-cinderclient"]=${CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-cinderclient.git}
-GITBRANCH["python-cinderclient"]=${CINDERCLIENT_BRANCH:-master}
+GITBRANCH["python-cinderclient"]=${CINDERCLIENT_BRANCH:-$TARGET_BRANCH}
# os-brick client for local volume attachement
GITREPO["python-brick-cinderclient-ext"]=${BRICK_CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-brick-cinderclient-ext.git}
-GITBRANCH["python-brick-cinderclient-ext"]=${BRICK_CINDERCLIENT_BRANCH:-master}
+GITBRANCH["python-brick-cinderclient-ext"]=${BRICK_CINDERCLIENT_BRANCH:-$TARGET_BRANCH}
# python barbican client library
GITREPO["python-barbicanclient"]=${BARBICANCLIENT_REPO:-${GIT_BASE}/openstack/python-barbicanclient.git}
-GITBRANCH["python-barbicanclient"]=${BARBICANCLIENT_BRANCH:-master}
+GITBRANCH["python-barbicanclient"]=${BARBICANCLIENT_BRANCH:-$TARGET_BRANCH}
GITDIR["python-barbicanclient"]=$DEST/python-barbicanclient
# python glance client library
GITREPO["python-glanceclient"]=${GLANCECLIENT_REPO:-${GIT_BASE}/openstack/python-glanceclient.git}
-GITBRANCH["python-glanceclient"]=${GLANCECLIENT_BRANCH:-master}
+GITBRANCH["python-glanceclient"]=${GLANCECLIENT_BRANCH:-$TARGET_BRANCH}
# ironic client
GITREPO["python-ironicclient"]=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git}
-GITBRANCH["python-ironicclient"]=${IRONICCLIENT_BRANCH:-master}
+GITBRANCH["python-ironicclient"]=${IRONICCLIENT_BRANCH:-$TARGET_BRANCH}
# ironic plugin is out of tree, but nova uses it. set GITDIR here.
GITDIR["python-ironicclient"]=$DEST/python-ironicclient
# the base authentication plugins that clients use to authenticate
GITREPO["keystoneauth"]=${KEYSTONEAUTH_REPO:-${GIT_BASE}/openstack/keystoneauth.git}
-GITBRANCH["keystoneauth"]=${KEYSTONEAUTH_BRANCH:-master}
+GITBRANCH["keystoneauth"]=${KEYSTONEAUTH_BRANCH:-$TARGET_BRANCH}
# python keystone client library to nova that horizon uses
GITREPO["python-keystoneclient"]=${KEYSTONECLIENT_REPO:-${GIT_BASE}/openstack/python-keystoneclient.git}
-GITBRANCH["python-keystoneclient"]=${KEYSTONECLIENT_BRANCH:-master}
+GITBRANCH["python-keystoneclient"]=${KEYSTONECLIENT_BRANCH:-$TARGET_BRANCH}
# neutron client
GITREPO["python-neutronclient"]=${NEUTRONCLIENT_REPO:-${GIT_BASE}/openstack/python-neutronclient.git}
-GITBRANCH["python-neutronclient"]=${NEUTRONCLIENT_BRANCH:-master}
+GITBRANCH["python-neutronclient"]=${NEUTRONCLIENT_BRANCH:-$TARGET_BRANCH}
# python client library to nova that horizon (and others) use
GITREPO["python-novaclient"]=${NOVACLIENT_REPO:-${GIT_BASE}/openstack/python-novaclient.git}
-GITBRANCH["python-novaclient"]=${NOVACLIENT_BRANCH:-master}
+GITBRANCH["python-novaclient"]=${NOVACLIENT_BRANCH:-$TARGET_BRANCH}
# python swift client library
GITREPO["python-swiftclient"]=${SWIFTCLIENT_REPO:-${GIT_BASE}/openstack/python-swiftclient.git}
-GITBRANCH["python-swiftclient"]=${SWIFTCLIENT_BRANCH:-master}
+GITBRANCH["python-swiftclient"]=${SWIFTCLIENT_BRANCH:-$TARGET_BRANCH}
# consolidated openstack python client
GITREPO["python-openstackclient"]=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git}
-GITBRANCH["python-openstackclient"]=${OPENSTACKCLIENT_BRANCH:-master}
+GITBRANCH["python-openstackclient"]=${OPENSTACKCLIENT_BRANCH:-$TARGET_BRANCH}
# this doesn't exist in a lib file, so set it here
GITDIR["python-openstackclient"]=$DEST/python-openstackclient
# placement-api CLI
GITREPO["osc-placement"]=${OSC_PLACEMENT_REPO:-${GIT_BASE}/openstack/osc-placement.git}
-GITBRANCH["osc-placement"]=${OSC_PLACEMENT_BRANCH:-master}
+GITBRANCH["osc-placement"]=${OSC_PLACEMENT_BRANCH:-$TARGET_BRANCH}
###################
@@ -371,119 +383,119 @@
# castellan key manager interface
GITREPO["castellan"]=${CASTELLAN_REPO:-${GIT_BASE}/openstack/castellan.git}
-GITBRANCH["castellan"]=${CASTELLAN_BRANCH:-master}
+GITBRANCH["castellan"]=${CASTELLAN_BRANCH:-$TARGET_BRANCH}
# cliff command line framework
GITREPO["cliff"]=${CLIFF_REPO:-${GIT_BASE}/openstack/cliff.git}
-GITBRANCH["cliff"]=${CLIFF_BRANCH:-master}
+GITBRANCH["cliff"]=${CLIFF_BRANCH:-$TARGET_BRANCH}
# async framework/helpers
GITREPO["futurist"]=${FUTURIST_REPO:-${GIT_BASE}/openstack/futurist.git}
-GITBRANCH["futurist"]=${FUTURIST_BRANCH:-master}
+GITBRANCH["futurist"]=${FUTURIST_BRANCH:-$TARGET_BRANCH}
# debtcollector deprecation framework/helpers
GITREPO["debtcollector"]=${DEBTCOLLECTOR_REPO:-${GIT_BASE}/openstack/debtcollector.git}
-GITBRANCH["debtcollector"]=${DEBTCOLLECTOR_BRANCH:-master}
+GITBRANCH["debtcollector"]=${DEBTCOLLECTOR_BRANCH:-$TARGET_BRANCH}
# helpful state machines
GITREPO["automaton"]=${AUTOMATON_REPO:-${GIT_BASE}/openstack/automaton.git}
-GITBRANCH["automaton"]=${AUTOMATON_BRANCH:-master}
+GITBRANCH["automaton"]=${AUTOMATON_BRANCH:-$TARGET_BRANCH}
# oslo.cache
GITREPO["oslo.cache"]=${OSLOCACHE_REPO:-${GIT_BASE}/openstack/oslo.cache.git}
-GITBRANCH["oslo.cache"]=${OSLOCACHE_BRANCH:-master}
+GITBRANCH["oslo.cache"]=${OSLOCACHE_BRANCH:-$TARGET_BRANCH}
# oslo.concurrency
GITREPO["oslo.concurrency"]=${OSLOCON_REPO:-${GIT_BASE}/openstack/oslo.concurrency.git}
-GITBRANCH["oslo.concurrency"]=${OSLOCON_BRANCH:-master}
+GITBRANCH["oslo.concurrency"]=${OSLOCON_BRANCH:-$TARGET_BRANCH}
# oslo.config
GITREPO["oslo.config"]=${OSLOCFG_REPO:-${GIT_BASE}/openstack/oslo.config.git}
-GITBRANCH["oslo.config"]=${OSLOCFG_BRANCH:-master}
+GITBRANCH["oslo.config"]=${OSLOCFG_BRANCH:-$TARGET_BRANCH}
# oslo.context
GITREPO["oslo.context"]=${OSLOCTX_REPO:-${GIT_BASE}/openstack/oslo.context.git}
-GITBRANCH["oslo.context"]=${OSLOCTX_BRANCH:-master}
+GITBRANCH["oslo.context"]=${OSLOCTX_BRANCH:-$TARGET_BRANCH}
# oslo.db
GITREPO["oslo.db"]=${OSLODB_REPO:-${GIT_BASE}/openstack/oslo.db.git}
-GITBRANCH["oslo.db"]=${OSLODB_BRANCH:-master}
+GITBRANCH["oslo.db"]=${OSLODB_BRANCH:-$TARGET_BRANCH}
# oslo.i18n
GITREPO["oslo.i18n"]=${OSLOI18N_REPO:-${GIT_BASE}/openstack/oslo.i18n.git}
-GITBRANCH["oslo.i18n"]=${OSLOI18N_BRANCH:-master}
+GITBRANCH["oslo.i18n"]=${OSLOI18N_BRANCH:-$TARGET_BRANCH}
# oslo.log
GITREPO["oslo.log"]=${OSLOLOG_REPO:-${GIT_BASE}/openstack/oslo.log.git}
-GITBRANCH["oslo.log"]=${OSLOLOG_BRANCH:-master}
+GITBRANCH["oslo.log"]=${OSLOLOG_BRANCH:-$TARGET_BRANCH}
# oslo.messaging
GITREPO["oslo.messaging"]=${OSLOMSG_REPO:-${GIT_BASE}/openstack/oslo.messaging.git}
-GITBRANCH["oslo.messaging"]=${OSLOMSG_BRANCH:-master}
+GITBRANCH["oslo.messaging"]=${OSLOMSG_BRANCH:-$TARGET_BRANCH}
# oslo.middleware
GITREPO["oslo.middleware"]=${OSLOMID_REPO:-${GIT_BASE}/openstack/oslo.middleware.git}
-GITBRANCH["oslo.middleware"]=${OSLOMID_BRANCH:-master}
+GITBRANCH["oslo.middleware"]=${OSLOMID_BRANCH:-$TARGET_BRANCH}
# oslo.policy
GITREPO["oslo.policy"]=${OSLOPOLICY_REPO:-${GIT_BASE}/openstack/oslo.policy.git}
-GITBRANCH["oslo.policy"]=${OSLOPOLICY_BRANCH:-master}
+GITBRANCH["oslo.policy"]=${OSLOPOLICY_BRANCH:-$TARGET_BRANCH}
# oslo.privsep
GITREPO["oslo.privsep"]=${OSLOPRIVSEP_REPO:-${GIT_BASE}/openstack/oslo.privsep.git}
-GITBRANCH["oslo.privsep"]=${OSLOPRIVSEP_BRANCH:-master}
+GITBRANCH["oslo.privsep"]=${OSLOPRIVSEP_BRANCH:-$TARGET_BRANCH}
# oslo.reports
GITREPO["oslo.reports"]=${OSLOREPORTS_REPO:-${GIT_BASE}/openstack/oslo.reports.git}
-GITBRANCH["oslo.reports"]=${OSLOREPORTS_BRANCH:-master}
+GITBRANCH["oslo.reports"]=${OSLOREPORTS_BRANCH:-$TARGET_BRANCH}
# oslo.rootwrap
GITREPO["oslo.rootwrap"]=${OSLORWRAP_REPO:-${GIT_BASE}/openstack/oslo.rootwrap.git}
-GITBRANCH["oslo.rootwrap"]=${OSLORWRAP_BRANCH:-master}
+GITBRANCH["oslo.rootwrap"]=${OSLORWRAP_BRANCH:-$TARGET_BRANCH}
# oslo.serialization
GITREPO["oslo.serialization"]=${OSLOSERIALIZATION_REPO:-${GIT_BASE}/openstack/oslo.serialization.git}
-GITBRANCH["oslo.serialization"]=${OSLOSERIALIZATION_BRANCH:-master}
+GITBRANCH["oslo.serialization"]=${OSLOSERIALIZATION_BRANCH:-$TARGET_BRANCH}
# oslo.service
GITREPO["oslo.service"]=${OSLOSERVICE_REPO:-${GIT_BASE}/openstack/oslo.service.git}
-GITBRANCH["oslo.service"]=${OSLOSERVICE_BRANCH:-master}
+GITBRANCH["oslo.service"]=${OSLOSERVICE_BRANCH:-$TARGET_BRANCH}
# oslo.utils
GITREPO["oslo.utils"]=${OSLOUTILS_REPO:-${GIT_BASE}/openstack/oslo.utils.git}
-GITBRANCH["oslo.utils"]=${OSLOUTILS_BRANCH:-master}
+GITBRANCH["oslo.utils"]=${OSLOUTILS_BRANCH:-$TARGET_BRANCH}
# oslo.versionedobjects
GITREPO["oslo.versionedobjects"]=${OSLOVERSIONEDOBJECTS_REPO:-${GIT_BASE}/openstack/oslo.versionedobjects.git}
-GITBRANCH["oslo.versionedobjects"]=${OSLOVERSIONEDOBJECTS_BRANCH:-master}
+GITBRANCH["oslo.versionedobjects"]=${OSLOVERSIONEDOBJECTS_BRANCH:-$TARGET_BRANCH}
# oslo.vmware
GITREPO["oslo.vmware"]=${OSLOVMWARE_REPO:-${GIT_BASE}/openstack/oslo.vmware.git}
-GITBRANCH["oslo.vmware"]=${OSLOVMWARE_BRANCH:-master}
+GITBRANCH["oslo.vmware"]=${OSLOVMWARE_BRANCH:-$TARGET_BRANCH}
# osprofiler
GITREPO["osprofiler"]=${OSPROFILER_REPO:-${GIT_BASE}/openstack/osprofiler.git}
-GITBRANCH["osprofiler"]=${OSPROFILER_BRANCH:-master}
+GITBRANCH["osprofiler"]=${OSPROFILER_BRANCH:-$TARGET_BRANCH}
# pycadf auditing library
GITREPO["pycadf"]=${PYCADF_REPO:-${GIT_BASE}/openstack/pycadf.git}
-GITBRANCH["pycadf"]=${PYCADF_BRANCH:-master}
+GITBRANCH["pycadf"]=${PYCADF_BRANCH:-$TARGET_BRANCH}
# stevedore plugin manager
GITREPO["stevedore"]=${STEVEDORE_REPO:-${GIT_BASE}/openstack/stevedore.git}
-GITBRANCH["stevedore"]=${STEVEDORE_BRANCH:-master}
+GITBRANCH["stevedore"]=${STEVEDORE_BRANCH:-$TARGET_BRANCH}
# taskflow plugin manager
GITREPO["taskflow"]=${TASKFLOW_REPO:-${GIT_BASE}/openstack/taskflow.git}
-GITBRANCH["taskflow"]=${TASKFLOW_BRANCH:-master}
+GITBRANCH["taskflow"]=${TASKFLOW_BRANCH:-$TARGET_BRANCH}
# tooz plugin manager
GITREPO["tooz"]=${TOOZ_REPO:-${GIT_BASE}/openstack/tooz.git}
-GITBRANCH["tooz"]=${TOOZ_BRANCH:-master}
+GITBRANCH["tooz"]=${TOOZ_BRANCH:-$TARGET_BRANCH}
# pbr drives the setuptools configs
GITREPO["pbr"]=${PBR_REPO:-${GIT_BASE}/openstack-dev/pbr.git}
-GITBRANCH["pbr"]=${PBR_BRANCH:-master}
+GITBRANCH["pbr"]=${PBR_BRANCH:-$TARGET_BRANCH}
##################
@@ -494,69 +506,65 @@
# cursive library
GITREPO["cursive"]=${CURSIVE_REPO:-${GIT_BASE}/openstack/cursive.git}
-GITBRANCH["cursive"]=${CURSIVE_BRANCH:-master}
+GITBRANCH["cursive"]=${CURSIVE_BRANCH:-$TARGET_BRANCH}
# glance store library
GITREPO["glance_store"]=${GLANCE_STORE_REPO:-${GIT_BASE}/openstack/glance_store.git}
-GITBRANCH["glance_store"]=${GLANCE_STORE_BRANCH:-master}
-
-# django openstack_auth library
-GITREPO["django_openstack_auth"]=${HORIZONAUTH_REPO:-${GIT_BASE}/openstack/django_openstack_auth.git}
-GITBRANCH["django_openstack_auth"]=${HORIZONAUTH_BRANCH:-master}
+GITBRANCH["glance_store"]=${GLANCE_STORE_BRANCH:-$TARGET_BRANCH}
# keystone middleware
GITREPO["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_REPO:-${GIT_BASE}/openstack/keystonemiddleware.git}
-GITBRANCH["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_BRANCH:-master}
+GITBRANCH["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_BRANCH:-$TARGET_BRANCH}
# s3 support for swift
SWIFT3_REPO=${SWIFT3_REPO:-${GIT_BASE}/openstack/swift3.git}
-SWIFT3_BRANCH=${SWIFT3_BRANCH:-master}
+SWIFT3_BRANCH=${SWIFT3_BRANCH:-$TARGET_BRANCH}
# ceilometer middleware
GITREPO["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_REPO:-${GIT_BASE}/openstack/ceilometermiddleware.git}
-GITBRANCH["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_BRANCH:-master}
+GITBRANCH["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_BRANCH:-$TARGET_BRANCH}
GITDIR["ceilometermiddleware"]=$DEST/ceilometermiddleware
# os-brick library to manage local volume attaches
GITREPO["os-brick"]=${OS_BRICK_REPO:-${GIT_BASE}/openstack/os-brick.git}
-GITBRANCH["os-brick"]=${OS_BRICK_BRANCH:-master}
+GITBRANCH["os-brick"]=${OS_BRICK_BRANCH:-$TARGET_BRANCH}
# os-client-config to manage clouds.yaml and friends
GITREPO["os-client-config"]=${OS_CLIENT_CONFIG_REPO:-${GIT_BASE}/openstack/os-client-config.git}
-GITBRANCH["os-client-config"]=${OS_CLIENT_CONFIG_BRANCH:-master}
+GITBRANCH["os-client-config"]=${OS_CLIENT_CONFIG_BRANCH:-$TARGET_BRANCH}
GITDIR["os-client-config"]=$DEST/os-client-config
# os-vif library to communicate between Neutron to Nova
GITREPO["os-vif"]=${OS_VIF_REPO:-${GIT_BASE}/openstack/os-vif.git}
-GITBRANCH["os-vif"]=${OS_VIF_BRANCH:-master}
+GITBRANCH["os-vif"]=${OS_VIF_BRANCH:-$TARGET_BRANCH}
# osc-lib OpenStackClient common lib
GITREPO["osc-lib"]=${OSC_LIB_REPO:-${GIT_BASE}/openstack/osc-lib.git}
-GITBRANCH["osc-lib"]=${OSC_LIB_BRANCH:-master}
+GITBRANCH["osc-lib"]=${OSC_LIB_BRANCH:-$TARGET_BRANCH}
# python-openstacksdk OpenStack Python SDK
GITREPO["python-openstacksdk"]=${OPENSTACKSDK_REPO:-${GIT_BASE}/openstack/python-openstacksdk.git}
-GITBRANCH["python-openstacksdk"]=${OPENSTACKSDK_BRANCH:-master}
+GITBRANCH["python-openstacksdk"]=${OPENSTACKSDK_BRANCH:-$TARGET_BRANCH}
# ironic common lib
GITREPO["ironic-lib"]=${IRONIC_LIB_REPO:-${GIT_BASE}/openstack/ironic-lib.git}
-GITBRANCH["ironic-lib"]=${IRONIC_LIB_BRANCH:-master}
+GITBRANCH["ironic-lib"]=${IRONIC_LIB_BRANCH:-$TARGET_BRANCH}
# this doesn't exist in a lib file, so set it here
GITDIR["ironic-lib"]=$DEST/ironic-lib
# diskimage-builder tool
GITREPO["diskimage-builder"]=${DIB_REPO:-${GIT_BASE}/openstack/diskimage-builder.git}
-GITBRANCH["diskimage-builder"]=${DIB_BRANCH:-master}
+GITBRANCH["diskimage-builder"]=${DIB_BRANCH:-$TARGET_BRANCH}
GITDIR["diskimage-builder"]=$DEST/diskimage-builder
# neutron-lib library containing neutron stable non-REST interfaces
GITREPO["neutron-lib"]=${NEUTRON_LIB_REPO:-${GIT_BASE}/openstack/neutron-lib.git}
-GITBRANCH["neutron-lib"]=${NEUTRON_LIB_BRANCH:-master}
+GITBRANCH["neutron-lib"]=${NEUTRON_LIB_BRANCH:-$TARGET_BRANCH}
GITDIR["neutron-lib"]=$DEST/neutron-lib
# os-traits library for resource provider traits in the placement service
GITREPO["os-traits"]=${OS_TRAITS_REPO:-${GIT_BASE}/openstack/os-traits.git}
-GITBRANCH["os-traits"]=${OS_TRAITS_BRANCH:-master}
+GITBRANCH["os-traits"]=${OS_TRAITS_BRANCH:-$TARGET_BRANCH}
##################
#
@@ -566,19 +574,19 @@
# run-parts script required by os-refresh-config
DIB_UTILS_REPO=${DIB_UTILS_REPO:-${GIT_BASE}/openstack/dib-utils.git}
-DIB_UTILS_BRANCH=${DIB_UTILS_BRANCH:-master}
+DIB_UTILS_BRANCH=${DIB_UTILS_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
# os-apply-config configuration template tool
OAC_REPO=${OAC_REPO:-${GIT_BASE}/openstack/os-apply-config.git}
-OAC_BRANCH=${OAC_BRANCH:-master}
+OAC_BRANCH=${OAC_BRANCH:-$TRAILING_TARGET_BRANCH}
# os-collect-config configuration agent
OCC_REPO=${OCC_REPO:-${GIT_BASE}/openstack/os-collect-config.git}
-OCC_BRANCH=${OCC_BRANCH:-master}
+OCC_BRANCH=${OCC_BRANCH:-$TRAILING_TARGET_BRANCH}
# os-refresh-config configuration run-parts tool
ORC_REPO=${ORC_REPO:-${GIT_BASE}/openstack/os-refresh-config.git}
-ORC_BRANCH=${ORC_BRANCH:-master}
+ORC_BRANCH=${ORC_BRANCH:-$TRAILING_TARGET_BRANCH}
#################
@@ -591,7 +599,7 @@
# ironic python agent
IRONIC_PYTHON_AGENT_REPO=${IRONIC_PYTHON_AGENT_REPO:-${GIT_BASE}/openstack/ironic-python-agent.git}
-IRONIC_PYTHON_AGENT_BRANCH=${IRONIC_PYTHON_AGENT_BRANCH:-master}
+IRONIC_PYTHON_AGENT_BRANCH=${IRONIC_PYTHON_AGENT_BRANCH:-$TARGET_BRANCH}
# a websockets/html5 or flash powered VNC console for vm instances
NOVNC_REPO=${NOVNC_REPO:-https://github.com/novnc/noVNC.git}
@@ -599,7 +607,7 @@
# a websockets/html5 or flash powered SPICE console for vm instances
SPICE_REPO=${SPICE_REPO:-http://anongit.freedesktop.org/git/spice/spice-html5.git}
-SPICE_BRANCH=${SPICE_BRANCH:-master}
+SPICE_BRANCH=${SPICE_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
# Global flag used to configure Tempest and potentially other services if
# volume multiattach is supported. In Queens, only the libvirt compute driver
@@ -805,6 +813,9 @@
# Service startup timeout
SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60}
+# Timeout for compute node registration in Nova
+NOVA_READY_TIMEOUT=${NOVA_READY_TIMEOUT:-$SERVICE_TIMEOUT}
+
# Service graceful shutdown timeout
SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT=${SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT:-5}
diff --git a/tests/test_libs_from_pypi.sh b/tests/test_libs_from_pypi.sh
index 0bd8d49..a544b56 100755
--- a/tests/test_libs_from_pypi.sh
+++ b/tests/test_libs_from_pypi.sh
@@ -35,7 +35,7 @@
ALL_LIBS+=" oslo.messaging oslo.log cliff stevedore"
ALL_LIBS+=" python-cinderclient glance_store oslo.concurrency oslo.db"
ALL_LIBS+=" oslo.versionedobjects oslo.vmware keystonemiddleware"
-ALL_LIBS+=" oslo.serialization django_openstack_auth"
+ALL_LIBS+=" oslo.serialization"
ALL_LIBS+=" python-openstackclient osc-lib osc-placement"
ALL_LIBS+=" os-client-config oslo.rootwrap"
ALL_LIBS+=" oslo.i18n oslo.utils python-openstacksdk python-swiftclient"
diff --git a/tests/test_refs.sh b/tests/test_refs.sh
index 65848cd..0f9aa4a 100755
--- a/tests/test_refs.sh
+++ b/tests/test_refs.sh
@@ -15,10 +15,10 @@
echo "Ensuring we don't have crazy refs"
-REFS=`grep BRANCH stackrc | grep -v -- '-master' | grep -v 'NOVNC_BRANCH'`
+REFS=`grep BRANCH stackrc | grep -v 'TARGET_BRANCH' | grep -v 'NOVNC_BRANCH'`
rc=$?
if [[ $rc -eq 0 ]]; then
- echo "Branch defaults must be master. Found:"
+ echo "Branch defaults must be one of the *TARGET_BRANCH values. Found:"
echo $REFS
exit 1
fi
diff --git a/tools/outfilter.py b/tools/outfilter.py
index f82939b..cf09124 100755
--- a/tools/outfilter.py
+++ b/tools/outfilter.py
@@ -36,6 +36,13 @@
parser.add_argument('-o', '--outfile',
help='Output file for content',
default=None)
+ # NOTE(ianw): This is intended for the case where your stdout is
+ # being captured by something like ansible which independently
+ # logs timestamps on the lines it receives. Note that if using a
+ # output file, those log lines are still timestamped.
+ parser.add_argument('-b', '--no-timestamp', action='store_true',
+ help='Do not prefix stdout with timestamp (bare)',
+ default=False)
parser.add_argument('-v', '--verbose', action='store_true',
default=False)
return parser.parse_args()
@@ -50,33 +57,45 @@
opts = get_options()
outfile = None
if opts.outfile:
- outfile = open(opts.outfile, 'a', 0)
+ # note, binary mode so we can do unbuffered output.
+ outfile = open(opts.outfile, 'ab', 0)
# Otherwise fileinput reprocess args as files
sys.argv = []
- while True:
- line = sys.stdin.readline()
- if not line:
- return 0
+ for line in iter(sys.stdin.readline, ''):
# put skip lines here
if skip_line(line):
continue
- # This prevents us from nesting date lines, because
- # we'd like to pull this in directly in Grenade and not double
- # up on DevStack lines
+ # This prevents us from nesting date lines, because we'd like
+ # to pull this in directly in Grenade and not double up on
+ # DevStack lines.
+ # NOTE(ianw): we could actually strip the extra ts in "bare"
+ # mode (which came after this)? ... as we get more experience
+ # with zuulv3 native jobs and ansible capture it may become
+ # clearer what to do
if HAS_DATE.search(line) is None:
now = datetime.datetime.utcnow()
- line = ("%s | %s" % (
+ ts_line = ("%s | %s" % (
now.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3],
line))
+ else:
+ ts_line = line
if opts.verbose:
- sys.stdout.write(line)
+ sys.stdout.write(line if opts.no_timestamp else ts_line)
sys.stdout.flush()
+
if outfile:
- outfile.write(line)
+ # We've opened outfile as a binary file to get the
+ # non-buffered behaviour. on python3, sys.stdin was
+ # opened with the system encoding and made the line into
+ # utf-8, so write the logfile out in utf-8 bytes.
+ if sys.version_info < (3,):
+ outfile.write(ts_line)
+ else:
+ outfile.write(ts_line.encode('utf-8'))
outfile.flush()
diff --git a/tools/xen/README.md b/tools/xen/README.md
index 9559e77..22263bb 100644
--- a/tools/xen/README.md
+++ b/tools/xen/README.md
@@ -1,173 +1,3 @@
-# Getting Started With XenServer and Devstack
+Note: XenServer relative tools have been moved to `os-xenapi`_ and be maintained there.
-The purpose of the code in this directory it to help developers bootstrap a
-XenServer 6.2 (older versions may also work) + OpenStack development
-environment. This file gives some pointers on how to get started.
-
-Xenserver is a Type 1 hypervisor, so it is best installed on bare metal. The
-OpenStack services are configured to run within a virtual machine (called OS
-domU) on the XenServer host. The VM uses the XAPI toolstack to communicate with
-the host over a network connection (see `MGT_BRIDGE_OR_NET_NAME`).
-
-The provided localrc helps to build a basic environment.
-
-## Introduction
-
-### Requirements
-
- - An internet-enabled network with a DHCP server on it
- - XenServer box plugged in to the same network
-This network will be used as the OpenStack management network. The VM Network
-and the Public Network will not be connected to any physical interfaces, only
-new virtual networks will be created by the `install_os_domU.sh` script.
-
-### Steps to follow
-
- - Install XenServer
- - Download Devstack to XenServer
- - Customise `localrc`
- - Start `install_os_domU.sh` script
-
-### Brief explanation
-
-The `install_os_domU.sh` script will:
- - Setup XenAPI plugins
- - Create the named networks, if they don't exist
- - Preseed-Netinstall an Ubuntu Virtual Machine (NOTE: you can save and reuse
- it, see [Reuse the Ubuntu VM](#reuse-the-ubuntu-vm)), with 1 network
- interface:
- - `eth0` - Connected to `UBUNTU_INST_BRIDGE_OR_NET_NAME`, defaults to
- `MGT_BRIDGE_OR_NET_NAME`
- - After the Ubuntu install process finished, the network configuration is
- modified to:
- - `eth0` - Management interface, connected to `MGT_BRIDGE_OR_NET_NAME`. Xapi
- must be accessible through this network.
- - `eth1` - VM interface, connected to `VM_BRIDGE_OR_NET_NAME`
- - `eth2` - Public interface, connected to `PUB_BRIDGE_OR_NET_NAME`
- - Start devstack inside the created OpenStack VM
-
-## Step 1: Install Xenserver
-Install XenServer on a clean box. You can download the latest XenServer for
-free from: http://www.xenserver.org/
-
-The XenServer IP configuration depends on your local network setup. If you are
-using dhcp, make a reservation for XenServer, so its IP address won't change
-over time. Make a note of the XenServer's IP address, as it has to be specified
-in `localrc`. The other option is to manually specify the IP setup for the
-XenServer box. Please make sure, that a gateway and a nameserver is configured,
-as `install_os_domU.sh` will connect to github.com to get source-code snapshots.
-
-## Step 2: Download devstack
-On your XenServer host, run the following commands as root:
-
- wget --no-check-certificate https://github.com/openstack-dev/devstack/zipball/master
- unzip -o master -d ./devstack
- cd devstack/*/
-
-## Step 3: Configure your localrc inside the devstack directory
-Devstack uses a localrc for user-specific configuration. Note that
-the `XENAPI_PASSWORD` must be your dom0 root password.
-Of course, use real passwords if this machine is exposed.
-
- cat > ./localrc <<EOF
- # At the moment, we depend on github's snapshot function.
- GIT_BASE="http://github.com"
-
- # Passwords
- # NOTE: these need to be specified, otherwise devstack will try
- # to prompt for these passwords, blocking the install process.
-
- DATABASE_PASSWORD=my_super_secret
- ADMIN_PASSWORD=my_super_secret
- SERVICE_PASSWORD=my_super_secret
- RABBIT_PASSWORD=my_super_secret
- SWIFT_HASH="66a3d6b56c1f479c8b4e70ab5c2000f5"
- # This will be the password for the OpenStack VM (both stack and root users)
- GUEST_PASSWORD=my_super_secret
-
- # XenAPI parameters
- # NOTE: The following must be set to your XenServer root password!
-
- XENAPI_PASSWORD=my_xenserver_root_password
-
- XENAPI_CONNECTION_URL="http://address_of_your_xenserver"
- VNCSERVER_PROXYCLIENT_ADDRESS=address_of_your_xenserver
-
- # Explicitly set virt driver
- VIRT_DRIVER=xenserver
-
- # Explicitly enable multi-host for nova-network HA
- MULTI_HOST=1
-
- # Give extra time for boot
- ACTIVE_TIMEOUT=45
-
- EOF
-
-## Step 4: Run `./install_os_domU.sh` from the `tools/xen` directory
-
- cd tools/xen
- ./install_os_domU.sh
-
-Once this script finishes executing, log into the VM (openstack domU) that it
-installed and tail the run.sh.log file. You will need to wait until it run.sh
-has finished executing.
-
-# Appendix
-
-This section contains useful information for running devstack in CI
-environments / using ubuntu network mirrors.
-
-## Use a specific Ubuntu mirror for installation
-
-To speed up the Ubuntu installation, you can use a specific mirror. To specify
-a mirror explicitly, include the following settings in your `localrc` file:
-
- UBUNTU_INST_HTTP_HOSTNAME="archive.ubuntu.com"
- UBUNTU_INST_HTTP_DIRECTORY="/ubuntu"
-
-These variables set the `mirror/http/hostname` and `mirror/http/directory`
-settings in the ubuntu preseed file. The minimal ubuntu VM will use the
-specified parameters.
-
-## Use an http proxy to speed up Ubuntu installation
-
-To further speed up the Ubuntu VM and package installation, an internal http
-proxy could be used. `squid-deb-proxy` has prooven to be stable. To use an http
-proxy, specify:
-
- UBUNTU_INST_HTTP_PROXY="http://ubuntu-proxy.somedomain.com:8000"
-
-in your `localrc` file.
-
-## Reuse the Ubuntu VM
-
-Performing a minimal ubuntu installation could take a lot of time, depending on
-your mirror/network speed. If you run `install_os_domU.sh` script on a clean
-hypervisor, you can speed up the installation, by re-using the ubuntu vm from
-a previous installation.
-
-### Export the Ubuntu VM to an XVA
-
-Given you have an nfs export `TEMPLATE_NFS_DIR`:
-
- TEMPLATE_FILENAME=devstack-jeos.xva
- TEMPLATE_NAME=jeos_template_for_devstack
- mountdir=$(mktemp -d)
- mount -t nfs "$TEMPLATE_NFS_DIR" "$mountdir"
- VM="$(xe template-list name-label="$TEMPLATE_NAME" --minimal)"
- xe template-export template-uuid=$VM filename="$mountdir/$TEMPLATE_FILENAME"
- umount "$mountdir"
- rm -rf "$mountdir"
-
-### Import the Ubuntu VM
-
-Given you have an nfs export `TEMPLATE_NFS_DIR` where you exported the Ubuntu
-VM as `TEMPLATE_FILENAME`:
-
- mountdir=$(mktemp -d)
- mount -t nfs "$TEMPLATE_NFS_DIR" "$mountdir"
- xe vm-import filename="$mountdir/$TEMPLATE_FILENAME"
- umount "$mountdir"
- rm -rf "$mountdir"
-
+.. _os-xenapi: https://github.com/openstack/os-xenapi/
diff --git a/tools/xen/build_xva.sh b/tools/xen/build_xva.sh
deleted file mode 100755
index 34ef719..0000000
--- a/tools/xen/build_xva.sh
+++ /dev/null
@@ -1,191 +0,0 @@
-#!/bin/bash
-
-# This script is run by install_os_domU.sh
-#
-# It modifies the ubuntu image created by install_os_domU.sh
-# and previously moodified by prepare_guest_template.sh
-#
-# This script is responsible for:
-# - pushing in the DevStack code
-# - creating run.sh, to run the code on boot
-# It does this by mounting the disk image of the VM.
-#
-# The resultant image is then templated and started
-# by install_os_domU.sh
-
-# Exit on errors
-set -o errexit
-# Echo commands
-set -o xtrace
-
-# This directory
-TOP_DIR=$(cd $(dirname "$0") && pwd)
-
-# Include onexit commands
-. $TOP_DIR/scripts/on_exit.sh
-
-# xapi functions
-. $TOP_DIR/functions
-
-# Source params - override xenrc params in your localrc to suite your taste
-source xenrc
-
-#
-# Parameters
-#
-GUEST_NAME="$1"
-
-function _print_interface_config {
- local device_nr
- local ip_address
- local netmask
-
- device_nr="$1"
- ip_address="$2"
- netmask="$3"
-
- local device
-
- device="eth${device_nr}"
-
- echo "auto $device"
- if [ $ip_address == "dhcp" ]; then
- echo "iface $device inet dhcp"
- else
- echo "iface $device inet static"
- echo " address $ip_address"
- echo " netmask $netmask"
- fi
-
- # Turn off tx checksumming for better performance
- echo " post-up ethtool -K $device tx off"
-}
-
-function print_interfaces_config {
- echo "auto lo"
- echo "iface lo inet loopback"
-
- _print_interface_config $PUB_DEV_NR $PUB_IP $PUB_NETMASK
- _print_interface_config $VM_DEV_NR $VM_IP $VM_NETMASK
- _print_interface_config $MGT_DEV_NR $MGT_IP $MGT_NETMASK
-}
-
-#
-# Mount the VDI
-#
-STAGING_DIR=$($TOP_DIR/scripts/manage-vdi open $GUEST_NAME 0 1 | grep -o "/tmp/tmp.[[:alnum:]]*")
-add_on_exit "$TOP_DIR/scripts/manage-vdi close $GUEST_NAME 0 1"
-
-# Make sure we have a stage
-if [ ! -d $STAGING_DIR/etc ]; then
- echo "Stage is not properly set up!"
- exit 1
-fi
-
-# Only support DHCP for now - don't support how different versions of Ubuntu handle resolv.conf
-if [ "$MGT_IP" != "dhcp" ] && [ "$PUB_IP" != "dhcp" ]; then
- echo "Configuration without DHCP not supported"
- exit 1
-fi
-
-# Copy over devstack
-rm -f /tmp/devstack.tar
-cd $TOP_DIR/../../
-tar --exclude='stage' --exclude='xen/xvas' --exclude='xen/nova' -cvf /tmp/devstack.tar .
-mkdir -p $STAGING_DIR/opt/stack/devstack
-tar xf /tmp/devstack.tar -C $STAGING_DIR/opt/stack/devstack
-cd $TOP_DIR
-
-# Create an systemd task for devstack
-cat >$STAGING_DIR/etc/systemd/system/devstack.service << EOF
-[Unit]
-Description=Install OpenStack by DevStack
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStartPre=/bin/rm -f /opt/stack/runsh.succeeded
-ExecStart=/bin/su -c "/opt/stack/run.sh" stack
-StandardOutput=tty
-StandardError=tty
-
-[Install]
-WantedBy=multi-user.target
-
-EOF
-
-# enable this service
-ln -s $STAGING_DIR/etc/systemd/system/devstack.service $STAGING_DIR/etc/systemd/system/multi-user.target.wants/devstack.service
-
-# Configure the hostname
-echo $GUEST_NAME > $STAGING_DIR/etc/hostname
-
-# Hostname must resolve for rabbit
-HOSTS_FILE_IP=$PUB_IP
-if [ $MGT_IP != "dhcp" ]; then
- HOSTS_FILE_IP=$MGT_IP
-fi
-cat <<EOF >$STAGING_DIR/etc/hosts
-$HOSTS_FILE_IP $GUEST_NAME
-127.0.0.1 localhost localhost.localdomain
-EOF
-
-# Configure the network
-print_interfaces_config > $STAGING_DIR/etc/network/interfaces
-
-# Gracefully cp only if source file/dir exists
-function cp_it {
- if [ -e $1 ] || [ -d $1 ]; then
- cp -pRL $1 $2
- fi
-}
-
-# Copy over your ssh keys and env if desired
-COPYENV=${COPYENV:-1}
-if [ "$COPYENV" = "1" ]; then
- cp_it ~/.ssh $STAGING_DIR/opt/stack/.ssh
- cp_it ~/.ssh/id_rsa.pub $STAGING_DIR/opt/stack/.ssh/authorized_keys
- cp_it ~/.gitconfig $STAGING_DIR/opt/stack/.gitconfig
- cp_it ~/.vimrc $STAGING_DIR/opt/stack/.vimrc
- cp_it ~/.bashrc $STAGING_DIR/opt/stack/.bashrc
-fi
-
-# Configure run.sh
-cat <<EOF >$STAGING_DIR/opt/stack/run.sh
-#!/bin/bash
-set -eux
-(
- flock -n 9 || exit 1
-
- sudo chown -R stack /opt/stack
-
- [ -e /opt/stack/runsh.succeeded ] && rm /opt/stack/runsh.succeeded
- echo \$\$ >> /opt/stack/run_sh.pid
-
- cd /opt/stack/devstack
- ./unstack.sh || true
- ./stack.sh
-
- # Got to the end - success
- touch /opt/stack/runsh.succeeded
-
- # Update /etc/issue
- (
- echo "OpenStack VM - Installed by DevStack"
- IPADDR=$(ip -4 address show eth0 | sed -n 's/.*inet \([0-9\.]\+\).*/\1/p')
- echo " Management IP: $IPADDR"
- echo -n " Devstack run: "
- if [ -e /opt/stack/runsh.succeeded ]; then
- echo "SUCCEEDED"
- else
- echo "FAILED"
- fi
- echo ""
- ) > /opt/stack/issue
- sudo cp /opt/stack/issue /etc/issue
-
- rm /opt/stack/run_sh.pid
-) 9> /opt/stack/.runsh_lock
-EOF
-
-chmod 755 $STAGING_DIR/opt/stack/run.sh
diff --git a/tools/xen/devstackubuntu_latecommand.sh b/tools/xen/devstackubuntu_latecommand.sh
deleted file mode 100644
index 2afbe2c..0000000
--- a/tools/xen/devstackubuntu_latecommand.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-set -eux
-
-# Need to set barrier=0 to avoid a Xen bug
-# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/824089
-sed -i -e 's/errors=/barrier=0,errors=/' /etc/fstab
-
-# Allow root to login with a password
-sed -i -e 's/.*PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
-
-# Install the XenServer tools so IP addresses are reported
-wget --no-proxy @XS_TOOLS_URL@ -O /root/tools.deb
-dpkg -i /root/tools.deb
-rm /root/tools.deb
diff --git a/tools/xen/devstackubuntupreseed.cfg b/tools/xen/devstackubuntupreseed.cfg
deleted file mode 100644
index 80f334b..0000000
--- a/tools/xen/devstackubuntupreseed.cfg
+++ /dev/null
@@ -1,471 +0,0 @@
-### Contents of the preconfiguration file (for squeeze)
-### Localization
-# Preseeding only locale sets language, country and locale.
-d-i debian-installer/locale string en_US
-
-# The values can also be preseeded individually for greater flexibility.
-#d-i debian-installer/language string en
-#d-i debian-installer/country string NL
-#d-i debian-installer/locale string en_GB.UTF-8
-# Optionally specify additional locales to be generated.
-#d-i localechooser/supported-locales en_US.UTF-8, nl_NL.UTF-8
-
-# Keyboard selection.
-# Disable automatic (interactive) keymap detection.
-d-i console-setup/ask_detect boolean false
-#d-i keyboard-configuration/modelcode string pc105
-d-i keyboard-configuration/layoutcode string us
-# To select a variant of the selected layout (if you leave this out, the
-# basic form of the layout will be used):
-#d-i keyboard-configuration/variantcode string dvorak
-
-### Network configuration
-# Disable network configuration entirely. This is useful for cdrom
-# installations on non-networked devices where the network questions,
-# warning and long timeouts are a nuisance.
-#d-i netcfg/enable boolean false
-
-# netcfg will choose an interface that has link if possible. This makes it
-# skip displaying a list if there is more than one interface.
-d-i netcfg/choose_interface select auto
-
-# To pick a particular interface instead:
-#d-i netcfg/choose_interface select eth1
-
-# If you have a slow dhcp server and the installer times out waiting for
-# it, this might be useful.
-d-i netcfg/dhcp_timeout string 120
-
-# If you prefer to configure the network manually, uncomment this line and
-# the static network configuration below.
-#d-i netcfg/disable_autoconfig boolean true
-
-# If you want the preconfiguration file to work on systems both with and
-# without a dhcp server, uncomment these lines and the static network
-# configuration below.
-#d-i netcfg/dhcp_failed note
-#d-i netcfg/dhcp_options select Configure network manually
-
-# Static network configuration.
-#d-i netcfg/get_nameservers string 192.168.1.1
-#d-i netcfg/get_ipaddress string 192.168.1.42
-#d-i netcfg/get_netmask string 255.255.255.0
-#d-i netcfg/get_gateway string 192.168.1.1
-#d-i netcfg/confirm_static boolean true
-
-# Any hostname and domain names assigned from dhcp take precedence over
-# values set here. However, setting the values still prevents the questions
-# from being shown, even if values come from dhcp.
-d-i netcfg/get_hostname string stack
-d-i netcfg/get_domain string stackpass
-
-# Disable that annoying WEP key dialog.
-d-i netcfg/wireless_wep string
-# The wacky dhcp hostname that some ISPs use as a password of sorts.
-#d-i netcfg/dhcp_hostname string radish
-
-# If non-free firmware is needed for the network or other hardware, you can
-# configure the installer to always try to load it, without prompting. Or
-# change to false to disable asking.
-#d-i hw-detect/load_firmware boolean true
-
-### Network console
-# Use the following settings if you wish to make use of the network-console
-# component for remote installation over SSH. This only makes sense if you
-# intend to perform the remainder of the installation manually.
-#d-i anna/choose_modules string network-console
-#d-i network-console/password password r00tme
-#d-i network-console/password-again password r00tme
-
-### Mirror settings
-# If you select ftp, the mirror/country string does not need to be set.
-#d-i mirror/protocol string ftp
-d-i mirror/country string manual
-d-i mirror/http/hostname string archive.ubuntu.com
-d-i mirror/http/directory string /ubuntu
-d-i mirror/http/proxy string
-
-# Alternatively: by default, the installer uses CC.archive.ubuntu.com where
-# CC is the ISO-3166-2 code for the selected country. You can preseed this
-# so that it does so without asking.
-#d-i mirror/http/mirror select CC.archive.ubuntu.com
-
-# Suite to install.
-#d-i mirror/suite string squeeze
-# Suite to use for loading installer components (optional).
-#d-i mirror/udeb/suite string squeeze
-# Components to use for loading installer components (optional).
-#d-i mirror/udeb/components multiselect main, restricted
-
-### Clock and time zone setup
-# Controls whether or not the hardware clock is set to UTC.
-d-i clock-setup/utc boolean true
-
-# You may set this to any valid setting for $TZ; see the contents of
-# /usr/share/zoneinfo/ for valid values.
-d-i time/zone string US/Pacific
-
-# Controls whether to use NTP to set the clock during the install
-d-i clock-setup/ntp boolean true
-# NTP server to use. The default is almost always fine here.
-d-i clock-setup/ntp-server string 0.us.pool.ntp.org
-
-### Partitioning
-## Partitioning example
-# If the system has free space you can choose to only partition that space.
-# This is only honoured if partman-auto/method (below) is not set.
-# Alternatives: custom, some_device, some_device_crypto, some_device_lvm.
-#d-i partman-auto/init_automatically_partition select biggest_free
-
-# Alternatively, you may specify a disk to partition. If the system has only
-# one disk the installer will default to using that, but otherwise the device
-# name must be given in traditional, non-devfs format (so e.g. /dev/hda or
-# /dev/sda, and not e.g. /dev/discs/disc0/disc).
-# For example, to use the first SCSI/SATA hard disk:
-#d-i partman-auto/disk string /dev/sda
-# In addition, you'll need to specify the method to use.
-# The presently available methods are:
-# - regular: use the usual partition types for your architecture
-# - lvm: use LVM to partition the disk
-# - crypto: use LVM within an encrypted partition
-d-i partman-auto/method string regular
-
-# If one of the disks that are going to be automatically partitioned
-# contains an old LVM configuration, the user will normally receive a
-# warning. This can be preseeded away...
-d-i partman-lvm/device_remove_lvm boolean true
-# The same applies to pre-existing software RAID array:
-d-i partman-md/device_remove_md boolean true
-# And the same goes for the confirmation to write the lvm partitions.
-d-i partman-lvm/confirm boolean true
-
-# For LVM partitioning, you can select how much of the volume group to use
-# for logical volumes.
-#d-i partman-auto-lvm/guided_size string max
-#d-i partman-auto-lvm/guided_size string 10GB
-#d-i partman-auto-lvm/guided_size string 50%
-
-# You can choose one of the three predefined partitioning recipes:
-# - atomic: all files in one partition
-# - home: separate /home partition
-# - multi: separate /home, /usr, /var, and /tmp partitions
-d-i partman-auto/choose_recipe select atomic
-
-# Or provide a recipe of your own...
-# If you have a way to get a recipe file into the d-i environment, you can
-# just point at it.
-#d-i partman-auto/expert_recipe_file string /hd-media/recipe
-
-# If not, you can put an entire recipe into the preconfiguration file in one
-# (logical) line. This example creates a small /boot partition, suitable
-# swap, and uses the rest of the space for the root partition:
-#d-i partman-auto/expert_recipe string \
-# boot-root :: \
-# 40 50 100 ext3 \
-# $primary{ } $bootable{ } \
-# method{ format } format{ } \
-# use_filesystem{ } filesystem{ ext3 } \
-# mountpoint{ /boot } \
-# . \
-# 500 10000 1000000000 ext3 \
-# method{ format } format{ } \
-# use_filesystem{ } filesystem{ ext3 } \
-# mountpoint{ / } \
-# . \
-# 64 512 300% linux-swap \
-# method{ swap } format{ } \
-# .
-
-# If you just want to change the default filesystem from ext3 to something
-# else, you can do that without providing a full recipe.
-d-i partman/default_filesystem string ext3
-
-# The full recipe format is documented in the file partman-auto-recipe.txt
-# included in the 'debian-installer' package or available from D-I source
-# repository. This also documents how to specify settings such as file
-# system labels, volume group names and which physical devices to include
-# in a volume group.
-
-# This makes partman automatically partition without confirmation, provided
-# that you told it what to do using one of the methods above.
-d-i partman-partitioning/confirm_write_new_label boolean true
-d-i partman/choose_partition select finish
-d-i partman/confirm boolean true
-d-i partman/confirm_nooverwrite boolean true
-
-## Partitioning using RAID
-# The method should be set to "raid".
-#d-i partman-auto/method string raid
-# Specify the disks to be partitioned. They will all get the same layout,
-# so this will only work if the disks are the same size.
-#d-i partman-auto/disk string /dev/sda /dev/sdb
-
-# Next you need to specify the physical partitions that will be used.
-#d-i partman-auto/expert_recipe string \
-# multiraid :: \
-# 1000 5000 4000 raid \
-# $primary{ } method{ raid } \
-# . \
-# 64 512 300% raid \
-# method{ raid } \
-# . \
-# 500 10000 1000000000 raid \
-# method{ raid } \
-# .
-
-# Last you need to specify how the previously defined partitions will be
-# used in the RAID setup. Remember to use the correct partition numbers
-# for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported;
-# devices are separated using "#".
-# Parameters are:
-# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
-# <devices> <sparedevices>
-
-#d-i partman-auto-raid/recipe string \
-# 1 2 0 ext3 / \
-# /dev/sda1#/dev/sdb1 \
-# . \
-# 1 2 0 swap - \
-# /dev/sda5#/dev/sdb5 \
-# . \
-# 0 2 0 ext3 /home \
-# /dev/sda6#/dev/sdb6 \
-# .
-
-# For additional information see the file partman-auto-raid-recipe.txt
-# included in the 'debian-installer' package or available from D-I source
-# repository.
-
-# This makes partman automatically partition without confirmation.
-d-i partman-md/confirm boolean true
-d-i partman-partitioning/confirm_write_new_label boolean true
-d-i partman/choose_partition select finish
-d-i partman/confirm boolean true
-d-i partman/confirm_nooverwrite boolean true
-
-## Controlling how partitions are mounted
-# The default is to mount by UUID, but you can also choose "traditional" to
-# use traditional device names, or "label" to try filesystem labels before
-# falling back to UUIDs.
-#d-i partman/mount_style select uuid
-
-### Base system installation
-# Configure APT to not install recommended packages by default. Use of this
-# option can result in an incomplete system and should only be used by very
-# experienced users.
-#d-i base-installer/install-recommends boolean false
-
-# 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-virtual
-
-### Account setup
-# Skip creation of a root account (normal user account will be able to
-# use sudo). The default is false; preseed this to true if you want to set
-# a root password.
-d-i passwd/root-login boolean true
-# Alternatively, to skip creation of a normal user account.
-d-i passwd/make-user boolean false
-
-# Root password, either in clear text
-d-i passwd/root-password password stackpass
-d-i passwd/root-password-again password stackpass
-# or encrypted using an MD5 hash.
-#d-i passwd/root-password-crypted password [MD5 hash]
-
-# To create a normal user account.
-#d-i passwd/user-fullname string Ubuntu User
-#d-i passwd/username string ubuntu
-# Normal user's password, either in clear text
-#d-i passwd/user-password password insecure
-#d-i passwd/user-password-again password insecure
-# or encrypted using an MD5 hash.
-#d-i passwd/user-password-crypted password [MD5 hash]
-# Create the first user with the specified UID instead of the default.
-#d-i passwd/user-uid string 1010
-# The installer will warn about weak passwords. If you are sure you know
-# what you're doing and want to override it, uncomment this.
-d-i user-setup/allow-password-weak boolean true
-
-# The user account will be added to some standard initial groups. To
-# override that, use this.
-#d-i passwd/user-default-groups string audio cdrom video
-
-# Set to true if you want to encrypt the first user's home directory.
-d-i user-setup/encrypt-home boolean false
-
-### Apt setup
-# You can choose to install restricted and universe software, or to install
-# software from the backports repository.
-d-i apt-setup/restricted boolean true
-d-i apt-setup/universe boolean true
-d-i apt-setup/backports boolean true
-# Uncomment this if you don't want to use a network mirror.
-#d-i apt-setup/use_mirror boolean false
-# Select which update services to use; define the mirrors to be used.
-# Values shown below are the normal defaults.
-#d-i apt-setup/services-select multiselect security
-#d-i apt-setup/security_host string security.ubuntu.com
-#d-i apt-setup/security_path string /ubuntu
-
-# Additional repositories, local[0-9] available
-#d-i apt-setup/local0/repository string \
-# http://local.server/ubuntu squeeze main
-#d-i apt-setup/local0/comment string local server
-# Enable deb-src lines
-#d-i apt-setup/local0/source boolean true
-# URL to the public key of the local repository; you must provide a key or
-# apt will complain about the unauthenticated repository and so the
-# sources.list line will be left commented out
-#d-i apt-setup/local0/key string http://local.server/key
-
-# By default the installer requires that repositories be authenticated
-# using a known gpg key. This setting can be used to disable that
-# authentication. Warning: Insecure, not recommended.
-#d-i debian-installer/allow_unauthenticated boolean true
-
-### Package selection
-#tasksel tasksel/first multiselect ubuntu-desktop
-#tasksel tasksel/first multiselect lamp-server, print-server
-#tasksel tasksel/first multiselect kubuntu-desktop
-tasksel tasksel/first multiselect openssh-server
-
-# Individual additional packages to install
-d-i pkgsel/include string cracklib-runtime curl wget ssh openssh-server tcpdump ethtool git sudo python-netaddr coreutils
-
-# Whether to upgrade packages after debootstrap.
-# Allowed values: none, safe-upgrade, full-upgrade
-d-i pkgsel/upgrade select safe-upgrade
-
-# Language pack selection
-#d-i pkgsel/language-packs multiselect de, en, zh
-
-# Policy for applying updates. May be "none" (no automatic updates),
-# "unattended-upgrades" (install security updates automatically), or
-# "landscape" (manage system with Landscape).
-d-i pkgsel/update-policy select unattended-upgrades
-
-# Some versions of the installer can report back on what software you have
-# installed, and what software you use. The default is not to report back,
-# but sending reports helps the project determine what software is most
-# popular and include it on CDs.
-#popularity-contest popularity-contest/participate boolean false
-
-# By default, the system's locate database will be updated after the
-# installer has finished installing most packages. This may take a while, so
-# if you don't want it, you can set this to "false" to turn it off.
-d-i pkgsel/updatedb boolean false
-
-### Boot loader installation
-# Grub is the default boot loader (for x86). If you want lilo installed
-# instead, uncomment this:
-#d-i grub-installer/skip boolean true
-# To also skip installing lilo, and install no bootloader, uncomment this
-# too:
-#d-i lilo-installer/skip boolean true
-
-# With a few exceptions for unusual partitioning setups, GRUB 2 is now the
-# default. If you need GRUB Legacy for some particular reason, then
-# uncomment this:
-d-i grub-installer/grub2_instead_of_grub_legacy boolean false
-
-# This is fairly safe to set, it makes grub install automatically to the MBR
-# if no other operating system is detected on the machine.
-d-i grub-installer/only_debian boolean true
-
-# This one makes grub-installer install to the MBR if it also finds some other
-# OS, which is less safe as it might not be able to boot that other OS.
-d-i grub-installer/with_other_os boolean true
-
-# Alternatively, if you want to install to a location other than the mbr,
-# uncomment and edit these lines:
-#d-i grub-installer/only_debian boolean false
-#d-i grub-installer/with_other_os boolean false
-#d-i grub-installer/bootdev string (hd0,0)
-# To install grub to multiple disks:
-#d-i grub-installer/bootdev string (hd0,0) (hd1,0) (hd2,0)
-
-# Optional password for grub, either in clear text
-#d-i grub-installer/password password r00tme
-#d-i grub-installer/password-again password r00tme
-# or encrypted using an MD5 hash, see grub-md5-crypt(8).
-#d-i grub-installer/password-crypted password [MD5 hash]
-
-# Use the following option to add additional boot parameters for the
-# installed system (if supported by the bootloader installer).
-# Note: options passed to the installer will be added automatically.
-#d-i debian-installer/add-kernel-opts string nousb
-
-### Finishing up the installation
-# During installations from serial console, the regular virtual consoles
-# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
-# line to prevent this.
-d-i finish-install/keep-consoles boolean true
-
-# Avoid that last message about the install being complete.
-d-i finish-install/reboot_in_progress note
-
-# This will prevent the installer from ejecting the CD during the reboot,
-# which is useful in some situations.
-#d-i cdrom-detect/eject boolean false
-
-# This is how to make the installer shutdown when finished, but not
-# reboot into the installed system.
-#d-i debian-installer/exit/halt boolean true
-# This will power off the machine instead of just halting it.
-#d-i debian-installer/exit/poweroff boolean true
-
-### X configuration
-# X can detect the right driver for some cards, but if you're preseeding,
-# you override whatever it chooses. Still, vesa will work most places.
-#xserver-xorg xserver-xorg/config/device/driver select vesa
-
-# A caveat with mouse autodetection is that if it fails, X will retry it
-# over and over. So if it's preseeded to be done, there is a possibility of
-# an infinite loop if the mouse is not autodetected.
-#xserver-xorg xserver-xorg/autodetect_mouse boolean true
-
-# Monitor autodetection is recommended.
-xserver-xorg xserver-xorg/autodetect_monitor boolean true
-# Uncomment if you have an LCD display.
-#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
-# X has three configuration paths for the monitor. Here's how to preseed
-# the "medium" path, which is always available. The "simple" path may not
-# be available, and the "advanced" path asks too many questions.
-xserver-xorg xserver-xorg/config/monitor/selection-method \
- select medium
-xserver-xorg xserver-xorg/config/monitor/mode-list \
- select 1024x768 @ 60 Hz
-
-### Preseeding other packages
-# Depending on what software you choose to install, or if things go wrong
-# during the installation process, it's possible that other questions may
-# be asked. You can preseed those too, of course. To get a list of every
-# possible question that could be asked during an install, do an
-# installation, and then run these commands:
-# debconf-get-selections --installer > file
-# debconf-get-selections >> file
-
-
-#### Advanced options
-### Running custom commands during the installation
-# d-i preseeding is inherently not secure. Nothing in the installer checks
-# for attempts at buffer overflows or other exploits of the values of a
-# preconfiguration file like this one. Only use preconfiguration files from
-# trusted locations! To drive that home, and because it's generally useful,
-# here's a way to run any shell command you'd like inside the installer,
-# automatically.
-
-# This first command is run as early as possible, just after
-# preseeding is read.
-#d-i preseed/early_command string anna-install some-udeb
-# This command is run immediately before the partitioner starts. It may be
-# useful to apply dynamic partitioner preseeding that depends on the state
-# of the disks (which may not be visible when preseed/early_command runs).
-#d-i partman/early_command \
-# string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
-# This command is run just before the install finishes, but when there is
-# still a usable /target directory. You can chroot to /target and use it
-# directly, or use the apt-install and in-target commands to easily install
-# packages and run commands in the target system.
-d-i preseed/late_command string
diff --git a/tools/xen/functions b/tools/xen/functions
deleted file mode 100644
index bc0c515..0000000
--- a/tools/xen/functions
+++ /dev/null
@@ -1,341 +0,0 @@
-#!/bin/bash
-
-function die_with_error {
- local err_msg
-
- err_msg="$1"
-
- echo "$err_msg" >&2
- exit 1
-}
-
-function xapi_plugin_location {
- 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
- fi
- done
- return 1
-}
-
-function create_directory_for_kernels {
- if [ -d "/boot/guest" ]; then
- echo "INFO: /boot/guest directory already exists, using that" >&2
- else
- local local_path
- local_path="$(get_local_sr_path)/os-guest-kernels"
- mkdir -p $local_path
- ln -s $local_path /boot/guest
- fi
-}
-
-function create_directory_for_images {
- if [ -d "/images" ]; then
- echo "INFO: /images directory already exists, using that" >&2
- else
- local local_path
- local_path="$(get_local_sr_path)/os-images"
- mkdir -p $local_path
- ln -s $local_path /images
- fi
-}
-
-function get_local_sr {
- xe pool-list params=default-SR minimal=true
-}
-
-function get_local_sr_path {
- pbd_path="/var/run/sr-mount/$(get_local_sr)"
- pbd_device_config_path=`xe pbd-list sr-uuid=$(get_local_sr) params=device-config | grep " path: "`
- if [ -n "$pbd_device_config_path" ]; then
- pbd_uuid=`xe pbd-list sr-uuid=$(get_local_sr) minimal=true`
- pbd_path=`xe pbd-param-get uuid=$pbd_uuid param-name=device-config param-key=path || echo ""`
- fi
- echo $pbd_path
-}
-
-function find_ip_by_name {
- local guest_name="$1"
- local interface="$2"
-
- local period=10
- local max_tries=10
- local i=0
-
- while true; do
- if [ $i -ge $max_tries ]; then
- echo "Timeout: ip address for interface $interface of $guest_name"
- exit 11
- fi
-
- ipaddress=$(xe vm-list --minimal \
- name-label=$guest_name \
- params=networks | sed -ne "s,^.*${interface}/ip: \([0-9.]*\).*\$,\1,p")
-
- if [ -z "$ipaddress" ]; then
- sleep $period
- i=$((i+1))
- else
- echo $ipaddress
- break
- fi
- done
-}
-
-function _vm_uuid {
- local vm_name_label
-
- vm_name_label="$1"
-
- xe vm-list name-label="$vm_name_label" --minimal
-}
-
-function _create_new_network {
- local name_label
- name_label=$1
-
- xe network-create name-label="$name_label"
-}
-
-function _multiple_networks_with_name {
- local name_label
- name_label=$1
-
- # A comma indicates multiple matches
- xe network-list name-label="$name_label" --minimal | grep -q ","
-}
-
-function _network_exists {
- local name_label
- name_label=$1
-
- ! [ -z "$(xe network-list name-label="$name_label" --minimal)" ]
-}
-
-function _bridge_exists {
- local bridge
- bridge=$1
-
- ! [ -z "$(xe network-list bridge="$bridge" --minimal)" ]
-}
-
-function _network_uuid {
- local bridge_or_net_name
- bridge_or_net_name=$1
-
- if _bridge_exists "$bridge_or_net_name"; then
- xe network-list bridge="$bridge_or_net_name" --minimal
- else
- xe network-list name-label="$bridge_or_net_name" --minimal
- fi
-}
-
-function add_interface {
- local vm_name_label
- local bridge_or_network_name
-
- vm_name_label="$1"
- bridge_or_network_name="$2"
- device_number="$3"
-
- local vm
- local net
-
- vm=$(_vm_uuid "$vm_name_label")
- net=$(_network_uuid "$bridge_or_network_name")
- xe vif-create network-uuid=$net vm-uuid=$vm device=$device_number
-}
-
-function setup_network {
- local bridge_or_net_name
- bridge_or_net_name=$1
-
- if ! _bridge_exists "$bridge_or_net_name"; then
- if _network_exists "$bridge_or_net_name"; then
- if _multiple_networks_with_name "$bridge_or_net_name"; then
- cat >&2 << EOF
-ERROR: Multiple networks found matching name-label to "$bridge_or_net_name"
-please review your XenServer network configuration / localrc file.
-EOF
- exit 1
- fi
- else
- _create_new_network "$bridge_or_net_name"
- fi
- fi
-}
-
-function bridge_for {
- local bridge_or_net_name
- bridge_or_net_name=$1
-
- if _bridge_exists "$bridge_or_net_name"; then
- echo "$bridge_or_net_name"
- else
- xe network-list name-label="$bridge_or_net_name" params=bridge --minimal
- fi
-}
-
-function xenapi_ip_on {
- local bridge_or_net_name
- bridge_or_net_name=$1
-
- ip -4 addr show $(bridge_for "$bridge_or_net_name") |\
- awk '/inet/{split($2, ip, "/"); print ip[1];}'
-}
-
-function xenapi_is_listening_on {
- local bridge_or_net_name
- bridge_or_net_name=$1
-
- ! [ -z $(xenapi_ip_on "$bridge_or_net_name") ]
-}
-
-function parameter_is_specified {
- local parameter_name
- parameter_name=$1
-
- compgen -v | grep "$parameter_name"
-}
-
-function append_kernel_cmdline {
- local vm_name_label
- local kernel_args
-
- vm_name_label="$1"
- kernel_args="$2"
-
- local vm
- local pv_args
-
- vm=$(_vm_uuid "$vm_name_label")
- pv_args=$(xe vm-param-get param-name=PV-args uuid=$vm)
- xe vm-param-set PV-args="$pv_args $kernel_args" uuid=$vm
-}
-
-function destroy_all_vifs_of {
- local vm_name_label
-
- vm_name_label="$1"
-
- local vm
-
- vm=$(_vm_uuid "$vm_name_label")
- IFS=,
- for vif in $(xe vif-list vm-uuid=$vm --minimal); do
- xe vif-destroy uuid="$vif"
- done
- unset IFS
-}
-
-function have_multiple_hosts {
- xe host-list --minimal | grep -q ","
-}
-
-function attach_network {
- local bridge_or_net_name
-
- bridge_or_net_name="$1"
-
- local net
- local host
-
- net=$(_network_uuid "$bridge_or_net_name")
- host=$(xe host-list --minimal)
-
- xe network-attach uuid=$net host-uuid=$host
-}
-
-function set_vm_memory {
- local vm_name_label
- local memory
-
- vm_name_label="$1"
- memory="$2"
-
- local vm
-
- vm=$(_vm_uuid "$vm_name_label")
-
- xe vm-memory-limits-set \
- static-min=${memory}MiB \
- static-max=${memory}MiB \
- dynamic-min=${memory}MiB \
- dynamic-max=${memory}MiB \
- uuid=$vm
-}
-
-function max_vcpus {
- local vm_name_label
-
- vm_name_label="$1"
-
- local vm
- local host
- local cpu_count
-
- host=$(xe host-list --minimal)
- vm=$(_vm_uuid "$vm_name_label")
-
- cpu_count=$(xe host-param-get \
- param-name=cpu_info \
- uuid=$host |
- sed -e 's/^.*cpu_count: \([0-9]*\);.*$/\1/g')
-
- if [ -z "$cpu_count" ]; then
- # get dom0's vcpu count
- cpu_count=$(cat /proc/cpuinfo | grep processor | wc -l)
- fi
-
- # Assert cpu_count is not empty
- [ -n "$cpu_count" ]
-
- # Assert ithas a numeric nonzero value
- expr "$cpu_count" + 0
-
- # 8 VCPUs should be enough for devstack VM; avoid using too
- # many VCPUs:
- # 1. too many VCPUs may trigger a kernel bug which result VM
- # not able to boot:
- # https://kernel.googlesource.com/pub/scm/linux/kernel/git/wsa/linux/+/e2e004acc7cbe3c531e752a270a74e95cde3ea48
- # 2. The remaining CPUs can be used for other purpose:
- # e.g. boot test VMs.
- MAX_VCPUS=8
- if [ $cpu_count -ge $MAX_VCPUS ]; then
- cpu_count=$MAX_VCPUS
- fi
-
- xe vm-param-set uuid=$vm VCPUs-max=$cpu_count
- xe vm-param-set uuid=$vm VCPUs-at-startup=$cpu_count
-}
-
-function get_domid {
- local vm_name_label
-
- vm_name_label="$1"
-
- xe vm-list name-label="$vm_name_label" params=dom-id minimal=true
-}
-
-function install_conntrack_tools {
- local xs_host
- local xs_ver_major
- local centos_ver
- local conntrack_conf
- xs_host=$(xe host-list --minimal)
- xs_ver_major=$(xe host-param-get uuid=$xs_host param-name=software-version param-key=product_version_text_short | cut -d'.' -f 1)
- if [ $xs_ver_major -gt 6 ]; then
- # Only support conntrack-tools in Dom0 with XS7.0 and above
- if [ ! -f /usr/sbin/conntrackd ]; then
- sed -i s/#baseurl=/baseurl=/g /etc/yum.repos.d/CentOS-Base.repo
- centos_ver=$(yum version nogroups |grep Installed | cut -d' ' -f 2 | cut -d'/' -f 1 | cut -d'-' -f 1)
- yum install -y --enablerepo=base --releasever=$centos_ver conntrack-tools
- # Backup conntrackd.conf after install conntrack-tools, use the one with statistic mode
- mv /etc/conntrackd/conntrackd.conf /etc/conntrackd/conntrackd.conf.back
- conntrack_conf=$(find /usr/share/doc -name conntrackd.conf |grep stats)
- cp $conntrack_conf /etc/conntrackd/conntrackd.conf
- fi
- service conntrackd restart
- fi
-}
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
deleted file mode 100755
index f4ca71a..0000000
--- a/tools/xen/install_os_domU.sh
+++ /dev/null
@@ -1,418 +0,0 @@
-#!/bin/bash
-
-# This script must be run on a XenServer or XCP machine
-#
-# It creates a DomU VM that runs OpenStack services
-#
-# For more details see: README.md
-
-set -o errexit
-set -o nounset
-set -o xtrace
-
-export LC_ALL=C
-
-# This directory
-THIS_DIR=$(cd $(dirname "$0") && pwd)
-
-# Include onexit commands
-. $THIS_DIR/scripts/on_exit.sh
-
-# xapi functions
-. $THIS_DIR/functions
-
-#
-# Get Settings
-#
-TOP_DIR=$(cd $THIS_DIR/../../ && pwd)
-source $TOP_DIR/inc/meta-config
-rm -f $TOP_DIR/.localrc.auto
-extract_localrc_section $TOP_DIR/local.conf $TOP_DIR/localrc $TOP_DIR/.localrc.auto
-
-# Source params - override xenrc params in your localrc to suit your taste
-source $THIS_DIR/xenrc
-
-xe_min()
-{
- local cmd="$1"
- shift
- xe "$cmd" --minimal "$@"
-}
-
-#
-# Prepare Dom0
-# including installing XenAPI plugins
-#
-
-cd $THIS_DIR
-
-# Die if multiple hosts listed
-if have_multiple_hosts; then
- cat >&2 << EOF
-ERROR: multiple hosts found. This might mean that the XenServer is a member
-of a pool - Exiting.
-EOF
- exit 1
-fi
-
-#
-# Configure Networking
-#
-
-MGT_NETWORK=`xe pif-list management=true params=network-uuid minimal=true`
-MGT_BRIDGE_OR_NET_NAME=`xe network-list uuid=$MGT_NETWORK params=bridge minimal=true`
-
-setup_network "$VM_BRIDGE_OR_NET_NAME"
-setup_network "$MGT_BRIDGE_OR_NET_NAME"
-setup_network "$PUB_BRIDGE_OR_NET_NAME"
-
-if parameter_is_specified "FLAT_NETWORK_BRIDGE"; then
- if [ "$(bridge_for "$VM_BRIDGE_OR_NET_NAME")" != "$(bridge_for "$FLAT_NETWORK_BRIDGE")" ]; then
- cat >&2 << EOF
-ERROR: FLAT_NETWORK_BRIDGE is specified in localrc file, and either no network
-found on XenServer by searching for networks by that value as name-label or
-bridge name or the network found does not match the network specified by
-VM_BRIDGE_OR_NET_NAME. Please check your localrc file.
-EOF
- exit 1
- fi
-fi
-
-if ! xenapi_is_listening_on "$MGT_BRIDGE_OR_NET_NAME"; then
- cat >&2 << EOF
-ERROR: XenAPI does not have an assigned IP address on the management network.
-please review your XenServer network configuration / localrc file.
-EOF
- exit 1
-fi
-
-HOST_IP=$(xenapi_ip_on "$MGT_BRIDGE_OR_NET_NAME")
-
-# Set up ip forwarding, but skip on xcp-xapi
-if [ -a /etc/sysconfig/network ]; then
- if ! grep -q "FORWARD_IPV4=YES" /etc/sysconfig/network; then
- # FIXME: This doesn't work on reboot!
- echo "FORWARD_IPV4=YES" >> /etc/sysconfig/network
- fi
-fi
-# Also, enable ip forwarding in rc.local, since the above trick isn't working
-if ! grep -q "echo 1 >/proc/sys/net/ipv4/ip_forward" /etc/rc.local; then
- echo "echo 1 >/proc/sys/net/ipv4/ip_forward" >> /etc/rc.local
-fi
-# Enable ip forwarding at runtime as well
-echo 1 > /proc/sys/net/ipv4/ip_forward
-
-
-#
-# Shutdown previous runs
-#
-
-DO_SHUTDOWN=${DO_SHUTDOWN:-1}
-CLEAN_TEMPLATES=${CLEAN_TEMPLATES:-false}
-if [ "$DO_SHUTDOWN" = "1" ]; then
- # Shutdown all domU's that created previously
- clean_templates_arg=""
- if $CLEAN_TEMPLATES; then
- clean_templates_arg="--remove-templates"
- fi
- ./scripts/uninstall-os-vpx.sh $clean_templates_arg
-
- # Destroy any instances that were launched
- for uuid in `xe vm-list | grep -1 instance | grep uuid | sed "s/.*\: //g"`; do
- echo "Shutting down nova instance $uuid"
- xe vm-uninstall uuid=$uuid force=true
- done
-
- # Destroy orphaned vdis
- for uuid in `xe vdi-list | grep -1 Glance | grep uuid | sed "s/.*\: //g"`; do
- xe vdi-destroy uuid=$uuid
- done
-fi
-
-
-#
-# Create Ubuntu VM template
-# and/or create VM from template
-#
-
-GUEST_NAME=${GUEST_NAME:-"DevStackOSDomU"}
-TNAME="jeos_template_for_devstack"
-SNAME_TEMPLATE="jeos_snapshot_for_devstack"
-SNAME_FIRST_BOOT="before_first_boot"
-
-function wait_for_VM_to_halt {
- set +x
- echo "Waiting for the VM to halt. Progress in-VM can be checked with XenCenter or xl console:"
- mgmt_ip=$(echo $XENAPI_CONNECTION_URL | tr -d -c '1234567890.')
- domid=$(get_domid "$GUEST_NAME")
- echo "ssh root@$mgmt_ip \"xl console $domid\""
- while true; do
- state=$(xe_min vm-list name-label="$GUEST_NAME" power-state=halted)
- if [ -n "$state" ]; then
- break
- else
- echo -n "."
- sleep 20
- fi
- done
- set -x
-}
-
-templateuuid=$(xe template-list name-label="$TNAME")
-if [ -z "$templateuuid" ]; then
- #
- # Install Ubuntu over network
- #
- UBUNTU_INST_BRIDGE_OR_NET_NAME=${UBUNTU_INST_BRIDGE_OR_NET_NAME:-"$MGT_BRIDGE_OR_NET_NAME"}
-
- # always update the preseed file, incase we have a newer one
- PRESEED_URL=${PRESEED_URL:-""}
- if [ -z "$PRESEED_URL" ]; then
- PRESEED_URL="${HOST_IP}/devstackubuntupreseed.cfg"
-
- HTTP_SERVER_LOCATION="/opt/xensource/www"
- if [ ! -e $HTTP_SERVER_LOCATION ]; then
- HTTP_SERVER_LOCATION="/var/www/html"
- mkdir -p $HTTP_SERVER_LOCATION
- fi
-
- # Copy the tools DEB to the XS web server
- XS_TOOLS_URL="https://github.com/downloads/citrix-openstack/warehouse/xe-guest-utilities_5.6.100-651_amd64.deb"
- ISO_DIR="/opt/xensource/packages/iso"
- if [ -e "$ISO_DIR" ]; then
- TOOLS_ISO=$(ls -1 $ISO_DIR/*-tools-*.iso | head -1)
- TMP_DIR=/tmp/temp.$RANDOM
- mkdir -p $TMP_DIR
- mount -o loop $TOOLS_ISO $TMP_DIR
- # the target deb package maybe *amd64.deb or *all.deb,
- # so use *amd64.deb by default. If it doesn't exist,
- # then use *all.deb.
- DEB_FILE=$(ls $TMP_DIR/Linux/*amd64.deb || ls $TMP_DIR/Linux/*all.deb)
- cp $DEB_FILE $HTTP_SERVER_LOCATION
- umount $TMP_DIR
- rmdir $TMP_DIR
- XS_TOOLS_URL=${HOST_IP}/$(basename $DEB_FILE)
- fi
-
- cp -f $THIS_DIR/devstackubuntupreseed.cfg $HTTP_SERVER_LOCATION
- cp -f $THIS_DIR/devstackubuntu_latecommand.sh $HTTP_SERVER_LOCATION/latecommand.sh
-
- sed \
- -e "s,\(d-i mirror/http/hostname string\).*,\1 $UBUNTU_INST_HTTP_HOSTNAME,g" \
- -e "s,\(d-i mirror/http/directory string\).*,\1 $UBUNTU_INST_HTTP_DIRECTORY,g" \
- -e "s,\(d-i mirror/http/proxy string\).*,\1 $UBUNTU_INST_HTTP_PROXY,g" \
- -e "s,\(d-i passwd/root-password password\).*,\1 $GUEST_PASSWORD,g" \
- -e "s,\(d-i passwd/root-password-again password\).*,\1 $GUEST_PASSWORD,g" \
- -e "s,\(d-i preseed/late_command string\).*,\1 in-target mkdir -p /tmp; in-target wget --no-proxy ${HOST_IP}/latecommand.sh -O /root/latecommand.sh; in-target bash /root/latecommand.sh,g" \
- -i "${HTTP_SERVER_LOCATION}/devstackubuntupreseed.cfg"
-
- sed \
- -e "s,@XS_TOOLS_URL@,$XS_TOOLS_URL,g" \
- -i "${HTTP_SERVER_LOCATION}/latecommand.sh"
- fi
-
- # Update the template
- $THIS_DIR/scripts/install_ubuntu_template.sh $PRESEED_URL
-
- # create a new VM from the given template with eth0 attached to the given
- # network
- $THIS_DIR/scripts/install-os-vpx.sh \
- -t "$UBUNTU_INST_TEMPLATE_NAME" \
- -n "$UBUNTU_INST_BRIDGE_OR_NET_NAME" \
- -l "$GUEST_NAME"
-
- set_vm_memory "$GUEST_NAME" "1024"
-
- xe vm-start vm="$GUEST_NAME"
-
- # wait for install to finish
- wait_for_VM_to_halt
-
- # set VM to restart after a reboot
- vm_uuid=$(xe_min vm-list name-label="$GUEST_NAME")
- xe vm-param-set actions-after-reboot=Restart uuid="$vm_uuid"
-
- # Make template from VM
- snuuid=$(xe vm-snapshot vm="$GUEST_NAME" new-name-label="$SNAME_TEMPLATE")
- xe snapshot-clone uuid=$snuuid new-name-label="$TNAME"
-else
- #
- # Template already installed, create VM from template
- #
- vm_uuid=$(xe vm-install template="$TNAME" new-name-label="$GUEST_NAME")
-fi
-
-if [ -n "${EXIT_AFTER_JEOS_INSTALLATION:-}" ]; then
- echo "User requested to quit after JEOS installation"
- exit 0
-fi
-
-#
-# Prepare VM for DevStack
-#
-xe vm-param-set other-config:os-vpx=true uuid="$vm_uuid"
-
-# Install XenServer tools, and other such things
-$THIS_DIR/prepare_guest_template.sh "$GUEST_NAME"
-
-# Set virtual machine parameters
-set_vm_memory "$GUEST_NAME" "$OSDOMU_MEM_MB"
-
-# Max out VCPU count for better performance
-max_vcpus "$GUEST_NAME"
-
-# Wipe out all network cards
-destroy_all_vifs_of "$GUEST_NAME"
-
-# Add only one interface to prepare the guest template
-add_interface "$GUEST_NAME" "$MGT_BRIDGE_OR_NET_NAME" "0"
-
-# 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"
-# Tenant network
-add_interface "$GUEST_NAME" "$VM_BRIDGE_OR_NET_NAME" "$VM_DEV_NR"
-# Management network
-add_interface "$GUEST_NAME" "$MGT_BRIDGE_OR_NET_NAME" "$MGT_DEV_NR"
-# Public network
-add_interface "$GUEST_NAME" "$PUB_BRIDGE_OR_NET_NAME" "$PUB_DEV_NR"
-
-#
-# Inject DevStack inside VM disk
-#
-$THIS_DIR/build_xva.sh "$GUEST_NAME"
-
-FLAT_NETWORK_BRIDGE="${FLAT_NETWORK_BRIDGE:-$(bridge_for "$VM_BRIDGE_OR_NET_NAME")}"
-append_kernel_cmdline "$GUEST_NAME" "flat_network_bridge=${FLAT_NETWORK_BRIDGE}"
-
-# Add a separate xvdb, if it was requested
-if [[ "0" != "$XEN_XVDB_SIZE_GB" ]]; then
- vm=$(xe vm-list name-label="$GUEST_NAME" --minimal)
-
- # Add a new disk
- localsr=$(get_local_sr)
- extra_vdi=$(xe vdi-create \
- name-label=xvdb-added-by-devstack \
- virtual-size="${XEN_XVDB_SIZE_GB}GiB" \
- sr-uuid=$localsr type=user)
- xe vbd-create vm-uuid=$vm vdi-uuid=$extra_vdi device=1
-fi
-
-# create a snapshot before the first boot
-# to allow a quick re-run with the same settings
-xe vm-snapshot vm="$GUEST_NAME" new-name-label="$SNAME_FIRST_BOOT"
-
-#
-# Run DevStack VM
-#
-xe vm-start vm="$GUEST_NAME"
-
-function ssh_no_check {
- ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@"
-}
-
-# Get hold of the Management IP of OpenStack VM
-OS_VM_MANAGEMENT_ADDRESS=$MGT_IP
-if [ $OS_VM_MANAGEMENT_ADDRESS == "dhcp" ]; then
- OS_VM_MANAGEMENT_ADDRESS=$(find_ip_by_name $GUEST_NAME $MGT_DEV_NR)
-fi
-
-# Get hold of the Service IP of OpenStack VM
-if [ $HOST_IP_IFACE == "eth${MGT_DEV_NR}" ]; then
- OS_VM_SERVICES_ADDRESS=$MGT_IP
- if [ $MGT_IP == "dhcp" ]; then
- OS_VM_SERVICES_ADDRESS=$(find_ip_by_name $GUEST_NAME $MGT_DEV_NR)
- fi
-else
- OS_VM_SERVICES_ADDRESS=$PUB_IP
- if [ $PUB_IP == "dhcp" ]; then
- OS_VM_SERVICES_ADDRESS=$(find_ip_by_name $GUEST_NAME $PUB_DEV_NR)
- fi
-fi
-
-# Create an ssh-keypair, and set it up for dom0 user
-rm -f /root/dom0key /root/dom0key.pub
-ssh-keygen -f /root/dom0key -P "" -C "dom0"
-DOMID=$(get_domid "$GUEST_NAME")
-
-xenstore-write /local/domain/$DOMID/authorized_keys/$DOMZERO_USER "$(cat /root/dom0key.pub)"
-xenstore-chmod -u /local/domain/$DOMID/authorized_keys/$DOMZERO_USER r$DOMID
-
-function run_on_appliance {
- ssh \
- -i /root/dom0key \
- -o UserKnownHostsFile=/dev/null \
- -o StrictHostKeyChecking=no \
- -o BatchMode=yes \
- "$DOMZERO_USER@$OS_VM_MANAGEMENT_ADDRESS" "$@"
-}
-
-# Wait until we can log in to the appliance
-while ! run_on_appliance true; do
- sleep 1
-done
-
-# Remove authenticated_keys updater cronjob
-echo "" | run_on_appliance crontab -
-
-# Generate a passwordless ssh key for domzero user
-echo "ssh-keygen -f /home/$DOMZERO_USER/.ssh/id_rsa -C $DOMZERO_USER@appliance -N \"\" -q" | run_on_appliance
-
-# Authenticate that user to dom0
-run_on_appliance cat /home/$DOMZERO_USER/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
-
-# If we have copied our ssh credentials, use ssh to monitor while the installation runs
-WAIT_TILL_LAUNCH=${WAIT_TILL_LAUNCH:-1}
-COPYENV=${COPYENV:-1}
-if [ "$WAIT_TILL_LAUNCH" = "1" ] && [ -e ~/.ssh/id_rsa.pub ] && [ "$COPYENV" = "1" ]; then
- set +x
-
- echo "VM Launched - Waiting for run.sh"
- while ! ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS "test -e /opt/stack/run_sh.pid"; do
- sleep 10
- done
- echo -n "devstack service is running, waiting for stack.sh to start logging..."
-
- pid=`ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS "cat /opt/stack/run_sh.pid"`
- if [ -n "$SCREEN_LOGDIR" ]; then
- while ! ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS "test -e ${SCREEN_LOGDIR}/stack.log"; do
- sleep 10
- done
-
- ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS "tail --pid $pid -n +1 -f ${SCREEN_LOGDIR}/stack.log"
- else
- echo -n "SCREEN_LOGDIR not set; just waiting for process $pid to finish"
- ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS "wait $pid"
- fi
-
- set -x
- # Fail if devstack did not succeed
- ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS 'test -e /opt/stack/runsh.succeeded'
-
- set +x
- echo "################################################################################"
- echo ""
- echo "All Finished!"
- echo "You can visit the OpenStack Dashboard"
- echo "at http://$OS_VM_SERVICES_ADDRESS, and contact other services at the usual ports."
-else
- set +x
- echo "################################################################################"
- echo ""
- echo "All Finished!"
- echo "Now, you can monitor the progress of the stack.sh installation by "
- echo "looking at the console of your domU / checking the log files."
- echo ""
- echo "ssh into your domU now: 'ssh stack@$OS_VM_MANAGEMENT_ADDRESS' using your password"
- echo "and then do: 'sudo systemctl status devstack' to check if devstack is still running."
- echo "Check that /opt/stack/runsh.succeeded exists"
- echo ""
- echo "When devstack completes, you can visit the OpenStack Dashboard"
- echo "at http://$OS_VM_SERVICES_ADDRESS, and contact other services at the usual ports."
-fi
diff --git a/tools/xen/mocks b/tools/xen/mocks
deleted file mode 100644
index 3b9b05c..0000000
--- a/tools/xen/mocks
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/bash
-
-test ! -e "$LIST_OF_ACTIONS" && {
- echo "Mocking is not set up properly."
- echo "LIST_OF_ACTIONS should point to an existing file."
- exit 1
-}
-
-test ! -e "$LIST_OF_DIRECTORIES" && {
- echo "Mocking is not set up properly."
- echo "LIST_OF_DIRECTORIES should point to an existing file."
- exit 1
-}
-
-test ! -e "$XE_RESPONSE" && {
- echo "Mocking is not set up properly."
- echo "XE_RESPONSE should point to an existing file."
- exit 1
-}
-
-test ! -e "$XE_CALLS" && {
- echo "Mocking is not set up properly."
- echo "XE_CALLS should point to an existing file."
- exit 1
-}
-
-function mktemp {
- if test "${1:-}" = "-d";
- then
- echo "tempdir"
- else
- echo "tempfile"
- fi
-}
-
-function wget {
- if [[ $@ =~ "failurl" ]]; then
- return 1
- fi
- echo "wget $@" >> $LIST_OF_ACTIONS
-}
-
-function mkdir {
- if test "${1:-}" = "-p";
- then
- echo "$2" >> $LIST_OF_DIRECTORIES
- fi
-}
-
-function unzip {
- echo "Random rubbish from unzip"
- echo "unzip $@" >> $LIST_OF_ACTIONS
-}
-
-function rm {
- echo "rm $@" >> $LIST_OF_ACTIONS
-}
-
-function ln {
- echo "ln $@" >> $LIST_OF_ACTIONS
-}
-
-function [ {
- if test "${1:-}" = "-d";
- then
- echo "[ $@" >> $LIST_OF_ACTIONS
- for directory in $(cat $LIST_OF_DIRECTORIES)
- do
- if test "$directory" = "$2"
- then
- return 0
- fi
- done
- return 1
- fi
- echo "Mock test does not implement the requested function: ${1:-}"
- exit 1
-}
-
-function die_with_error {
- echo "$1" >> $DEAD_MESSAGES
-}
-
-function xe {
- cat $XE_RESPONSE
- {
- for i in $(seq "$#")
- do
- eval "echo \"\$$i\""
- done
- } >> $XE_CALLS
-}
diff --git a/tools/xen/prepare_guest.sh b/tools/xen/prepare_guest.sh
deleted file mode 100755
index 6de1afc..0000000
--- a/tools/xen/prepare_guest.sh
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/bin/bash
-
-# This script is run on an Ubuntu VM.
-# This script is inserted into the VM by prepare_guest_template.sh
-# and is run when that VM boots.
-# It customizes a fresh Ubuntu install, so it is ready
-# to run stack.sh
-#
-# This includes installing the XenServer tools,
-# creating the user called "stack",
-# and shuts down the VM to signal the script has completed
-
-set -o errexit
-set -o nounset
-set -o xtrace
-
-# Configurable nuggets
-GUEST_PASSWORD="$1"
-STACK_USER="$2"
-DOMZERO_USER="$3"
-
-
-function setup_domzero_user {
- local username
-
- username="$1"
-
- local key_updater_script
- local sudoers_file
- key_updater_script="/home/$username/update_authorized_keys.sh"
- sudoers_file="/etc/sudoers.d/allow_$username"
-
- # Create user
- adduser --disabled-password --quiet "$username" --gecos "$username"
-
- # Give passwordless sudo
- cat > $sudoers_file << EOF
- $username ALL = NOPASSWD: ALL
-EOF
- chmod 0440 $sudoers_file
-
- # A script to populate this user's authenticated_keys from xenstore
- cat > $key_updater_script << EOF
-#!/bin/bash
-set -eux
-
-DOMID=\$(sudo xenstore-read domid)
-sudo xenstore-exists /local/domain/\$DOMID/authorized_keys/$username
-sudo xenstore-read /local/domain/\$DOMID/authorized_keys/$username > /home/$username/xenstore_value
-cat /home/$username/xenstore_value > /home/$username/.ssh/authorized_keys
-EOF
-
- # Give the key updater to the user
- chown $username:$username $key_updater_script
- chmod 0700 $key_updater_script
-
- # Setup the .ssh folder
- mkdir -p /home/$username/.ssh
- chown $username:$username /home/$username/.ssh
- chmod 0700 /home/$username/.ssh
- touch /home/$username/.ssh/authorized_keys
- chown $username:$username /home/$username/.ssh/authorized_keys
- chmod 0600 /home/$username/.ssh/authorized_keys
-
- # Setup the key updater as a cron job
- crontab -u $username - << EOF
-* * * * * $key_updater_script
-EOF
-
-}
-
-# Make a small cracklib dictionary, so that passwd still works, but we don't
-# have the big dictionary.
-mkdir -p /usr/share/cracklib
-echo a | cracklib-packer
-
-# Make /etc/shadow, and set the root password
-pwconv
-echo "root:$GUEST_PASSWORD" | chpasswd
-
-# Put the VPX into UTC.
-rm -f /etc/localtime
-
-# Add stack user
-groupadd libvirtd
-useradd $STACK_USER -s /bin/bash -d /opt/stack -G libvirtd
-echo $STACK_USER:$GUEST_PASSWORD | chpasswd
-echo "$STACK_USER ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
-
-setup_domzero_user "$DOMZERO_USER"
-
-# Add an udev rule, so that new block devices could be written by stack user
-cat > /etc/udev/rules.d/50-openstack-blockdev.rules << EOF
-KERNEL=="xvd[b-z]", GROUP="$STACK_USER", MODE="0660"
-EOF
-
-# Give ownership of /opt/stack to stack user
-chown -R $STACK_USER /opt/stack
-
-function setup_vimrc {
- if [ ! -e $1 ]; then
- # Simple but usable vimrc
- cat > $1 <<EOF
-se ts=4
-se expandtab
-se shiftwidth=4
-EOF
- fi
-}
-
-# Setup simple .vimrcs
-setup_vimrc /root/.vimrc
-setup_vimrc /opt/stack/.vimrc
-
-# remove self from local.rc
-# so this script is not run again
-rm -rf /etc/rc.local
-
-# Restore rc.local file
-cp /etc/rc.local.preparebackup /etc/rc.local
-
-# shutdown to notify we are done
-shutdown -h now
diff --git a/tools/xen/prepare_guest_template.sh b/tools/xen/prepare_guest_template.sh
deleted file mode 100755
index 6cdddda..0000000
--- a/tools/xen/prepare_guest_template.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/bash
-
-# This script is run by install_os_domU.sh
-#
-# Parameters:
-# - $GUEST_NAME - hostname for the DomU VM
-#
-# It modifies the ubuntu image created by install_os_domU.sh
-#
-# This script is responsible for cusomtizing the fresh ubuntu
-# image so on boot it runs the prepare_guest.sh script
-# that modifies the VM so it is ready to run stack.sh.
-# It does this by mounting the disk image of the VM.
-#
-# The resultant image is started by install_os_domU.sh,
-# and once the VM has shutdown, build_xva.sh is run
-
-set -o errexit
-set -o nounset
-set -o xtrace
-
-# This directory
-TOP_DIR=$(cd $(dirname "$0") && pwd)
-
-# Include onexit commands
-. $TOP_DIR/scripts/on_exit.sh
-
-# xapi functions
-. $TOP_DIR/functions
-
-# Source params - override xenrc params in your localrc to suite your taste
-source xenrc
-
-#
-# Parameters
-#
-GUEST_NAME="$1"
-
-# Mount the VDI
-STAGING_DIR=$($TOP_DIR/scripts/manage-vdi open $GUEST_NAME 0 1 | grep -o "/tmp/tmp.[[:alnum:]]*")
-add_on_exit "$TOP_DIR/scripts/manage-vdi close $GUEST_NAME 0 1"
-
-# Make sure we have a stage
-if [ ! -d $STAGING_DIR/etc ]; then
- echo "Stage is not properly set up!"
- exit 1
-fi
-
-# Copy prepare_guest.sh to VM
-mkdir -p $STAGING_DIR/opt/stack/
-cp $TOP_DIR/prepare_guest.sh $STAGING_DIR/opt/stack/prepare_guest.sh
-
-# backup rc.local
-cp $STAGING_DIR/etc/rc.local $STAGING_DIR/etc/rc.local.preparebackup
-
-# run prepare_guest.sh on boot
-cat <<EOF >$STAGING_DIR/etc/rc.local
-#!/bin/sh -e
-bash /opt/stack/prepare_guest.sh \\
- "$GUEST_PASSWORD" "$STACK_USER" "$DOMZERO_USER" \\
- > /opt/stack/prepare_guest.log 2>&1
-EOF
-
-# Update ubuntu repositories
-cat > $STAGING_DIR/etc/apt/sources.list << EOF
-deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} main restricted
-deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} main restricted
-deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates main restricted
-deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates main restricted
-deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} universe
-deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} universe
-deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates universe
-deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates universe
-deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} multiverse
-deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} multiverse
-deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates multiverse
-deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates multiverse
-deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-backports main restricted universe multiverse
-deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-backports main restricted universe multiverse
-
-deb http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security main restricted
-deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security main restricted
-deb http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security universe
-deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security universe
-deb http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security multiverse
-deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security multiverse
-EOF
-
-rm -f $STAGING_DIR/etc/apt/apt.conf
-if [ -n "$UBUNTU_INST_HTTP_PROXY" ]; then
- cat > $STAGING_DIR/etc/apt/apt.conf << EOF
-Acquire::http::Proxy "$UBUNTU_INST_HTTP_PROXY";
-EOF
-fi
diff --git a/tools/xen/scripts/install-os-vpx.sh b/tools/xen/scripts/install-os-vpx.sh
deleted file mode 100755
index 66f7ef4..0000000
--- a/tools/xen/scripts/install-os-vpx.sh
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2011 Citrix Systems, Inc.
-# Copyright 2011 OpenStack Foundation
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-
-set -eux
-
-BRIDGE=
-NAME_LABEL=
-TEMPLATE_NAME=
-
-usage()
-{
-cat << EOF
-
- Usage: $0 -t TEMPLATE_NW_INSTALL -l NAME_LABEL [-n BRIDGE]
-
- Install a VM from a template
-
- OPTIONS:
-
- -h Shows this message.
- -t template VM template to use
- -l name Specifies the name label for the VM.
- -n bridge The bridge/network to use for eth0. Defaults to xenbr0
-EOF
-}
-
-get_params()
-{
- while getopts "hbn:r:l:t:" OPTION; do
- case $OPTION in
- h) usage
- exit 1
- ;;
- n)
- BRIDGE=$OPTARG
- ;;
- l)
- NAME_LABEL=$OPTARG
- ;;
- t)
- TEMPLATE_NAME=$OPTARG
- ;;
- ?)
- usage
- exit
- ;;
- esac
- done
- if [[ -z $BRIDGE ]]; then
- BRIDGE=xenbr0
- fi
-
- if [[ -z $TEMPLATE_NAME ]]; then
- echo "Please specify a template name" >&2
- exit 1
- fi
-
- if [[ -z $NAME_LABEL ]]; then
- echo "Please specify a name-label for the new VM" >&2
- exit 1
- fi
-}
-
-
-xe_min()
-{
- local cmd="$1"
- shift
- xe "$cmd" --minimal "$@"
-}
-
-
-find_network()
-{
- result=$(xe_min network-list bridge="$1")
- if [ "$result" = "" ]; then
- result=$(xe_min network-list name-label="$1")
- fi
- echo "$result"
-}
-
-
-create_vif()
-{
- local v="$1"
- echo "Installing VM interface on [$BRIDGE]"
- local out_network_uuid
- out_network_uuid=$(find_network "$BRIDGE")
- xe vif-create vm-uuid="$v" network-uuid="$out_network_uuid" device="0"
-}
-
-
-
-# Make the VM auto-start on server boot.
-set_auto_start()
-{
- local v="$1"
- xe vm-param-set uuid="$v" other-config:auto_poweron=true
-}
-
-
-destroy_vifs()
-{
- local v="$1"
- IFS=,
- for vif in $(xe_min vif-list vm-uuid="$v"); do
- xe vif-destroy uuid="$vif"
- done
- unset IFS
-}
-
-
-get_params "$@"
-
-vm_uuid=$(xe_min vm-install template="$TEMPLATE_NAME" new-name-label="$NAME_LABEL")
-destroy_vifs "$vm_uuid"
-set_auto_start "$vm_uuid"
-create_vif "$vm_uuid"
-xe vm-param-set actions-after-reboot=Destroy uuid="$vm_uuid"
diff --git a/tools/xen/scripts/install_ubuntu_template.sh b/tools/xen/scripts/install_ubuntu_template.sh
deleted file mode 100755
index 6ea3642..0000000
--- a/tools/xen/scripts/install_ubuntu_template.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-#
-# This creates an Ubuntu Server 32bit or 64bit template
-# on Xenserver 5.6.x, 6.0.x and 6.1.x
-# The template does a net install only
-#
-# Based on a script by: David Markey <david.markey@citrix.com>
-#
-
-set -o errexit
-set -o nounset
-set -o xtrace
-
-# This directory
-BASE_DIR=$(cd $(dirname "$0") && pwd)
-
-# For default setings see xenrc
-source $BASE_DIR/../xenrc
-
-# Get the params
-preseed_url=$1
-
-# Delete template or skip template creation as required
-previous_template=$(xe template-list name-label="$UBUNTU_INST_TEMPLATE_NAME" \
- params=uuid --minimal)
-if [ -n "$previous_template" ]; then
- if $CLEAN_TEMPLATES; then
- xe template-param-clear param-name=other-config uuid=$previous_template
- xe template-uninstall template-uuid=$previous_template force=true
- else
- echo "Template $UBUNTU_INST_TEMPLATE_NAME already present"
- exit 0
- fi
-fi
-
-# Get built-in template
-builtin_name="Debian Squeeze 6.0 (32-bit)"
-builtin_uuid=$(xe template-list name-label="$builtin_name" --minimal)
-if [[ -z $builtin_uuid ]]; then
- echo "Can't find the Debian Squeeze 32bit template on your XenServer."
- exit 1
-fi
-
-# Clone built-in template to create new template
-new_uuid=$(xe vm-clone uuid=$builtin_uuid \
- new-name-label="$UBUNTU_INST_TEMPLATE_NAME")
-disk_size=$(($OSDOMU_VDI_GB * 1024 * 1024 * 1024))
-
-# Some of these settings can be found in example preseed files
-# however these need to be answered before the netinstall
-# is ready to fetch the preseed file, and as such must be here
-# to get a fully automated install
-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=eth0 \
-netcfg/get_hostname=os netcfg/get_domain=os auto \
-url=${preseed_url}"
-
-if [ "$UBUNTU_INST_IP" != "dhcp" ]; then
- netcfgargs="netcfg/disable_autoconfig=true \
-netcfg/get_nameservers=${UBUNTU_INST_NAMESERVERS} \
-netcfg/get_ipaddress=${UBUNTU_INST_IP} \
-netcfg/get_netmask=${UBUNTU_INST_NETMASK} \
-netcfg/get_gateway=${UBUNTU_INST_GATEWAY} \
-netcfg/confirm_static=true"
- pvargs="${pvargs} ${netcfgargs}"
-fi
-
-xe template-param-set uuid=$new_uuid \
- other-config:install-methods=http \
- other-config:install-repository="http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY}" \
- PV-args="$pvargs" \
- other-config:debian-release="$UBUNTU_INST_RELEASE" \
- other-config:default_template=true \
- other-config:disks='<provision><disk device="0" size="'$disk_size'" sr="" bootable="true" type="system"/></provision>' \
- other-config:install-arch="$UBUNTU_INST_ARCH"
-
-if ! [ -z "$UBUNTU_INST_HTTP_PROXY" ]; then
- xe template-param-set uuid=$new_uuid \
- other-config:install-proxy="$UBUNTU_INST_HTTP_PROXY"
-fi
-
-echo "Ubuntu template installed uuid:$new_uuid"
diff --git a/tools/xen/scripts/manage-vdi b/tools/xen/scripts/manage-vdi
deleted file mode 100755
index 909ce32..0000000
--- a/tools/xen/scripts/manage-vdi
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/bash
-
-set -eux
-
-action="$1"
-vm="$2"
-device="${3-0}"
-part="${4-}"
-
-function xe_min() {
- local cmd="$1"
- shift
- xe "$cmd" --minimal "$@"
-}
-
-function run_udev_settle() {
- which_udev=$(which udevsettle) || true
- if [ -n "$which_udev" ]; then
- udevsettle
- else
- udevadm settle
- fi
-}
-
-vm_uuid=$(xe_min vm-list name-label="$vm")
-vdi_uuid=$(xe_min vbd-list params=vdi-uuid vm-uuid="$vm_uuid" \
- userdevice="$device")
-
-dom0_uuid=$(xe_min vm-list is-control-domain=true)
-
-function get_mount_device() {
- vbd_uuid=$1
-
- dev=$(xe_min vbd-list params=device uuid="$vbd_uuid")
- if [[ "$dev" =~ "sm/" || "$dev" =~ "blktap-2/" ]]; then
- DEBIAN_FRONTEND=noninteractive \
- apt-get --option "Dpkg::Options::=--force-confold" --assume-yes \
- install kpartx &> /dev/null || true
- mapping=$(kpartx -av "/dev/$dev" | sed -ne 's,^add map \([a-z0-9\-]*\).*$,\1,p' | sed -ne "s,^\(.*${part}\)\$,\1,p")
- if [ -z "$mapping" ]; then
- echo "Failed to find mapping"
- exit -1
- fi
-
- local device="/dev/mapper/${mapping}"
- for (( i = 0; i < 5; i++ )) ; do
- if [ -b $device ] ; then
- echo $device
- return
- fi
- sleep 1
- done
- echo "ERROR: timed out waiting for dev-mapper"
- exit 1
- else
- echo "/dev/$dev$part"
- fi
-}
-
-function clean_dev_mappings() {
- dev=$(xe_min vbd-list params=device uuid="$vbd_uuid")
- if [[ "$dev" =~ "sm/" || "$dev" =~ "blktap-2/" ]]; then
- kpartx -dv "/dev/$dev"
- fi
-}
-
-function open_vdi() {
- vbd_uuid=$(xe vbd-create vm-uuid="$dom0_uuid" vdi-uuid="$vdi_uuid" \
- device=autodetect)
- mp=$(mktemp -d)
- xe vbd-plug uuid="$vbd_uuid"
-
- run_udev_settle
-
- mount_device=$(get_mount_device "$vbd_uuid")
- mount "$mount_device" "$mp"
- echo "Your vdi is mounted at $mp"
-}
-
-function close_vdi() {
- vbd_uuid=$(xe_min vbd-list vm-uuid="$dom0_uuid" vdi-uuid="$vdi_uuid")
- mount_device=$(get_mount_device "$vbd_uuid")
- run_udev_settle
- umount "$mount_device"
-
- clean_dev_mappings
-
- xe vbd-unplug uuid=$vbd_uuid
- xe vbd-destroy uuid=$vbd_uuid
-}
-
-if [ "$action" == "open" ]; then
- open_vdi
-elif [ "$action" == "close" ]; then
- close_vdi
-fi
diff --git a/tools/xen/scripts/on_exit.sh b/tools/xen/scripts/on_exit.sh
deleted file mode 100755
index 2846dc4..0000000
--- a/tools/xen/scripts/on_exit.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-set -e
-set -o xtrace
-
-if [ -z "${on_exit_hooks:-}" ]; then
- on_exit_hooks=()
-fi
-
-on_exit()
-{
- for i in $(seq $((${#on_exit_hooks[*]} - 1)) -1 0); do
- eval "${on_exit_hooks[$i]}"
- done
-}
-
-add_on_exit()
-{
- local n=${#on_exit_hooks[*]}
- on_exit_hooks[$n]="$*"
- if [[ $n -eq 0 ]]; then
- trap on_exit EXIT
- fi
-}
diff --git a/tools/xen/scripts/uninstall-os-vpx.sh b/tools/xen/scripts/uninstall-os-vpx.sh
deleted file mode 100755
index 96dad7e..0000000
--- a/tools/xen/scripts/uninstall-os-vpx.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2011 Citrix Systems, Inc.
-# Copyright 2011 OpenStack Foundation
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-
-set -ex
-
-# By default, don't remove the templates
-REMOVE_TEMPLATES=${REMOVE_TEMPLATES:-"false"}
-if [ "$1" = "--remove-templates" ]; then
- REMOVE_TEMPLATES=true
-fi
-
-xe_min()
-{
- local cmd="$1"
- shift
- xe "$cmd" --minimal "$@"
-}
-
-destroy_vdi()
-{
- local vbd_uuid="$1"
- local type
- type=$(xe_min vbd-list uuid=$vbd_uuid params=type)
- local dev
- dev=$(xe_min vbd-list uuid=$vbd_uuid params=userdevice)
- local vdi_uuid
- vdi_uuid=$(xe_min vbd-list uuid=$vbd_uuid params=vdi-uuid)
-
- if [ "$type" == 'Disk' ] && [ "$dev" != 'xvda' ] && [ "$dev" != '0' ]; then
- xe vdi-destroy uuid=$vdi_uuid
- fi
-}
-
-uninstall()
-{
- local vm_uuid="$1"
- local power_state
- power_state=$(xe_min vm-list uuid=$vm_uuid params=power-state)
-
- if [ "$power_state" != "halted" ]; then
- xe vm-shutdown vm=$vm_uuid force=true
- fi
-
- for v in $(xe_min vbd-list vm-uuid=$vm_uuid | sed -e 's/,/ /g'); do
- destroy_vdi "$v"
- done
-
- xe vm-uninstall vm=$vm_uuid force=true >/dev/null
-}
-
-uninstall_template()
-{
- local vm_uuid="$1"
-
- for v in $(xe_min vbd-list vm-uuid=$vm_uuid | sed -e 's/,/ /g'); do
- destroy_vdi "$v"
- done
-
- xe template-uninstall template-uuid=$vm_uuid force=true >/dev/null
-}
-
-# remove the VMs and their disks
-for u in $(xe_min vm-list other-config:os-vpx=true | sed -e 's/,/ /g'); do
- uninstall "$u"
-done
-
-# remove the templates
-if [ "$REMOVE_TEMPLATES" == "true" ]; then
- for u in $(xe_min template-list other-config:os-vpx=true | sed -e 's/,/ /g'); do
- uninstall_template "$u"
- done
-fi
diff --git a/tools/xen/test_functions.sh b/tools/xen/test_functions.sh
deleted file mode 100755
index 324e6a1..0000000
--- a/tools/xen/test_functions.sh
+++ /dev/null
@@ -1,205 +0,0 @@
-#!/bin/bash
-
-# Tests for functions.
-#
-# The tests are sourcing the mocks file to mock out various functions. The
-# mocking-out always happens in a sub-shell, thus it does not have impact on
-# the functions defined here.
-
-# To run the tests, please run:
-#
-# ./test_functions.sh run_tests
-#
-# To only print out the discovered test functions, run:
-#
-# ./test_functions.sh
-
-. functions
-
-# Setup
-function before_each_test {
- LIST_OF_DIRECTORIES=$(mktemp)
- truncate -s 0 $LIST_OF_DIRECTORIES
-
- LIST_OF_ACTIONS=$(mktemp)
- truncate -s 0 $LIST_OF_ACTIONS
-
- XE_RESPONSE=$(mktemp)
- truncate -s 0 $XE_RESPONSE
-
- XE_CALLS=$(mktemp)
- truncate -s 0 $XE_CALLS
-
- DEAD_MESSAGES=$(mktemp)
- truncate -s 0 $DEAD_MESSAGES
-}
-
-# Teardown
-function after_each_test {
- rm -f $LIST_OF_DIRECTORIES
- rm -f $LIST_OF_ACTIONS
- rm -f $XE_RESPONSE
- rm -f $XE_CALLS
-}
-
-# Helpers
-function setup_xe_response {
- echo "$1" > $XE_RESPONSE
-}
-
-function given_directory_exists {
- echo "$1" >> $LIST_OF_DIRECTORIES
-}
-
-function assert_directory_exists {
- grep "$1" $LIST_OF_DIRECTORIES
-}
-
-function assert_previous_command_failed {
- [ "$?" != "0" ] || exit 1
-}
-
-function assert_xe_min {
- grep -qe "^--minimal\$" $XE_CALLS
-}
-
-function assert_xe_param {
- grep -qe "^$1\$" $XE_CALLS
-}
-
-function assert_died_with {
- diff -u <(echo "$1") $DEAD_MESSAGES
-}
-
-function mock_out {
- local FNNAME="$1"
- local OUTPUT="$2"
-
- . <(cat << EOF
-function $FNNAME {
- echo "$OUTPUT"
-}
-EOF
-)
-}
-
-function assert_symlink {
- grep -qe "^ln -s $2 $1\$" $LIST_OF_ACTIONS
-}
-
-# Tests
-function test_plugin_directory_on_xenserver {
- given_directory_exists "/etc/xapi.d/plugins/"
-
- PLUGDIR=$(. mocks && xapi_plugin_location)
-
- [ "/etc/xapi.d/plugins/" = "$PLUGDIR" ]
-}
-
-function test_plugin_directory_on_xcp {
- given_directory_exists "/usr/lib/xcp/plugins/"
-
- PLUGDIR=$(. mocks && xapi_plugin_location)
-
- [ "/usr/lib/xcp/plugins/" = "$PLUGDIR" ]
-}
-
-function test_no_plugin_directory_found {
- set +e
-
- local IGNORE
- IGNORE=$(. mocks && xapi_plugin_location)
-
- assert_previous_command_failed
-
- grep "[ -d /etc/xapi.d/plugins/ ]" $LIST_OF_ACTIONS
- grep "[ -d /usr/lib/xcp/plugins/ ]" $LIST_OF_ACTIONS
-}
-
-function test_create_directory_for_kernels {
- (
- . mocks
- mock_out get_local_sr_path /var/run/sr-mount/uuid1
- create_directory_for_kernels
- )
-
- assert_directory_exists "/var/run/sr-mount/uuid1/os-guest-kernels"
- assert_symlink "/boot/guest" "/var/run/sr-mount/uuid1/os-guest-kernels"
-}
-
-function test_create_directory_for_kernels_existing_dir {
- (
- . mocks
- given_directory_exists "/boot/guest"
- create_directory_for_kernels
- )
-
- diff -u $LIST_OF_ACTIONS - << EOF
-[ -d /boot/guest ]
-EOF
-}
-
-function test_create_directory_for_images {
- (
- . mocks
- mock_out get_local_sr_path /var/run/sr-mount/uuid1
- create_directory_for_images
- )
-
- assert_directory_exists "/var/run/sr-mount/uuid1/os-images"
- assert_symlink "/images" "/var/run/sr-mount/uuid1/os-images"
-}
-
-function test_create_directory_for_images_existing_dir {
- (
- . mocks
- given_directory_exists "/images"
- create_directory_for_images
- )
-
- diff -u $LIST_OF_ACTIONS - << EOF
-[ -d /images ]
-EOF
-}
-
-function test_get_local_sr {
- setup_xe_response "uuid123"
-
- local RESULT
- RESULT=$(. mocks && get_local_sr)
-
- [ "$RESULT" == "uuid123" ]
-
- assert_xe_param "pool-list" params=default-SR minimal=true
-}
-
-function test_get_local_sr_path {
- local RESULT
- RESULT=$(mock_out get_local_sr "uuid1" && get_local_sr_path)
-
- [ "/var/run/sr-mount/uuid1" == "$RESULT" ]
-}
-
-# Test runner
-[ "$1" = "" ] && {
- grep -e "^function *test_" $0 | cut -d" " -f2
-}
-
-[ "$1" = "run_tests" ] && {
- for testname in $($0); do
- echo "$testname"
- before_each_test
- (
- set -eux
- $testname
- )
- if [ "$?" != "0" ]; then
- echo "FAIL"
- exit 1
- else
- echo "PASS"
- fi
-
- after_each_test
- done
-}
diff --git a/tools/xen/xenrc b/tools/xen/xenrc
deleted file mode 100644
index 169e042..0000000
--- a/tools/xen/xenrc
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/bin/bash
-
-#
-# XenServer specific defaults for the /tools/xen/ scripts
-# Similar to stackrc, you can override these in your localrc
-#
-
-# Name of this guest
-GUEST_NAME=${GUEST_NAME:-DevStackOSDomU}
-
-# Template cleanup
-CLEAN_TEMPLATES=${CLEAN_TEMPLATES:-false}
-
-# Size of image
-VDI_MB=${VDI_MB:-5000}
-
-# Devstack now contains many components. 4GB ram is not enough to prevent
-# swapping and memory fragmentation - the latter of which can cause failures
-# such as blkfront failing to plug a VBD and lead to random test fails.
-#
-# Set to 6GB so an 8GB XenServer VM can have a 1GB Dom0 and leave 1GB for VMs
-OSDOMU_MEM_MB=6144
-OSDOMU_VDI_GB=8
-
-# Network mapping. Specify bridge names or network names. Network names may
-# differ across localised versions of XenServer. If a given bridge/network
-# was not found, a new network will be created with the specified name.
-
-# Get the management network from the XS installation
-VM_BRIDGE_OR_NET_NAME="OpenStack VM Network"
-PUB_BRIDGE_OR_NET_NAME="OpenStack Public Network"
-
-# VM Password
-GUEST_PASSWORD=${GUEST_PASSWORD:-secret}
-
-# Extracted variables for OpenStack VM network device numbers.
-# Make sure they form a continuous sequence starting from 0
-MGT_DEV_NR=0
-VM_DEV_NR=1
-PUB_DEV_NR=2
-
-# Host Interface, i.e. the interface on the nova vm you want to expose the
-# services on. Usually the device connected to the management network or the
-# one connected to the public network is used.
-HOST_IP_IFACE=${HOST_IP_IFACE:-"eth${MGT_DEV_NR}"}
-
-#
-# Our nova host's network info
-#
-
-# Management network
-MGT_IP=${MGT_IP:-dhcp}
-MGT_NETMASK=${MGT_NETMASK:-ignored}
-
-# VM Network
-VM_IP=${VM_IP:-10.255.255.255}
-VM_NETMASK=${VM_NETMASK:-255.255.255.0}
-
-# Public network
-# Aligned with stack.sh - see FLOATING_RANGE
-PUB_IP=${PUB_IP:-172.24.4.10}
-PUB_NETMASK=${PUB_NETMASK:-255.255.255.0}
-
-# Ubuntu install settings
-UBUNTU_INST_RELEASE="xenial"
-UBUNTU_INST_TEMPLATE_NAME="Ubuntu 16.04 (64-bit) for DevStack"
-# For 12.04 use "precise" and update template name
-# However, for 12.04, you should be using
-# XenServer 6.1 and later or XCP 1.6 or later
-# 11.10 is only really supported with XenServer 6.0.2 and later
-UBUNTU_INST_ARCH="amd64"
-UBUNTU_INST_HTTP_HOSTNAME="archive.ubuntu.com"
-UBUNTU_INST_HTTP_DIRECTORY="/ubuntu"
-UBUNTU_INST_HTTP_PROXY=""
-UBUNTU_INST_LOCALE="en_US"
-UBUNTU_INST_KEYBOARD="us"
-# network configuration for ubuntu netinstall
-UBUNTU_INST_IP="dhcp"
-UBUNTU_INST_NAMESERVERS=""
-UBUNTU_INST_NETMASK=""
-UBUNTU_INST_GATEWAY=""
-
-# Create a separate xvdb. Tis could be used as a backing device for cinder
-# volumes. Specify
-# XEN_XVDB_SIZE_GB=10
-# VOLUME_BACKING_DEVICE=/dev/xvdb
-# in your localrc to avoid kernel lockups:
-# https://bugs.launchpad.net/cinder/+bug/1023755
-#
-# Set the size to 0 to avoid creation of additional disk.
-XEN_XVDB_SIZE_GB=0
-
-STACK_USER=stack
-DOMZERO_USER=domzero
-
-RC_DIR="../.."
-
-restore_nounset=$(set +o | grep nounset)
-set +u
-
-## Note that the lines below are coming from stackrc to support
-## new-style config files
-source $RC_DIR/functions-common
-
-# allow local overrides of env variables, including repo config
-if [[ -f $RC_DIR/localrc ]]; then
- # Old-style user-supplied config
- source $RC_DIR/localrc
-elif [[ -f $RC_DIR/.localrc.auto ]]; then
- # New-style user-supplied config extracted from local.conf
- source $RC_DIR/.localrc.auto
-fi
-
-$restore_nounset