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/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