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=<custom-download-url>

[1] d8bb220606

Change-Id: I1c378a0456dcf2e94d79a02de9d3e16753d946d6
Partial-Bug: #1693192
This commit is contained in:
Andreas Scheuring 2017-09-13 00:24:02 +02:00
parent 91f62818c3
commit 941940a92c
2 changed files with 23 additions and 3 deletions

View File

@ -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 version>/etcd-<etcd-version>-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=<your-etcd-download-url>
ETCD_SHA256=<your-etcd3-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.

11
stackrc
View File

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