Remove rhel6 and py26 support
el6 is shipped with Python 2.6.x which is not expected
to be supported with the openstack kilo release.
For el6 support we need to do lot of thing differently,
which makes the code more complicated.
This change removes el6 and py26 support from devstack.
This change also removed a discontinued (1 year ago)
openSUSE 12.2 code path, which used a similar codepath as el6.
Several comment related to el6 also removed or modified.
Change-Id: Iea0b0c98a5e11fd85bb5e93c099f740fe05d2f3a
diff --git a/doc/source/faq.rst b/doc/source/faq.rst
index 92d7945..f10c2ee 100644
--- a/doc/source/faq.rst
+++ b/doc/source/faq.rst
@@ -24,7 +24,7 @@
by packaging in "real" deployments. To remove additional protections
that will be desired/required in production would be a step
backward.
-Q: But selinux is disabled in RHEL 6!
+Q: But selinux is disabled in RHEL!
A: Today it is, yes. That is a specific exception that certain
DevStack contributors fought strongly against. The primary reason it
was allowed was to support using RHEL6 as the Python 2.6 test
@@ -70,11 +70,6 @@
Q: Are there any differences between Ubuntu and Fedora support?
A: Neutron is not fully supported prior to Fedora 18 due lack of
OpenVSwitch packages.
-Q: How about RHEL 6?
- A: RHEL 6 has Python 2.6 and many old modules packaged and is a
- challenge to support. There are a number of specific RHEL6
- work-arounds in ``stack.sh`` to handle this. But the testing on py26
- is valuable so we do it...
Operation and Configuration
===========================
diff --git a/files/apache-keystone.template b/files/apache-keystone.template
index 2190d83..504dc01 100644
--- a/files/apache-keystone.template
+++ b/files/apache-keystone.template
@@ -32,7 +32,3 @@
%SSLCERTFILE%
%SSLKEYFILE%
</VirtualHost>
-
-# Workaround for missing path on RHEL6, see
-# https://bugzilla.redhat.com/show_bug.cgi?id=1121019
-WSGISocketPrefix /var/run/%APACHE_NAME%
diff --git a/files/patches/unittest2-discover.patch b/files/patches/unittest2-discover.patch
deleted file mode 100644
index 347300d..0000000
--- a/files/patches/unittest2-discover.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -r b2efb7df637b discover.py
---- a/discover.py Thu Mar 24 00:31:02 2011 -0400
-+++ b/discover.py Thu Nov 28 12:02:19 2013 +0000
-@@ -82,7 +82,11 @@
- """
- testMethodPrefix = 'test'
- sortTestMethodsUsing = cmp
-- suiteClass = unittest.TestSuite
-+ try:
-+ import unittest2
-+ suiteClass = unittest2.TestSuite
-+ except ImportError:
-+ suiteClass = unittest.TestSuite
- _top_level_dir = None
-
- def loadTestsFromTestCase(self, testCaseClass):
diff --git a/files/rpms/cinder b/files/rpms/cinder
index eedff18..082a35a 100644
--- a/files/rpms/cinder
+++ b/files/rpms/cinder
@@ -3,4 +3,4 @@
qemu-img
postgresql-devel
iscsi-initiator-utils
-python-lxml #dist:f19,f20,f21,rhel7
+python-lxml
diff --git a/files/rpms/general b/files/rpms/general
index ee7cc12..13c8a87 100644
--- a/files/rpms/general
+++ b/files/rpms/general
@@ -13,7 +13,6 @@
libxslt-devel
psmisc
pylint
-python-prettytable # dist:rhel6 [1]
python-unittest2
python-virtualenv
python-devel
@@ -27,8 +26,3 @@
libyaml-devel
gettext # used for compiling message catalogs
net-tools
-
-# [1] : some of installed tools have unversioned dependencies on this,
-# but others have versioned (<=0.7). So if a later version (0.7.1)
-# gets installed in response to an unversioned dependency, it breaks.
-# This pre-installs a compatible 0.6(ish) version from RHEL
diff --git a/files/rpms/glance b/files/rpms/glance
index acf0cc3..a09b669 100644
--- a/files/rpms/glance
+++ b/files/rpms/glance
@@ -6,8 +6,8 @@
python-argparse
python-eventlet
python-greenlet
-python-lxml #dist:f19,f20,f21,rhel7
-python-paste-deploy #dist:f19,f20,f21,rhel7
+python-lxml
+python-paste-deploy
python-routes
python-sqlalchemy
pyxattr
diff --git a/files/rpms/horizon b/files/rpms/horizon
index 82385ed..585c36c 100644
--- a/files/rpms/horizon
+++ b/files/rpms/horizon
@@ -12,8 +12,8 @@
python-migrate
python-mox
python-nose
-python-paste #dist:f19,f20,f21
-python-paste-deploy #dist:f19,f20,f21
+python-paste
+python-paste-deploy
python-routes
python-sqlalchemy
python-webob
diff --git a/files/rpms/keystone b/files/rpms/keystone
index 8b0953d..45492e0 100644
--- a/files/rpms/keystone
+++ b/files/rpms/keystone
@@ -1,10 +1,10 @@
MySQL-python
python-greenlet
-libxslt-devel # dist:f20,f21
-python-lxml #dist:f19,f20,f21
-python-paste #dist:f19,f20,f21
-python-paste-deploy #dist:f19,f20,f21
-python-paste-script #dist:f19,f20,f21
+libxslt-devel
+python-lxml
+python-paste
+python-paste-deploy
+python-paste-script
python-routes
python-sqlalchemy
python-webob
diff --git a/files/rpms/neutron b/files/rpms/neutron
index 5450408..59152d6 100644
--- a/files/rpms/neutron
+++ b/files/rpms/neutron
@@ -12,9 +12,8 @@
python-eventlet
python-greenlet
python-iso8601
-#rhel6 gets via pip
-python-paste # dist:f19,f20,f21,rhel7
-python-paste-deploy # dist:f19,f20,f21,rhel7
+python-paste
+python-paste-deploy
python-qpid # NOPRIME
python-routes
python-sqlalchemy
diff --git a/files/rpms/nova b/files/rpms/nova
index 07f13c7..557de90 100644
--- a/files/rpms/nova
+++ b/files/rpms/nova
@@ -29,11 +29,9 @@
python-lockfile
python-migrate
python-mox
-python-paramiko # dist:f19,f20,f21,rhel7
-# ^ on RHEL6, brings in python-crypto which conflicts with version from
-# pip we need
-python-paste # dist:f19,f20,f21,rhel7
-python-paste-deploy # dist:f19,f20,f21,rhel7
+python-paramiko
+python-paste
+python-paste-deploy
python-qpid # NOPRIME
python-routes
python-sqlalchemy
diff --git a/files/rpms/swift b/files/rpms/swift
index ccda22b..0fcdb0f 100644
--- a/files/rpms/swift
+++ b/files/rpms/swift
@@ -6,7 +6,7 @@
python-greenlet
python-netifaces
python-nose
-python-paste-deploy # dist:f19,f20,f21,rhel7
+python-paste-deploy
python-simplejson
python-webob
pyxattr
diff --git a/lib/cinder b/lib/cinder
index 6eee880..12bac8c 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -303,18 +303,6 @@
configure_cinder_driver
fi
- if is_fedora && [[ $DISTRO =~ (rhel6) ]]; then
- # Cinder clones are slightly larger due to some extra
- # metadata. RHEL6 will not allow auto-extending of LV's
- # without this, leading to clones giving hard-to-track disk
- # I/O errors.
- # see https://bugzilla.redhat.com/show_bug.cgi?id=975052
- sudo sed -i~ \
- -e 's/snapshot_autoextend_threshold =.*/snapshot_autoextend_threshold = 80/' \
- -e 's/snapshot_autoextend_percent =.*/snapshot_autoextend_percent = 20/' \
- /etc/lvm/lvm.conf
- fi
-
iniset $CINDER_CONF DEFAULT osapi_volume_workers "$API_WORKERS"
iniset $CINDER_CONF DEFAULT glance_api_servers "${GLANCE_SERVICE_PROTOCOL}://${GLANCE_HOSTPORT}"
@@ -446,12 +434,8 @@
if is_ubuntu; then
sudo service tgt restart
elif is_fedora; then
- if [[ $DISTRO =~ (rhel6) ]]; then
- sudo /sbin/service tgtd restart
- else
- # bypass redirection to systemctl during restart
- sudo /sbin/service --skip-redirect tgtd restart
- fi
+ # bypass redirection to systemctl during restart
+ sudo /sbin/service --skip-redirect tgtd restart
elif is_suse; then
restart_service tgtd
else
diff --git a/lib/databases/mysql b/lib/databases/mysql
index 2f3b6d4..72c0f82 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -17,11 +17,7 @@
# Linux distros, thank you for being incredibly consistent
MYSQL=mysql
if is_fedora; then
- if [[ $DISTRO =~ (rhel6) ]]; then
- MYSQL=mysqld
- else
- MYSQL=mariadb
- fi
+ MYSQL=mariadb
fi
# Functions
@@ -38,15 +34,9 @@
sudo rm -rf /etc/mysql
return
elif is_fedora; then
- if [[ $DISTRO =~ (rhel6) ]]; then
- stop_service mysqld
- uninstall_package mysql-server
- sudo rm -rf /var/lib/mysql
- else
- stop_service mariadb
- uninstall_package mariadb-server
- sudo rm -rf /var/lib/mysql
- fi
+ stop_service mariadb
+ uninstall_package mariadb-server
+ sudo rm -rf /var/lib/mysql
elif is_suse; then
stop_service mysql
uninstall_package mysql-community-server
@@ -70,11 +60,7 @@
my_conf=/etc/mysql/my.cnf
mysql=mysql
elif is_fedora; then
- if [[ $DISTRO =~ (rhel6) ]]; then
- mysql=mysqld
- else
- mysql=mariadb
- fi
+ mysql=mariadb
my_conf=/etc/my.cnf
elif is_suse; then
my_conf=/etc/my.cnf
@@ -110,7 +96,7 @@
if [[ "$DATABASE_QUERY_LOGGING" == "True" ]]; then
echo_summary "Enabling MySQL query logging"
- if is_fedora && ! [[ $DISTRO =~ (rhel6) ]]; then
+ if is_fedora; then
slow_log=/var/log/mariadb/mariadb-slow.log
else
slow_log=/var/log/mysql/mysql-slow.log
@@ -158,11 +144,7 @@
fi
# Install mysql-server
if is_fedora; then
- if [[ $DISTRO =~ (rhel6) ]]; then
- install_package mysql-server
- else
- install_package mariadb-server
- fi
+ install_package mariadb-server
elif is_ubuntu; then
install_package mysql-server
elif is_suse; then
diff --git a/lib/databases/postgresql b/lib/databases/postgresql
index ad8cdc7..317e0eb 100644
--- a/lib/databases/postgresql
+++ b/lib/databases/postgresql
@@ -49,11 +49,7 @@
pg_hba=/var/lib/pgsql/data/pg_hba.conf
pg_conf=/var/lib/pgsql/data/postgresql.conf
if ! sudo [ -e $pg_hba ]; then
- if ! [[ $DISTRO =~ (rhel6) ]]; then
- sudo postgresql-setup initdb
- else
- sudo service postgresql initdb
- fi
+ sudo postgresql-setup initdb
fi
elif is_ubuntu; then
pg_dir=`find /etc/postgresql -name pg_hba.conf|xargs dirname`
diff --git a/lib/horizon b/lib/horizon
index aa70bd5..122d516 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -72,14 +72,6 @@
# cleanup_horizon() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_horizon {
- if is_fedora && [[ $DISTRO =~ (rhel6) ]]; then
- # If ``/usr/bin/node`` points into ``$DEST``
- # we installed it via ``install_nodejs``
- if [[ $(readlink -f /usr/bin/node) =~ ($DEST) ]]; then
- sudo rm /usr/bin/node
- fi
- fi
-
local horizon_conf=$(apache_site_config_for horizon)
sudo rm -f $horizon_conf
}
diff --git a/lib/nova_plugins/functions-libvirt b/lib/nova_plugins/functions-libvirt
index c136e35..4d617e8 100644
--- a/lib/nova_plugins/functions-libvirt
+++ b/lib/nova_plugins/functions-libvirt
@@ -37,8 +37,7 @@
# Note there is a difference between F20 rackspace cloud images
# and HP images used in the gate; rackspace has firewalld but hp
- # cloud doesn't. RHEL6 doesn't have firewalld either. So we
- # don't care if it fails.
+ # cloud doesn't.
if is_fedora && is_package_installed firewalld; then
sudo service firewalld restart || true
fi
@@ -68,34 +67,12 @@
fi
if is_fedora || is_suse; then
- if is_fedora && [[ $DISTRO =~ (rhel6) || "$os_RELEASE" -le "17" ]]; then
- cat <<EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla
-[libvirt Management Access]
-Identity=unix-group:$LIBVIRT_GROUP
-Action=org.libvirt.unix.manage
-ResultAny=yes
-ResultInactive=yes
-ResultActive=yes
-EOF
- elif is_suse && [[ $os_RELEASE = 12.2 || "$os_VENDOR" = "SUSE LINUX" ]]; then
- # openSUSE < 12.3 or SLE
- # Work around the fact that polkit-default-privs overrules pklas
- # with 'unix-group:$group'.
- cat <<EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla
-[libvirt Management Access]
-Identity=unix-user:$STACK_USER
-Action=org.libvirt.unix.manage
-ResultAny=yes
-ResultInactive=yes
-ResultActive=yes
-EOF
- else
- # Starting with fedora 18 and opensuse-12.3 enable stack-user to
- # virsh -c qemu:///system by creating a policy-kit rule for
- # stack-user using the new Javascript syntax
- rules_dir=/etc/polkit-1/rules.d
- sudo mkdir -p $rules_dir
- cat <<EOF | sudo tee $rules_dir/50-libvirt-$STACK_USER.rules
+ # Starting with fedora 18 and opensuse-12.3 enable stack-user to
+ # virsh -c qemu:///system by creating a policy-kit rule for
+ # stack-user using the new Javascript syntax
+ rules_dir=/etc/polkit-1/rules.d
+ sudo mkdir -p $rules_dir
+ cat <<EOF | sudo tee $rules_dir/50-libvirt-$STACK_USER.rules
polkit.addRule(function(action, subject) {
if (action.id == 'org.libvirt.unix.manage' &&
subject.user == '$STACK_USER') {
@@ -103,8 +80,7 @@
}
});
EOF
- unset rules_dir
- fi
+ unset rules_dir
fi
# The user that nova runs as needs to be member of **libvirtd** group otherwise
diff --git a/stack.sh b/stack.sh
index b03cca8..5c3c99b 100755
--- a/stack.sh
+++ b/stack.sh
@@ -152,7 +152,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} =~ (precise|trusty|7.0|wheezy|sid|testing|jessie|f20|f21|rhel6|rhel7) ]]; then
+if [[ ! ${DISTRO} =~ (precise|trusty|7.0|wheezy|sid|testing|jessie|f20|f21|rhel7) ]]; 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"
@@ -221,7 +221,7 @@
# Some distros need to add repos beyond the defaults provided by the vendor
# to pick up required packages.
-if is_fedora && [[ $DISTRO == "rhel6" || $DISTRO == "rhel7" ]]; then
+if is_fedora && [[ $DISTRO == "rhel7" ]]; then
# RHEL requires EPEL for many Open Stack dependencies
# note we always remove and install latest -- some environments
@@ -239,16 +239,10 @@
# $releasever directly in .repo file we create below. However
# RHEL gives a $releasever of "6Server" which breaks the path;
# see https://bugzilla.redhat.com/show_bug.cgi?id=1150759
- if [[ $DISTRO == "rhel7" ]]; then
- epel_ver="7"
- elif [[ $DISTRO == "rhel6" ]]; then
- epel_ver="6"
- fi
-
cat <<EOF | sudo tee /etc/yum.repos.d/epel-bootstrap.repo
[epel-bootstrap]
name=Bootstrap EPEL
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-$epel_ver&arch=\$basearch
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=\$basearch
failovermethod=priority
enabled=0
gpgcheck=0
@@ -261,22 +255,10 @@
# ... and also optional to be enabled
is_package_installed yum-utils || install_package yum-utils
- if [[ $DISTRO == "rhel7" ]]; then
- OPTIONAL_REPO=rhel-7-server-optional-rpms
- elif [[ $DISTRO == "rhel6" ]]; then
- OPTIONAL_REPO=rhel-6-server-optional-rpms
- fi
- sudo yum-config-manager --enable ${OPTIONAL_REPO}
+ sudo yum-config-manager --enable rhel-7-server-optional-rpms
- # Installing Open vSwitch on RHEL requires enabling the RDO repo.
- # Note no juno packages for rhel6
- if [[ $DISTRO == "rhel6" ]]; then
- RHEL_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"https://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-4.noarch.rpm"}
- RHEL_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-icehouse"}
- elif [[ $DISTRO == "rhel7" ]]; then
- RHEL_RDO_REPO_RPM=${RHEL7_RDO_REPO_RPM:-"https://repos.fedorapeople.org/repos/openstack/openstack-juno/rdo-release-juno-1.noarch.rpm"}
- RHEL_RDO_REPO_ID=${RHEL7_RDO_REPO_ID:-"openstack-juno"}
- fi
+ RHEL_RDO_REPO_RPM=${RHEL7_RDO_REPO_RPM:-"https://repos.fedorapeople.org/repos/openstack/openstack-juno/rdo-release-juno-1.noarch.rpm"}
+ RHEL_RDO_REPO_ID=${RHEL7_RDO_REPO_ID:-"openstack-juno"}
if ! sudo yum repolist enabled $RHEL_RDO_REPO_ID | grep -q $RHEL_RDO_REPO_ID; then
echo "RDO repo not detected; installing"
@@ -362,12 +344,6 @@
echo $@ >&3
}
-if is_fedora && [ $DISTRO == "rhel6" ]; then
- # poor old python2.6 doesn't have argparse by default, which
- # outfilter.py uses
- is_package_installed python-argparse || install_package python-argparse
-fi
-
# Set up logging for ``stack.sh``
# Set ``LOGFILE`` to turn on logging
# Append '.xxxxxxxx' to the given name to maintain history
diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh
index c7f1efa..cc5275f 100755
--- a/tools/fixup_stuff.sh
+++ b/tools/fixup_stuff.sh
@@ -12,12 +12,10 @@
# - httplib2 0.8 permissions are 600 in the package and
# pip 1.4 doesn't fix it (1.3 did)
#
-# - RHEL6:
-#
+# - Fedora:
# - set selinux not enforcing
-# - (re)start messagebus daemon
-# - remove distro packages python-crypto and python-lxml
-# - pre-install hgtools to work around a bug in RHEL6 distribute
+# - uninstall firewalld (f20 only)
+
# If TOP_DIR is set we're being sourced rather than running stand-alone
# or in a sub-shell
@@ -125,64 +123,3 @@
fi
fi
-
-# RHEL6
-# -----
-
-if [[ $DISTRO =~ (rhel6) ]]; then
-
- # install_pip.sh installs the latest setuptools over the packaged
- # version. We can't really uninstall the packaged version if it
- # is there, because it may remove other important things like
- # cloud-init. Things work, but there can be an old egg file left
- # around from the package that causes some really strange
- # setuptools errors. Remove it, if it is there
- sudo rm -f /usr/lib/python2.6/site-packages/setuptools-0.6*.egg-info
-
- # If the ``dbus`` package was installed by DevStack dependencies the
- # uuid may not be generated because the service was never started (PR#598200),
- # causing Nova to stop later on complaining that ``/var/lib/dbus/machine-id``
- # does not exist.
- sudo service messagebus restart
-
- # The following workarounds break xenserver
- if [ "$VIRT_DRIVER" != 'xenserver' ]; then
- # An old version of ``python-crypto`` (2.0.1) may be installed on a
- # fresh system via Anaconda and the dependency chain
- # ``cas`` -> ``python-paramiko`` -> ``python-crypto``.
- # ``pip uninstall pycrypto`` will remove the packaged ``.egg-info``
- # file but leave most of the actual library files behind in
- # ``/usr/lib64/python2.6/Crypto``. Later ``pip install pycrypto``
- # will install over the packaged files resulting
- # in a useless mess of old, rpm-packaged files and pip-installed files.
- # Remove the package so that ``pip install python-crypto`` installs
- # cleanly.
- # Note: other RPM packages may require ``python-crypto`` as well.
- # For example, RHEL6 does not install ``python-paramiko packages``.
- uninstall_package python-crypto
-
- # A similar situation occurs with ``python-lxml``, which is required by
- # ``ipa-client``, an auditing package we don't care about. The
- # build-dependencies needed for ``pip install lxml`` (``gcc``,
- # ``libxml2-dev`` and ``libxslt-dev``) are present in
- # ``files/rpms/general``.
- uninstall_package python-lxml
- fi
-
- # ``setup.py`` contains a ``setup_requires`` package that is supposed
- # to be transient. However, RHEL6 distribute has a bug where
- # ``setup_requires`` registers entry points that are not cleaned
- # out properly after the setup-phase resulting in installation failures
- # (bz#924038). Pre-install the problem package so the ``setup_requires``
- # dependency is satisfied and it will not be installed transiently.
- # Note we do this before the track-depends in ``stack.sh``.
- pip_install hgtools
-
- # workaround for https://code.google.com/p/unittest-ext/issues/detail?id=79
- install_package python-unittest2 patch
- pip_install discover
- (cd /usr/lib/python2.6/site-packages/; sudo patch <"$FILES/patches/unittest2-discover.patch" || echo 'Assume already applied')
- # Make sure the discover.pyc is up to date
- sudo rm /usr/lib/python2.6/site-packages/discover.pyc || true
- sudo python -c 'import discover'
-fi