Stop using shaman

Shaman packages are not stable and generates
breakages in our gates quite frequently.
Use packages available in download.ceph.com instead.
Change-Id: I0eab8ad25112511b0c4dd4b7796b4cda821bca8b
This commit is contained in:
Victoria Martinez de la Cruz
2020年09月02日 19:38:22 -03:00
parent 6f48063468
commit 8c194dfada

View File

@@ -30,9 +30,7 @@ CEPH_RELEASE=${CEPH_RELEASE:-nautilus}
CEPH_RELEASE_STABLE=${CEPH_RELEASE_STABLE:-luminous}
GANESHA_RELEASE=${GANESHA_RELEASE:-ceph_nautilus}
GANESHA_RELEASE_STABLE=${GANESHA_RELEASE_STABLE:-ceph_luminous}
GANESHA_RELEASE=${GANESHA_RELEASE:-deb-V2.7-stable}
# Deploy a Ceph demo container instead of a non-containerized version
CEPH_CONTAINERIZED=$(trueorfalse False CEPH_CONTAINERIZED)
@@ -789,7 +787,7 @@ EOF
function cleanup_nfs_ganesha {
sudo systemctl stop nfs-ganesha
sudo systemctl disable nfs-ganesha
sudo uninstall_package nfs-ganesha nfs-ganesha-ceph
sudo uninstall_package nfs-ganesha nfs-ganesha-ceph libntirpc1
}
function configure_ceph_embedded_manila {
@@ -879,101 +877,153 @@ function install_ceph_remote {
fi
}
function dnf_add_repository_ceph {
local ceph_release=1ドル
local distro_release=2ドル
cat >/etc/yum.repos.d/ceph.repo <<EOF
[ceph]
name=Ceph packages for \$basearch
baseurl=https://download.ceph.com/rpm-{ceph-release}/{distro}/\$basearch
enabled=1
priority=2
gpgcheck=1
gpgkey=https://download.ceph.com/keys/release.asc
[ceph-noarch]
name=Ceph noarch packages
baseurl=https://download.ceph.com/rpm-{ceph-release}/{distro}/noarch
enabled=1
priority=2
gpgcheck=1
gpgkey=https://download.ceph.com/keys/release.asc
[ceph-source]
name=Ceph source packages
baseurl=https://download.ceph.com/rpm-{ceph-release}/{distro}/SRPMS
enabled=0
priority=2
gpgcheck=1
gpgkey=https://download.ceph.com/keys/release.asc
EOF
sed -i -e "s/{ceph-release}/${ceph_release}/" -e "s/{distro}/${distro_release}/" /etc/yum.repos.d/ceph.repo
}
function dnf_add_repository_nfsganesha {
local ganesha_release=1ドル
local ceph_release=2ドル
cat >/etc/yum.repos.d/nfs-ganesha.repo <<EOF
[nfs-ganesha]
name=NFS Ganesha packages for \$basearch
baseurl=https://download.ceph.com/nfs-ganesha/{ganesha-release}/{ceph-release}/\$basearch
enabled=1
priority=2
gpgcheck=1
gpgkey=https://download.ceph.com/keys/release.asc
[nfs-ganesha-noarch]
name=NFS Ganesha noarch packages
baseurl=https://download.ceph.com/nfs-ganesha/{ganesha-release}/{ceph-release}/noarch
enabled=1
priority=2
gpgcheck=1
gpgkey=https://download.ceph.com/keys/release.asc
[nfs-ganesha-source]
name=NFS Ganesha source packages
baseurl=https://download.ceph.com/nfs-ganesha/{ganesha-release}/{ceph-release}/SRPMS
enabled=0
priority=2
gpgcheck=1
gpgkey=https://download.ceph.com/keys/release.asc
EOF
sed -i -e "s/{ganesha-release}/${ganesha_release}/" -e "s/{ceph-release}/${ceph_release}/" /etc/yum.repos.d/nfsganesha.repo
}
# configure_repo_ceph() - Configure Ceph repositories
# Usage: configure_repo_ceph <package_manager> <ceph_release> <distro_type> \
# <distro_release> [<repo_type>]
# - package_manager: apt-get or yum
# - ceph_release: luminous, ...
# - distro_type: centos, ubuntu
# - distro_release: 7, xenial, bionic
# - repo_type: latest, stable (only latest is supported right now)
function configure_repo_ceph {
local package_manager="1ドル"
local ceph_release="2ドル"
local distro_type="3ドル"
local distro_release="4ドル"
local repo_type="${5:-latest}"
local distro_release="3ドル"
local repo_file_name=""
if [ "${package_manager}" = "apt-get" ]; then
repo_file_name="/etc/apt/sources.list.d/ceph.list"
elif [ "${package_manager}" = "yum" ]; then
repo_file_name="/etc/yum.repos.d/ext-ceph.repo"
if is_ubuntu; then
sudo apt-add-repository -y "deb https://download.ceph.com/debian-${ceph_release}/ ${distro_release} main"
elif is_fedora; then
dnf_add_repository_ceph ${ceph_release} ${distro_release}
fi
if [ -n "${repo_file_name}" ]; then
repo=$(curl -L "https://shaman.ceph.com/api/search/?project=ceph&status=ready&distros=${distro_type}/${distro_release}&ref=${ceph_release}&sha1=${repo_type}" | \
jq '.[0] | .chacra_url' | tr -d '"' | awk '{print 1ドル"repo"}')
curl -L $repo | sudo tee ${repo_file_name}
sudo ${package_manager} -y update
fi
sudo ${package_manager} -y update
}
# cleanup_repo_ceph() - Remove Ceph repositories
# Usage: cleanup_repo_ceph
function cleanup_repo_ceph {
if is_ubuntu; then
sudo rm -rf /etc/apt/sources.list.d/ceph.list
if [[ $os_CODENAME =~ (xenial) ]]; then
sudo apt-add-repository -r -y "deb https://download.ceph.com/debian-${CEPH_RELEASE_STABLE}/ ${os_CODENAME} main"
fi
sudo apt-add-repository -r -y "deb https://download.ceph.com/debian-${CEPH_RELEASE}/ ${os_CODENAME} main"
elif is_fedora; then
sudo rm -rf /etc/yum.repos.d/ext-ceph.repo
sudo rm -rf /etc/yum.repos.d/ceph.repo
fi
}
# configure_repo_nfsganesha() - Configure NFS Ganesha repositories
# Usage: configure_repo_nfsganesha <package_manager> <ganesha_flavor> \
# <distro_type> <distro_release> [<repo_type>]
# - package_manager: apt-get or yum
# - flavor: ceph_luminous, ceph_master, ...
# - distro_type: centos, ubuntu
# - distro_release: 7, xenial, bionic
# - repo_type: latest (only latest is supported right now)
# - package_manager: apt-get or dnf
# - ganesha_release: 2.5, 2.5
# - ceph_release: ceph_luminous, ceph_nautilus
function configure_repo_nfsganesha {
local package_manager="1ドル"
local ganesha_flavor="2ドル"
local distro_type="3ドル"
local distro_release="4ドル"
local repo_type="${5:-latest}"
local ganesha_release="2ドル"
local ceph_release="3ドル"
local repo_file_name=""
if [ "${package_manager}" = "apt-get" ]; then
repo_file_name="/etc/apt/sources.list.d/ext-nfs-ganesha.list"
elif [ "${package_manager}" = "yum" ]; then
repo_file_name="/etc/yum.repos.d/ext-nfs-ganesha.repo"
if is_ubuntu; then
# FIXME(vkmc) We need to use community ppa's because there is no build available
# for ubuntu xenial and above for nfs-ganesha-2.7.
# Remove this when they provide the build in download.ceph.com
sudo add-apt-repository -y ppa:nfs-ganesha/libntirpc-1.7
sudo add-apt-repository -y ppa:nfs-ganesha/nfs-ganesha-2.7
elif is_fedora; then
dnf_add_repository_nfsganesha ${ganesha_release} ${ceph_release}
fi
if [ -n "${repo_file_name}" ]; then
repo=$(curl -L "https://shaman.ceph.com/api/search/?project=nfs-ganesha-stable&distros=${distro_type}/${distro_release}&flavor=${ganesha_flavor}&sha1=${repo_type}" | \
jq '.[0] | .chacra_url' | tr -d '"' | awk '{print 1ドル"repo"}')
curl -L $repo | sudo tee ${repo_file_name}
sudo ${package_manager} -y update
fi
sudo ${package_manager} -y update
}
# cleanup_repo_nfsganesha() - Remove NFS Ganesha repositories
# Usage: cleanup_repo_nfsganesha
function cleanup_repo_nfsganesha {
if is_ubuntu; then
sudo rm -rf /etc/apt/sources.list.d/ext-nfs-ganesha.list
# FIXME(vkmc) We need to use community ppa's because there is no build available
# for ubuntu xenial and above for nfs-ganesha-2.7.
# Remove this when they provide the build in download.ceph.com
sudo rm -rf /etc/apt/sources.list.d/nfs-ganesha-ubuntu-libntirpc-1_7-*.list
sudo rm -rf /etc/apt/sources.list.d/nfs-ganesha-ubuntu-nfs-ganesha-2_7-*.list
elif is_fedora; then
sudo rm -rf /etc/yum.repos.d/ext-nfs-ganesha.repo
sudo rm -rf /etc/yum.repos.d/nfs-ganesha.repo
fi
}
function setup_packages_for_manila_on_ubuntu {
# The 'apt-get' package manager needs the following package to access
# HTTPS enabled repositories such as the Ceph repos hosted by the
# shaman/chacra system.
install_package apt-transport-https
CEPH_PACKAGES="${CEPH_PACKAGES} ceph-mds libcephfs2"
if [ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]; then
if [[ $os_CODENAME =~ (xenial) ]]; then
configure_repo_nfsganesha "apt-get" "$GANESHA_RELEASE_STABLE" "ubuntu" "$os_CODENAME"
configure_repo_nfsganesha "apt-get" "$GANESHA_RELEASE" "$CEPH_RELEASE_STABLE"
else
configure_repo_nfsganesha "apt-get" "$GANESHA_RELEASE" "ubuntu" "$os_CODENAME"
configure_repo_nfsganesha "apt-get" "$GANESHA_RELEASE" "$CEPH_RELEASE"
fi
CEPH_PACKAGES="${CEPH_PACKAGES} nfs-ganesha nfs-ganesha-ceph"
CEPH_PACKAGES="${CEPH_PACKAGES} libntirpc1 nfs-ganesha nfs-ganesha-ceph"
fi
if python3_enabled; then
@@ -983,15 +1033,13 @@ function setup_packages_for_manila_on_ubuntu {
function setup_packages_for_manila_on_fedora_family {
if [ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]; then
# NOTE(vkmc) shaman currently does not build for Fedora
# we need to stick to CentOS 7 packages
configure_repo_nfsganesha "yum" "$CEPH_RELEASE" "centos" "7"
# NOTE(vkmc) el7 packages work on Fedora
configure_repo_nfsganesha "dnf" "$GANESHA_RELEASE" "$CEPH_RELEASE"
CEPH_PACKAGES="${CEPH_PACKAGES} nfs-ganesha nfs-ganesha-ceph"
fi
}
function install_ceph {
install_package jq
if is_ubuntu; then
if ! [[ $os_CODENAME =~ (focal|xenial|bionic) ]]; then
@@ -1002,9 +1050,9 @@ function install_ceph {
install_package software-properties-common
if [[ $os_CODENAME =~ (xenial) ]]; then
configure_repo_ceph "apt-get" "$CEPH_RELEASE_STABLE" "ubuntu" "$os_CODENAME"
configure_repo_ceph "apt-get" "$CEPH_RELEASE_STABLE" "$os_CODENAME"
else
configure_repo_ceph "apt-get" "$CEPH_RELEASE" "ubuntu" "$os_CODENAME"
configure_repo_ceph "apt-get" "$CEPH_RELEASE" "$os_CODENAME"
fi
CEPH_PACKAGES="ceph libnss3-tools"
@@ -1036,9 +1084,8 @@ function install_ceph {
die $LINENO "Supported for Fedora 31 and 32. Not supported for other releases."
fi
# NOTE(vkmc) shaman currently does not build for Fedora
# we need to stick to CentOS 7 packages
configure_repo_ceph "yum" "$CEPH_RELEASE" "centos" "7"
# NOTE(vkmc) el7 packages work on Fedora
configure_repo_ceph "dnf" "$CEPH_RELEASE" "el7"
CEPH_PACKAGES="ceph"
Reference in New Issue
openstack/devstack-plugin-ceph
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.