From 941940a92cd5424bbe5125569b083f1059569bdb Mon Sep 17 00:00:00 2001 From: Andreas Scheuring Date: Wed, 13 Sep 2017 00:24:02 +0200 Subject: [PATCH] Add etcd3 support for s390x Since [1] devstack is failing on s390x with "Distro not supported". The reason for this is the missing etcd3 support. It worked before [1] as we were able to disable etcd3 via local.conf. But as etcd3 is a base service, we might not be able to rely on this workarond in the future anymore. As there is no etcd3 binary hosted on github like it is for other architectures, the user needs to specify an alternative download URL via local.conf. Otherwise devstack will exit with an appropriate error message. ETCD_DOWNLOAD_URL= [1] https://github.com/openstack-dev/devstack/commit/d8bb220606737719bcdf7c5b4f54906f2974c71c Change-Id: I1c378a0456dcf2e94d79a02de9d3e16753d946d6 Partial-Bug: #1693192 --- doc/source/configuration.rst | 15 ++++++++++++--- stackrc | 11 +++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index c4834b7a84..23f680a59c 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -779,9 +779,15 @@ are needed:: DOWNLOAD_DEFAULT_IMAGES=False IMAGE_URLS="https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-s390x-disk1.img" + # Provide a custom etcd3 binary download URL and ints sha256. + # The binary must be located under '//etcd--linux-s390x.tar.gz' + # on this URL. + # Build instructions for etcd3: https://github.com/linux-on-ibm-z/docs/wiki/Building-etcd + ETCD_DOWNLOAD_URL= + ETCD_SHA256= + enable_service n-sproxy disable_service n-novnc - disable_service etcd3 # https://bugs.launchpad.net/devstack/+bug/1693192 [[post-config|$NOVA_CONF]] @@ -803,8 +809,11 @@ Reasoning: needed if you want to use the *serial console* outside of the all-in-one setup. -* The service ``etcd3`` needs to be disabled as long as bug report - https://bugs.launchpad.net/devstack/+bug/1693192 is not resolved. +* A link to an etcd3 binary and its sha256 needs to be provided as the + binary for s390x is not hosted on github like it is for other + architectures. For more details see + https://bugs.launchpad.net/devstack/+bug/1693192. Etcd3 can easily be + built along https://github.com/linux-on-ibm-z/docs/wiki/Building-etcd. .. note:: To run *Tempest* against this *Devstack* all-in-one, you'll need to use a guest image which is smaller than 1GB when uncompressed. diff --git a/stackrc b/stackrc index c2bbe21aca..92a939f164 100644 --- a/stackrc +++ b/stackrc @@ -719,6 +719,7 @@ ETCD_SHA256_AMD64="4fde194bbcd259401e2b5c462dfa579ee7f6af539f13f130b8f5b4f52e3b3 # NOTE(sdague): etcd v3.1.7 doesn't have anything for these architectures, though 3.2.0 does. ETCD_SHA256_ARM64="" ETCD_SHA256_PPC64="" +ETCD_SHA256_S390X="" # Make sure etcd3 downloads the correct architecture if is_arch "x86_64"; then ETCD_ARCH="amd64" @@ -729,6 +730,16 @@ elif is_arch "aarch64"; then elif is_arch "ppc64le"; then ETCD_ARCH="ppc64le" ETCD_SHA256=${ETCD_SHA256:-$ETCD_SHA256_PPC64} +elif is_arch "s390x"; then + # An etcd3 binary for s390x is not available on github like it is + # for other arches. Only continue if a custom download URL was + # provided. + if [[ -n "${ETCD_DOWNLOAD_URL}" ]]; then + ETCD_ARCH="s390x" + ETCD_SHA256=${ETCD_SHA256:-$ETCD_SHA256_S390X} + else + exit_distro_not_supported "etcd3. No custom ETCD_DOWNLOAD_URL provided." + fi else exit_distro_not_supported "invalid hardware type - $ETCD_ARCH" fi