Bug 1747124 - etcd: can't build unsupported upstream arch
Summary: etcd: can't build unsupported upstream arch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Etcd
Version: 4.1.z
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.2.0
Assignee: Sam Batschelet
QA Contact: ge liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-29 17:45 UTC by Sam Batschelet
Modified: 2023-09-14 05:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:38:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift etcd pull 17 0 None closed BUG 1747124: Dockerfile: use build instead of make build 2020-08-06 23:25:32 UTC
Github openshift machine-config-operator pull 1092 0 None closed BUG 1747124: cmd/setup-etcd-environment: add support for s390, s390x arch 2020-08-06 23:25:32 UTC
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:39:04 UTC

Description Sam Batschelet 2019-08-29 17:45:10 UTC
Description of problem: etcd does not support building unsupported upstream arch such as s390x. This is required for IBM Z.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 ge liu 2019-08-30 01:58:18 UTC
Sam, 
do you have any advice for verify this bug, thanks.

Comment 3 Sam Batschelet 2019-08-30 12:09:05 UTC
Ge,
This is what I did. First I grabbed an s390,s390x machine on beaker.

Then as root export the following

GOROOT=/usr/local/go
GOPATH=/go
PATH=${GOPATH}/bin:${GOROOT}/bin:${PATH}
GO_DOWNLOAD_URL=https://storage.googleapis.com/golang
GO_VERSION=1.11.12

This one-liner should get you a recent goloang 1.11.x

$ rm -rf ${GOROOT} && curl -s ${GO_DOWNLOAD_URL}/go${GO_VERSION}.linux-s390x.tar.gz | tar -v -C /usr/local/ -xz && mkdir -p ${GOPATH}/src ${GOPATH}/bin && go version

# install deps
$ yum install -y make git

## test runtime ENV population

$ mkdir -P $GOPATH/src/testing

$ cd $GOPATH/src/testing

$ curl -s https://gist.githubusercontent.com/hexfusion/fd098323a32dfa18e8ca02ff61f51743/raw/bf237b40b31c5d79f3acae6a226755ffe4bf305b/gistfile1.txt -o main.go

go run main.go

cat ENV

```
export ETCD_UNSUPPORTED_ARCH=s390x
```

## test multiarch build
$ git clone https://github.com/openshift/etcd.git

$ cd etcd

$ git checkout openshift-4.2

# build failure case
$ make build
[...]
./bin/etcd --version
2019-08-30 07:57:32.266697 E | etcdmain: etcd on unsupported platform without ETCD_UNSUPPORTED_ARCH=s390x set.

# valid build
$ ./build

# start failure case

$ bin/etcd
2019-08-30 08:05:47.417816 E | etcdmain: etcd on unsupported platform without ETCD_UNSUPPORTED_ARCH=s390x set.

# valid start

$ . ENV; bin/etcd

bin/etcd
2019-08-30 08:05:18.089929 W | etcdmain: running etcd on unsupported architecture "s390x" since ETCD_UNSUPPORTED_ARCH is set
2019-08-30 08:05:18.090128 I | etcdmain: etcd Version: 3.3.10
2019-08-30 08:05:18.090134 I | etcdmain: Git SHA: 3ebe3d9
2019-08-30 08:05:18.090140 I | etcdmain: Go Version: go1.11.12
2019-08-30 08:05:18.090145 I | etcdmain: Go OS/Arch: linux/s390x
[..]

Comment 4 ge liu 2019-09-02 02:29:42 UTC
sam, thanks, LGTM

Comment 5 errata-xmlrpc 2019-10-16 06:38:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2922

Comment 7 Red Hat Bugzilla 2023-09-14 05:42:36 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.