Remove references to XenAPI driver

The XenAPI driver was removed during the Victoria release [1], while the
libvirt+xen driver has been removed in the Wallaby release [2]. Remove
references to Xen from DevStack since its all a no-op now.

[1] I42b302afbb1cfede7a0f7b16485a596cd70baf17
[2] I73305e82da5d8da548961b801a8e75fb0e8c4cf1

Change-Id: If7055feb88391f496a5e5e4c72008bf0050c5356
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2021-03-02 16:45:39 +00:00
parent 3c6d105929
commit 970891a4ef
16 changed files with 6 additions and 289 deletions

View File

@ -74,8 +74,7 @@ of test of specific fragile functions in the ``functions`` and
``tools`` - Contains a collection of stand-alone scripts. While these ``tools`` - Contains a collection of stand-alone scripts. While these
may reference the top-level DevStack configuration they can generally be may reference the top-level DevStack configuration they can generally be
run alone. There are also some sub-directories to support specific run alone.
environments such as XenServer.
Scripts Scripts

View File

@ -77,10 +77,6 @@ SUSE
Tempest Tempest
~~~~~~~ ~~~~~~~
Xen
~~~
* Bob Ball <bob.ball@citrix.com>
Zaqar (Marconi) Zaqar (Marconi)
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~

View File

@ -628,12 +628,6 @@ outside of tox. If you would like to install it add the following to your
INSTALL_TEMPEST=True INSTALL_TEMPEST=True
Xenserver
~~~~~~~~~
If you would like to use Xenserver as the hypervisor, please refer to
the instructions in ``./tools/xen/README.md``.
Cinder Cinder
~~~~~~ ~~~~~~

View File

@ -241,7 +241,7 @@ locations in the top-level of the plugin repository:
on Ubuntu, Debian or Linux Mint. on Ubuntu, Debian or Linux Mint.
- ``./devstack/files/rpms/$plugin_name`` - Packages to install when running - ``./devstack/files/rpms/$plugin_name`` - Packages to install when running
on Red Hat, Fedora, CentOS or XenServer. on Red Hat, Fedora, or CentOS.
- ``./devstack/files/rpms-suse/$plugin_name`` - Packages to install when - ``./devstack/files/rpms-suse/$plugin_name`` - Packages to install when
running on SUSE Linux or openSUSE. running on SUSE Linux or openSUSE.

View File

@ -280,31 +280,6 @@ function upload_image {
return return
fi fi
# XenServer-vhd-ovf-format images are provided as .vhd.tgz
# and should not be decompressed prior to loading
if [[ "$image_url" =~ '.vhd.tgz' ]]; then
image_name="${image_fname%.vhd.tgz}"
local force_vm_mode=""
if [[ "$image_name" =~ 'cirros' ]]; then
# Cirros VHD image currently only boots in PV mode.
# Nova defaults to PV for all VHD images, but
# the glance setting is needed for booting
# directly from volume.
force_vm_mode="vm_mode=xen"
fi
_upload_image "$image_name" ovf vhd "$image" $force_vm_mode
return
fi
# .xen-raw.tgz suggests a Xen capable raw image inside a tgz.
# and should not be decompressed prior to loading.
# Setting metadata, so PV mode is used.
if [[ "$image_url" =~ '.xen-raw.tgz' ]]; then
image_name="${image_fname%.xen-raw.tgz}"
_upload_image "$image_name" tgz raw "$image" vm_mode=xen
return
fi
if [[ "$image_url" =~ '.hds' ]]; then if [[ "$image_url" =~ '.hds' ]]; then
image_name="${image_fname%.hds}" image_name="${image_fname%.hds}"
vm_mode=${image_name##*-} vm_mode=${image_name##*-}

View File

@ -397,8 +397,6 @@ function GetDistro {
# Drop the . release as we assume it's compatible # Drop the . release as we assume it's compatible
# XXX re-evaluate when we get RHEL10 # XXX re-evaluate when we get RHEL10
DISTRO="rhel${os_RELEASE::1}" DISTRO="rhel${os_RELEASE::1}"
elif [[ "$os_VENDOR" =~ (XenServer) ]]; then
DISTRO="xs${os_RELEASE%.*}"
else else
# We can't make a good choice here. Setting a sensible DISTRO # We can't make a good choice here. Setting a sensible DISTRO
# is part of the problem, but not the major issue -- we really # is part of the problem, but not the major issue -- we really

View File

@ -1,46 +0,0 @@
#!/bin/bash
#
# lib/cinder_plugins/XenAPINFS
# Configure the XenAPINFS driver
# Enable with:
#
# CINDER_DRIVER=XenAPINFS
# Dependencies:
#
# - ``functions`` file
# - ``cinder`` configurations
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
_XTRACE_CINDER_XENAPINFS=$(set +o | grep xtrace)
set +o xtrace
# Defaults
# --------
# Set up default directories
# Entry Points
# ------------
# configure_cinder_driver - Set config files, create data dirs, etc
function configure_cinder_driver {
iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.drivers.xenapi.sm.XenAPINFSDriver"
iniset $CINDER_CONF DEFAULT xenapi_connection_url "$CINDER_XENAPI_CONNECTION_URL"
iniset $CINDER_CONF DEFAULT xenapi_connection_username "$CINDER_XENAPI_CONNECTION_USERNAME"
iniset $CINDER_CONF DEFAULT xenapi_connection_password "$CINDER_XENAPI_CONNECTION_PASSWORD"
iniset $CINDER_CONF DEFAULT xenapi_nfs_server "$CINDER_XENAPI_NFS_SERVER"
iniset $CINDER_CONF DEFAULT xenapi_nfs_serverpath "$CINDER_XENAPI_NFS_SERVERPATH"
}
# Restore xtrace
$_XTRACE_CINDER_XENAPINFS
# Local variables:
# mode: shell-script
# End:

View File

@ -279,10 +279,6 @@ function configure_glance {
configure_keystone_authtoken_middleware $GLANCE_API_CONF glance configure_keystone_authtoken_middleware $GLANCE_API_CONF glance
iniset $GLANCE_API_CONF oslo_messaging_notifications driver messagingv2 iniset $GLANCE_API_CONF oslo_messaging_notifications driver messagingv2
iniset_rpc_backend glance $GLANCE_API_CONF iniset_rpc_backend glance $GLANCE_API_CONF
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
iniset $GLANCE_API_CONF DEFAULT container_formats "ami,ari,aki,bare,ovf,tgz"
iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso"
fi
if [ "$VIRT_DRIVER" = 'libvirt' ] && [ "$LIBVIRT_TYPE" = 'parallels' ]; then if [ "$VIRT_DRIVER" = 'libvirt' ] && [ "$LIBVIRT_TYPE" = 'parallels' ]; then
iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,ploop" iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,ploop"
fi fi

View File

@ -1052,14 +1052,6 @@ function is_nova_ready {
# happen between here and the script ending. However, in multinode # happen between here and the script ending. However, in multinode
# tests this can very often not be the case. So ensure that the # tests this can very often not be the case. So ensure that the
# compute is up before we move on. # compute is up before we move on.
# TODO(sdague): honestly, this probably should be a plug point for
# an external system.
if [[ "$VIRT_DRIVER" == 'xenserver' ]]; then
# xenserver encodes information in the hostname of the compute
# because of the dom0/domU split. Just ignore for now.
return
fi
wait_for_compute $NOVA_READY_TIMEOUT wait_for_compute $NOVA_READY_TIMEOUT
} }

View File

@ -1,107 +0,0 @@
#!/bin/bash
#
# lib/nova_plugins/hypervisor-xenserver
# Configure the XenServer hypervisor
# Enable with:
# VIRT_DRIVER=xenserver
# Dependencies:
# ``functions`` file
# ``nova`` configuration
# install_nova_hypervisor - install any external requirements
# configure_nova_hypervisor - make configuration changes, including those to other services
# start_nova_hypervisor - start any external services
# stop_nova_hypervisor - stop any external services
# cleanup_nova_hypervisor - remove transient data and cache
# Save trace setting
_XTRACE_XENSERVER=$(set +o | grep xtrace)
set +o xtrace
# Defaults
# --------
VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1}
# Entry Points
# ------------
# clean_nova_hypervisor - Clean up an installation
function cleanup_nova_hypervisor {
# This function intentionally left blank
:
}
# configure_nova_hypervisor - Set config files, create data dirs, etc
function configure_nova_hypervisor {
if [ -z "$XENAPI_CONNECTION_URL" ]; then
die $LINENO "XENAPI_CONNECTION_URL is not specified"
fi
# Check os-xenapi plugin is enabled
local plugins="${DEVSTACK_PLUGINS}"
local plugin
local found=0
for plugin in ${plugins//,/ }; do
if [[ "$plugin" = "os-xenapi" ]]; then
found=1
break
fi
done
if [[ $found -ne 1 ]]; then
die $LINENO "os-xenapi plugin is not specified. Please enable this plugin in local.conf"
fi
iniset $NOVA_CONF DEFAULT compute_driver "xenapi.XenAPIDriver"
iniset $NOVA_CONF xenserver connection_url "$XENAPI_CONNECTION_URL"
iniset $NOVA_CONF xenserver connection_username "$XENAPI_USER"
iniset $NOVA_CONF xenserver connection_password "$XENAPI_PASSWORD"
iniset $NOVA_CONF DEFAULT flat_injected "False"
local dom0_ip
dom0_ip=$(echo "$XENAPI_CONNECTION_URL" | cut -d "/" -f 3-)
local ssh_dom0
ssh_dom0="sudo -u $DOMZERO_USER ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$dom0_ip"
# install console logrotate script
tar -czf - -C $NOVA_DIR/tools/xenserver/ rotate_xen_guest_logs.sh |
$ssh_dom0 'tar -xzf - -C /root/ && chmod +x /root/rotate_xen_guest_logs.sh && mkdir -p /var/log/xen/guest'
# Create a cron job that will rotate guest logs
$ssh_dom0 crontab - << CRONTAB
* * * * * /root/rotate_xen_guest_logs.sh >/dev/null 2>&1
CRONTAB
}
# install_nova_hypervisor() - Install external components
function install_nova_hypervisor {
# xenapi functionality is now included in os-xenapi library which houses the plugin
# so this function intentionally left blank
:
}
# start_nova_hypervisor - Start any required external services
function start_nova_hypervisor {
# This function intentionally left blank
:
}
# stop_nova_hypervisor - Stop any external services
function stop_nova_hypervisor {
# This function intentionally left blank
:
}
# Restore xtrace
$_XTRACE_XENSERVER
# Local variables:
# mode: shell-script
# End:

View File

@ -347,9 +347,6 @@ function configure_tempest {
if [[ ! -z "$TEMPEST_HTTP_IMAGE" ]]; then if [[ ! -z "$TEMPEST_HTTP_IMAGE" ]]; then
iniset $TEMPEST_CONFIG image http_image $TEMPEST_HTTP_IMAGE iniset $TEMPEST_CONFIG image http_image $TEMPEST_HTTP_IMAGE
fi fi
if [ "$VIRT_DRIVER" = "xenserver" ]; then
iniset $TEMPEST_CONFIG image disk_formats "ami,ari,aki,vhd,raw,iso"
fi
iniset $TEMPEST_CONFIG image-feature-enabled import_image $GLANCE_USE_IMPORT_WORKFLOW iniset $TEMPEST_CONFIG image-feature-enabled import_image $GLANCE_USE_IMPORT_WORKFLOW
iniset $TEMPEST_CONFIG image-feature-enabled os_glance_reserved True iniset $TEMPEST_CONFIG image-feature-enabled os_glance_reserved True
# Compute # Compute
@ -425,15 +422,8 @@ function configure_tempest {
iniset $TEMPEST_CONFIG network-feature-enabled port_security $NEUTRON_PORT_SECURITY iniset $TEMPEST_CONFIG network-feature-enabled port_security $NEUTRON_PORT_SECURITY
# Scenario # Scenario
if [ "$VIRT_DRIVER" = "xenserver" ]; then SCENARIO_IMAGE_DIR=${SCENARIO_IMAGE_DIR:-$FILES}
SCENARIO_IMAGE_DIR=${SCENARIO_IMAGE_DIR:-$FILES} SCENARIO_IMAGE_FILE=$DEFAULT_IMAGE_FILE_NAME
SCENARIO_IMAGE_FILE="cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.vhd.tgz"
iniset $TEMPEST_CONFIG scenario img_disk_format vhd
iniset $TEMPEST_CONFIG scenario img_container_format ovf
else
SCENARIO_IMAGE_DIR=${SCENARIO_IMAGE_DIR:-$FILES}
SCENARIO_IMAGE_FILE=$DEFAULT_IMAGE_FILE_NAME
fi
iniset $TEMPEST_CONFIG scenario img_file $SCENARIO_IMAGE_DIR/$SCENARIO_IMAGE_FILE iniset $TEMPEST_CONFIG scenario img_file $SCENARIO_IMAGE_DIR/$SCENARIO_IMAGE_FILE
# If using provider networking, use the physical network for validation rather than private # If using provider networking, use the physical network for validation rather than private

View File

@ -718,16 +718,6 @@ if is_service_enabled keystone; then
fi fi
# Nova
# -----
if is_service_enabled nova && [[ "$VIRT_DRIVER" == 'xenserver' ]]; then
# Look for the backend password here because read_password
# is not a library function.
read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN."
fi
# Swift # Swift
# ----- # -----

17
stackrc
View File

@ -605,10 +605,8 @@ ENABLE_VOLUME_MULTIATTACH=$(trueorfalse False ENABLE_VOLUME_MULTIATTACH)
# Nova hypervisor configuration. We default to libvirt with **kvm** but will # Nova hypervisor configuration. We default to libvirt with **kvm** but will
# drop back to **qemu** if we are unable to load the kvm module. ``stack.sh`` can # drop back to **qemu** if we are unable to load the kvm module. ``stack.sh`` can
# also install an **LXC**, **OpenVZ** or **XenAPI** based system. If xenserver-core # also install an **LXC** or **OpenVZ** based system.
# is installed, the default will be XenAPI
DEFAULT_VIRT_DRIVER=libvirt DEFAULT_VIRT_DRIVER=libvirt
is_package_installed xenserver-core && DEFAULT_VIRT_DRIVER=xenserver
VIRT_DRIVER=${VIRT_DRIVER:-$DEFAULT_VIRT_DRIVER} VIRT_DRIVER=${VIRT_DRIVER:-$DEFAULT_VIRT_DRIVER}
case "$VIRT_DRIVER" in case "$VIRT_DRIVER" in
ironic|libvirt) ironic|libvirt)
@ -633,14 +631,6 @@ case "$VIRT_DRIVER" in
fake) fake)
NUMBER_FAKE_NOVA_COMPUTE=${NUMBER_FAKE_NOVA_COMPUTE:-1} NUMBER_FAKE_NOVA_COMPUTE=${NUMBER_FAKE_NOVA_COMPUTE:-1}
;; ;;
xenserver)
# Xen config common to nova and neutron
XENAPI_USER=${XENAPI_USER:-"root"}
# This user will be used for dom0 - domU communication
# should be able to log in to dom0 without a password
# will be used to install the plugins
DOMZERO_USER=${DOMZERO_USER:-"domzero"}
;;
*) *)
;; ;;
esac esac
@ -695,11 +685,6 @@ if [[ "$DOWNLOAD_DEFAULT_IMAGES" == "True" ]]; then
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-i386-disk.vmdk} DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-i386-disk.vmdk}
DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_FILE_NAME:-$DEFAULT_IMAGE_NAME} DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_FILE_NAME:-$DEFAULT_IMAGE_NAME}
IMAGE_URLS+="http://partnerweb.vmware.com/programs/vmdkimage/${DEFAULT_IMAGE_FILE_NAME}";; IMAGE_URLS+="http://partnerweb.vmware.com/programs/vmdkimage/${DEFAULT_IMAGE_FILE_NAME}";;
xenserver)
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.5-x86_64-disk}
DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.5-x86_64-disk.vhd.tgz}
IMAGE_URLS+="http://ca.downloads.xensource.com/OpenStack/cirros-0.3.5-x86_64-disk.vhd.tgz"
IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz";;
fake) fake)
# Use the same as the default for libvirt # Use the same as the default for libvirt
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk} DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk}

View File

@ -22,7 +22,7 @@ source $TOP_DIR/functions
# Possible virt drivers, if we have more, add them here. Always keep # Possible virt drivers, if we have more, add them here. Always keep
# dummy in the end position to trigger the fall through case. # dummy in the end position to trigger the fall through case.
DRIVERS="openvz ironic libvirt vsphere xenserver dummy" DRIVERS="openvz ironic libvirt vsphere dummy"
# Extra variables to trigger getting additional images. # Extra variables to trigger getting additional images.
export ENABLED_SERVICES="h-api,tr-api" export ENABLED_SERVICES="h-api,tr-api"

View File

@ -1,42 +0,0 @@
# 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.
import BaseHTTPServer
import SimpleHTTPServer
import sys
def main(host, port, HandlerClass=SimpleHTTPServer.SimpleHTTPRequestHandler,
ServerClass=BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
"""simple http server that listens on a give address:port."""
server_address = (host, port)
HandlerClass.protocol_version = protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print("Serving HTTP on", sa[0], "port", sa[1], "...")
httpd.serve_forever()
if __name__ == '__main__':
if sys.argv[1:]:
address = sys.argv[1]
else:
address = '0.0.0.0'
if ':' in address:
host, port = address.split(':')
else:
host = address
port = 8080
main(host, int(port))

View File

@ -1,3 +0,0 @@
Note: XenServer relative tools have been moved to `os-xenapi`_ and be maintained there.
.. _os-xenapi: https://opendev.org/x/os-xenapi/