Merge "Support installing OpenStack on XenServer 7.0"
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 384ceee..1161b34 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -36,10 +36,6 @@
- **local** - extracts ``localrc`` from ``local.conf`` before
``stackrc`` is sourced
-- **pre-install** - runs after the system packages are installed but
- before any of the source repositories are installed
-- **install** - runs immediately after the repo installations are
- complete
- **post-config** - runs after the layer 2 services are configured and
before they are started
- **extra** - runs after services are started and before any files in
diff --git a/doc/source/plugin-registry.rst b/doc/source/plugin-registry.rst
index 2760f85..585c91c 100644
--- a/doc/source/plugin-registry.rst
+++ b/doc/source/plugin-registry.rst
@@ -103,6 +103,7 @@
neutron-lbaas-dashboard `git://git.openstack.org/openstack/neutron-lbaas-dashboard <https://git.openstack.org/cgit/openstack/neutron-lbaas-dashboard>`__
neutron-vpnaas `git://git.openstack.org/openstack/neutron-vpnaas <https://git.openstack.org/cgit/openstack/neutron-vpnaas>`__
nova-docker `git://git.openstack.org/openstack/nova-docker <https://git.openstack.org/cgit/openstack/nova-docker>`__
+nova-lxd `git://git.openstack.org/openstack/nova-lxd <https://git.openstack.org/cgit/openstack/nova-lxd>`__
nova-powervm `git://git.openstack.org/openstack/nova-powervm <https://git.openstack.org/cgit/openstack/nova-powervm>`__
octavia `git://git.openstack.org/openstack/octavia <https://git.openstack.org/cgit/openstack/octavia>`__
osprofiler `git://git.openstack.org/openstack/osprofiler <https://git.openstack.org/cgit/openstack/osprofiler>`__
diff --git a/extras.d/80-tempest.sh b/extras.d/80-tempest.sh
index fcf79bd..6a3d121 100644
--- a/extras.d/80-tempest.sh
+++ b/extras.d/80-tempest.sh
@@ -13,6 +13,8 @@
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Initializing Tempest"
configure_tempest
+ echo_summary "Installing Tempest Plugins"
+ install_tempest_plugins
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
# local.conf Tempest option overrides
:
diff --git a/files/rpms/general b/files/rpms/general
index 2d4a97a..ee2e8a0 100644
--- a/files/rpms/general
+++ b/files/rpms/general
@@ -7,9 +7,9 @@
gettext # used for compiling message catalogs
git-core
graphviz # needed only for docs
-iptables-services # NOPRIME f22,f23
+iptables-services # NOPRIME f22,f23,f24
java-1.7.0-openjdk-headless # NOPRIME rhel7
-java-1.8.0-openjdk-headless # NOPRIME f22,f23
+java-1.8.0-openjdk-headless # NOPRIME f22,f23,f24
libffi-devel
libjpeg-turbo-devel # Pillow 3.0.0
libxml2-devel # lxml
diff --git a/files/rpms/nova b/files/rpms/nova
index 0312e85..594393e 100644
--- a/files/rpms/nova
+++ b/files/rpms/nova
@@ -7,7 +7,7 @@
genisoimage # required for config_drive
iptables
iputils
-kernel-modules # dist:f22,f23
+kernel-modules # dist:f22,f23,f24
kpartx
kvm # NOPRIME
libvirt-bin # NOPRIME
diff --git a/files/rpms/swift b/files/rpms/swift
index 46dc59d..1e05167 100644
--- a/files/rpms/swift
+++ b/files/rpms/swift
@@ -2,7 +2,7 @@
liberasurecode-devel
memcached
pyxattr
-rsync-daemon # dist:f22,f23
+rsync-daemon # dist:f22,f23,f24
sqlite
xfsprogs
xinetd
diff --git a/functions b/functions
index 8cdd6d8..aa12e1e 100644
--- a/functions
+++ b/functions
@@ -511,61 +511,6 @@
}
-# This function recursively compares versions, and is not meant to be
-# called by anything other than vercmp_numbers below. This function does
-# not work with alphabetic versions.
-#
-# _vercmp_r sep ver1 ver2
-function _vercmp_r {
- typeset sep
- typeset -a ver1=() ver2=()
- sep=$1; shift
- ver1=("${@:1:sep}")
- ver2=("${@:sep+1}")
-
- if ((ver1 > ver2)); then
- echo 1; return 0
- elif ((ver2 > ver1)); then
- echo -1; return 0
- fi
-
- if ((sep <= 1)); then
- echo 0; return 0
- fi
-
- _vercmp_r $((sep-1)) "${ver1[@]:1}" "${ver2[@]:1}"
-}
-
-
-# This function compares two versions and is meant to be called by
-# external callers. Please note the function assumes non-alphabetic
-# versions. For example, this will work:
-#
-# vercmp_numbers 1.10 1.4
-#
-# The above will return "1", as 1.10 is greater than 1.4.
-#
-# vercmp_numbers 5.2 6.4
-#
-# The above will return "-1", as 5.2 is less than 6.4.
-#
-# vercmp_numbers 4.0 4.0
-#
-# The above will return "0", as the versions are equal.
-#
-# vercmp_numbers ver1 ver2
-function vercmp_numbers {
- typeset v1=$1 v2=$2 sep
- typeset -a ver1 ver2
-
- deprecated "vercmp_numbers is deprecated for more generic vercmp"
-
- IFS=. read -ra ver1 <<< "$v1"
- IFS=. read -ra ver2 <<< "$v2"
-
- _vercmp_r "${#ver1[@]}" "${ver1[@]}" "${ver2[@]}"
-}
-
# vercmp ver1 op ver2
# Compare VER1 to VER2
# - op is one of < <= == >= >
diff --git a/lib/ceph b/lib/ceph
index 3e0839a..e999647 100644
--- a/lib/ceph
+++ b/lib/ceph
@@ -116,7 +116,7 @@
# check_os_support_ceph() - Check if the operating system provides a decent version of Ceph
function check_os_support_ceph {
- if [[ ! ${DISTRO} =~ (trusty|f22|f23) ]]; then
+ if [[ ! ${DISTRO} =~ (trusty|f22|f23|f24) ]]; then
echo "WARNING: your distro $DISTRO does not provide (at least) the Firefly release. Please use Ubuntu Trusty or Fedora 20 (and higher)"
if [[ "$FORCE_CEPH_INSTALL" != "yes" ]]; then
die $LINENO "If you wish to install Ceph on this distribution anyway run with FORCE_CEPH_INSTALL=yes"
diff --git a/lib/cinder b/lib/cinder
index de67593..bcf2409 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -270,6 +270,7 @@
iniset $CINDER_CONF DEFAULT state_path $CINDER_STATE_PATH
iniset $CINDER_CONF oslo_concurrency lock_path $CINDER_STATE_PATH
iniset $CINDER_CONF DEFAULT periodic_interval $CINDER_PERIODIC_INTERVAL
+ iniset $CINDER_CONF DEFAULT my_ip "$HOST_IP"
iniset $CINDER_CONF DEFAULT os_region_name "$REGION_NAME"
diff --git a/lib/keystone b/lib/keystone
index c94bcd3..5695004 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -246,7 +246,7 @@
# Enable caching
iniset $KEYSTONE_CONF cache enabled "True"
iniset $KEYSTONE_CONF cache backend "oslo_cache.memcache_pool"
- iniset $KEYSTONE_CONF cache memcache_servers $SERVICE_HOST:11211
+ iniset $KEYSTONE_CONF cache memcache_servers localhost:11211
# Do not cache the catalog backend due to https://bugs.launchpad.net/keystone/+bug/1537617
iniset $KEYSTONE_CONF catalog caching "False"
diff --git a/lib/neutron-legacy b/lib/neutron-legacy
index 5e5207b..73123ef 100644
--- a/lib/neutron-legacy
+++ b/lib/neutron-legacy
@@ -297,7 +297,7 @@
}
function _determine_config_l3 {
- local opts="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE"
+ local opts="--config-file $NEUTRON_CONF --config-file $Q_L3_CONF_FILE"
if is_service_enabled q-fwaas; then
opts+=" --config-file $Q_FWAAS_CONF_FILE"
fi
@@ -524,7 +524,7 @@
}
function start_mutnauq_other_agents {
- run_process q-dhcp "$AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file=$Q_DHCP_CONF_FILE"
+ run_process q-dhcp "$AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file $Q_DHCP_CONF_FILE"
if is_service_enabled neutron-vpnaas; then
: # Started by plugin
@@ -532,8 +532,8 @@
run_process q-l3 "$AGENT_L3_BINARY $(determine_config_files neutron-l3-agent)"
fi
- run_process q-meta "$AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file=$Q_META_CONF_FILE"
- run_process q-lbaas "$AGENT_LBAAS_BINARY --config-file $NEUTRON_CONF --config-file=$LBAAS_AGENT_CONF_FILENAME"
+ run_process q-meta "$AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file $Q_META_CONF_FILE"
+ run_process q-lbaas "$AGENT_LBAAS_BINARY --config-file $NEUTRON_CONF --config-file $LBAAS_AGENT_CONF_FILENAME"
run_process q-metering "$AGENT_METERING_BINARY --config-file $NEUTRON_CONF --config-file $METERING_AGENT_CONF_FILENAME"
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base
index 59c7737..95f4663 100644
--- a/lib/neutron_plugins/ovs_base
+++ b/lib/neutron_plugins/ovs_base
@@ -54,7 +54,7 @@
local kernel_major_minor
kernel_major_minor=`echo $kernel_version | cut -d. -f1-2`
# From kernel 3.13 on, openvswitch-datapath-dkms is not needed
- if [ `vercmp_numbers "$kernel_major_minor" "3.13"` -lt "0" ]; then
+ if vercmp '$kernel_major_minor' '<' '3.13'; then
install_package "dkms openvswitch-datapath-dkms linux-headers-$kernel_version"
fi
}
diff --git a/lib/neutron_plugins/services/l3 b/lib/neutron_plugins/services/l3
index a5a6c81..350aed8 100644
--- a/lib/neutron_plugins/services/l3
+++ b/lib/neutron_plugins/services/l3
@@ -83,7 +83,7 @@
SUBNETPOOL_SIZE_V6=${SUBNETPOOL_SIZE_V6:-64}
function _determine_config_l3 {
- local opts="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE"
+ local opts="--config-file $NEUTRON_CONF --config-file $Q_L3_CONF_FILE"
echo "$opts"
}
@@ -91,7 +91,6 @@
cp $NEUTRON_DIR/etc/l3_agent.ini.sample $Q_L3_CONF_FILE
- iniset $Q_L3_CONF_FILE DEFAULT verbose True
iniset $Q_L3_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $Q_L3_CONF_FILE AGENT root_helper "$Q_RR_COMMAND"
if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then
@@ -150,7 +149,9 @@
die_if_not_set $LINENO SUBNET_ID "Failure creating SUBNET_ID for $PROVIDER_SUBNET_NAME $project_id"
fi
- if [[ "$IP_VERSION" =~ .*6 ]] && [[ -n "$IPV6_PROVIDER_FIXED_RANGE" ]] && [[ -n "$IPV6_PROVIDER_NETWORK_GATEWAY" ]]; then
+ if [[ "$IP_VERSION" =~ .*6 ]]; then
+ die_if_not_set $LINENO IPV6_PROVIDER_FIXED_RANGE "IPV6_PROVIDER_FIXED_RANGE has not been set, but Q_USE_PROVIDERNET_FOR_PUBLIC is true and IP_VERSION includes 6"
+ die_if_not_set $LINENO IPV6_PROVIDER_NETWORK_GATEWAY "IPV6_PROVIDER_NETWORK_GATEWAY has not been set, but Q_USE_PROVIDERNET_FOR_PUBLIC is true and IP_VERSION includes 6"
SUBNET_V6_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnet-create --tenant_id $project_id --ip_version 6 --ipv6-address-mode $IPV6_ADDRESS_MODE --gateway $IPV6_PROVIDER_NETWORK_GATEWAY --name $IPV6_PROVIDER_SUBNET_NAME $NET_ID $IPV6_PROVIDER_FIXED_RANGE | grep 'id' | get_field 2)
die_if_not_set $LINENO SUBNET_V6_ID "Failure creating SUBNET_V6_ID for $IPV6_PROVIDER_SUBNET_NAME $project_id"
fi
@@ -175,9 +176,7 @@
fi
fi
- AUTO_ALLOCATE_EXT=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" ext-list | grep 'auto-allocated-topology' | get_field 1)
- SUBNETPOOL_EXT=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" ext-list | grep 'subnet_allocation' | get_field 1)
- if is_service_enabled q-l3; then
+ if is_networking_extension_supported "router" && is_networking_extension_supported "external-net"; then
# Create a router, and add the private subnet as one of its interfaces
if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then
# create a tenant-owned router.
@@ -189,10 +188,8 @@
die_if_not_set $LINENO ROUTER_ID "Failure creating ROUTER_ID for $Q_ROUTER_NAME"
fi
- # if the extension is available, then mark the external
- # network as default, and provision default subnetpools
EXTERNAL_NETWORK_FLAGS="--router:external"
- if [[ -n $AUTO_ALLOCATE_EXT && -n $SUBNETPOOL_EXT ]]; then
+ if is_networking_extension_supported "auto-allocated-topology" && is_networking_extension_supported "subnet_allocation"; then
EXTERNAL_NETWORK_FLAGS="$EXTERNAL_NETWORK_FLAGS --is-default"
if [[ "$IP_VERSION" =~ 4.* ]]; then
SUBNETPOOL_V4_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnetpool-create $SUBNETPOOL_NAME --default-prefixlen $SUBNETPOOL_SIZE_V4 --pool-prefix $SUBNETPOOL_PREFIX_V4 --shared --is-default=True | grep ' id ' | get_field 2)
@@ -364,3 +361,10 @@
fi
return 1
}
+
+function is_networking_extension_supported {
+ local extension=$1
+ # TODO(sc68cal) cache this instead of calling every time
+ EXT_LIST=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" ext-list -c alias -f value)
+ [[ $EXT_LIST =~ $extension ]] && return 0
+}
diff --git a/lib/nova b/lib/nova
index af5d122..d6ba253 100644
--- a/lib/nova
+++ b/lib/nova
@@ -631,7 +631,7 @@
if is_service_enabled n-cell; then
cp $NOVA_CONF $NOVA_CELLS_CONF
iniset $NOVA_CELLS_CONF database connection `database_connection_url $NOVA_CELLS_DB`
- iniset $NOVA_CELLS_CONF oslo_messaging_rabbit rabbit_virtual_host child_cell
+ iniset_rpc_backend nova $NOVA_CELLS_CONF DEFAULT child_cell
iniset $NOVA_CELLS_CONF DEFAULT dhcpbridge_flagfile $NOVA_CELLS_CONF
iniset $NOVA_CELLS_CONF cells enable True
iniset $NOVA_CELLS_CONF cells cell_type compute
diff --git a/lib/nova_plugins/functions-libvirt b/lib/nova_plugins/functions-libvirt
index dbb4d4f..4e5a748 100644
--- a/lib/nova_plugins/functions-libvirt
+++ b/lib/nova_plugins/functions-libvirt
@@ -108,9 +108,9 @@
# source file paths, not relative paths. This screws with the matching
# of '1:libvirt' making everything turn on. So use libvirt.c for now.
# This will have to be re-visited when Ubuntu ships libvirt >= 1.2.3
- local log_filters="1:libvirt.c 1:qemu 1:conf 1:security 3:object 3:event 3:json 3:file 1:util 1:qemu_monitor"
+ local log_filters="1:libvirt.c 1:qemu 1:conf 1:security 3:object 3:event 3:json 3:file 1:util 1:cpu"
else
- local log_filters="1:libvirt 1:qemu 1:conf 1:security 3:object 3:event 3:json 3:file 1:util 1:qemu_monitor"
+ local log_filters="1:libvirt 1:qemu 1:conf 1:security 3:object 3:event 3:json 3:file 1:util 1:cpu"
fi
local log_outputs="1:file:/var/log/libvirt/libvirtd.log"
if ! sudo grep -q "^log_filters=\"$log_filters\"" /etc/libvirt/libvirtd.conf; then
@@ -121,18 +121,9 @@
fi
fi
- # Update the libvirt cpu map with a gate64 cpu model. This enables nova
- # live migration for 64bit guest OSes on heterogenous cloud "hardware".
- if [[ -f /usr/share/libvirt/cpu_map.xml ]] ; then
- sudo $TOP_DIR/tools/cpu_map_update.py /usr/share/libvirt/cpu_map.xml
- fi
-
- # libvirt detects various settings on startup, as we potentially changed
- # the system configuration (modules, filesystems), we need to restart
- # libvirt to detect those changes. Use a stop start as otherwise the new
- # cpu_map is not loaded properly on some systems (Ubuntu).
- stop_service $LIBVIRT_DAEMON
- start_service $LIBVIRT_DAEMON
+ # 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/rpc_backend b/lib/rpc_backend
index 05e303e..0ee46dc 100644
--- a/lib/rpc_backend
+++ b/lib/rpc_backend
@@ -104,8 +104,9 @@
# builds transport url string
function get_transport_url {
+ local virtual_host=$1
if is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then
- echo "rabbit://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672/"
+ echo "rabbit://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672/$virtual_host"
fi
}
@@ -114,11 +115,9 @@
local package=$1
local file=$2
local section=${3:-DEFAULT}
+ local virtual_host=$4
if is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then
- iniset $file $section rpc_backend "rabbit"
- iniset $file oslo_messaging_rabbit rabbit_hosts $RABBIT_HOST
- iniset $file oslo_messaging_rabbit rabbit_password $RABBIT_PASSWORD
- iniset $file oslo_messaging_rabbit rabbit_userid $RABBIT_USERID
+ iniset $file $section transport_url $(get_transport_url "$virtual_host")
if [ -n "$RABBIT_HEARTBEAT_TIMEOUT_THRESHOLD" ]; then
iniset $file oslo_messaging_rabbit heartbeat_timeout_threshold $RABBIT_HEARTBEAT_TIMEOUT_THRESHOLD
fi
diff --git a/lib/tempest b/lib/tempest
index 6f8e293..3cd300c 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -240,8 +240,7 @@
# the public network (for floating ip access) is only available
# if the extension is enabled.
- EXTERNAL_NETWORK_EXT=$(neutron ext-list | grep 'external-net' | get_field 1)
- if [[ -n $EXTERNAL_NETWORK_EXT ]]; then
+ if is_networking_extension_supported 'external-net'; then
public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \
awk '{print $2}')
fi
@@ -600,6 +599,12 @@
# running pip install -U on tempest requirements
$TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
+ popd
+}
+
+# install_tempest_plugins() - Install any specified plugins into the tempest venv
+function install_tempest_plugins {
+ pushd $TEMPEST_DIR
if [[ $TEMPEST_PLUGINS != 0 ]] ; then
tox -evenv-tempest -- pip install $TEMPEST_PLUGINS
echo "Checking installed Tempest plugins:"
diff --git a/stack.sh b/stack.sh
index 68e3d93..173628e 100755
--- a/stack.sh
+++ b/stack.sh
@@ -185,7 +185,7 @@
# Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``FORCE=yes ./stack``
-if [[ ! ${DISTRO} =~ (trusty|wily|xenial|7.0|wheezy|sid|testing|jessie|f22|f23|rhel7|kvmibm1) ]]; then
+if [[ ! ${DISTRO} =~ (trusty|wily|xenial|7.0|wheezy|sid|testing|jessie|f22|f23|f24|rhel7|kvmibm1) ]]; then
echo "WARNING: this script has not been tested on $DISTRO"
if [[ "$FORCE" != "yes" ]]; then
die $LINENO "If you wish to run this script anyway run with FORCE=yes"
diff --git a/tools/cpu_map_update.py b/tools/cpu_map_update.py
deleted file mode 100755
index 92b7b8f..0000000
--- a/tools/cpu_map_update.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-#
-# 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.
-
-# This small script updates the libvirt CPU map to add a gate64 cpu model
-# that can be used to enable a common 64bit capable feature set across
-# devstack nodes so that features like nova live migration work.
-
-import sys
-import xml.etree.ElementTree as ET
-from xml.dom import minidom
-
-
-def update_cpu_map(tree):
- root = tree.getroot()
- cpus = root#.find("cpus")
- x86 = None
- for arch in cpus.findall("arch"):
- if arch.get("name") == "x86":
- x86 = arch
- break
- if x86 is not None:
- # Create a gate64 cpu model that is core2duo less monitor, pse36,
- # vme, and ssse3.
- gate64 = ET.SubElement(x86, "model")
- gate64.set("name", "gate64")
- ET.SubElement(gate64, "vendor").set("name", "Intel")
- ET.SubElement(gate64, "feature").set("name", "fpu")
- ET.SubElement(gate64, "feature").set("name", "de")
- ET.SubElement(gate64, "feature").set("name", "pse")
- ET.SubElement(gate64, "feature").set("name", "tsc")
- ET.SubElement(gate64, "feature").set("name", "msr")
- ET.SubElement(gate64, "feature").set("name", "pae")
- ET.SubElement(gate64, "feature").set("name", "mce")
- ET.SubElement(gate64, "feature").set("name", "cx8")
- ET.SubElement(gate64, "feature").set("name", "apic")
- ET.SubElement(gate64, "feature").set("name", "sep")
- ET.SubElement(gate64, "feature").set("name", "pge")
- ET.SubElement(gate64, "feature").set("name", "cmov")
- ET.SubElement(gate64, "feature").set("name", "pat")
- ET.SubElement(gate64, "feature").set("name", "mmx")
- ET.SubElement(gate64, "feature").set("name", "fxsr")
- ET.SubElement(gate64, "feature").set("name", "sse")
- ET.SubElement(gate64, "feature").set("name", "sse2")
- ET.SubElement(gate64, "feature").set("name", "mtrr")
- ET.SubElement(gate64, "feature").set("name", "mca")
- ET.SubElement(gate64, "feature").set("name", "clflush")
- ET.SubElement(gate64, "feature").set("name", "pni")
- ET.SubElement(gate64, "feature").set("name", "nx")
- ET.SubElement(gate64, "feature").set("name", "syscall")
- ET.SubElement(gate64, "feature").set("name", "lm")
-
-
-def format_xml(root):
- # Adapted from http://pymotw.com/2/xml/etree/ElementTree/create.html
- # thank you dhellmann
- rough_string = ET.tostring(root, encoding="UTF-8")
- dom_parsed = minidom.parseString(rough_string)
- return dom_parsed.toprettyxml(" ", encoding="UTF-8")
-
-
-def main():
- if len(sys.argv) != 2:
- raise Exception("Must pass path to cpu_map.xml to update")
- cpu_map = sys.argv[1]
- tree = ET.parse(cpu_map)
- for model in tree.getroot().iter("model"):
- if model.get("name") == "gate64":
- # gate64 model is already present
- return
- update_cpu_map(tree)
- pretty_xml = format_xml(tree.getroot())
- with open(cpu_map, 'w') as f:
- f.write(pretty_xml)
-
-
-if __name__ == "__main__":
- main()
diff --git a/tools/install_pip.sh b/tools/install_pip.sh
index dfa4f42..1267699 100755
--- a/tools/install_pip.sh
+++ b/tools/install_pip.sh
@@ -116,7 +116,7 @@
# Eradicate any and all system packages
-# Python in f23 and f22 depends on the python-pip package so removing it
+# Python in fedora depends on the python-pip package so removing it
# results in a nonfunctional system. pip on fedora installs to /usr so pip
# can safely override the system pip for all versions of fedora
if ! is_fedora ; then