Bug 1306214 - kubernetes for powerpc arches
Summary: kubernetes for powerpc arches
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kubernetes
Version: 24
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Chaloupka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks: PPCTracker F-ExcludeArch-ppc64le, PPC64LETracker
TreeView+ depends on / blocked
 
Reported: 2016-02-10 10:43 UTC by Menanteau Guy
Modified: 2016-05-07 11:54 UTC (History)
9 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-05-07 11:54:38 UTC


Attachments (Terms of Use)
changed spec (80.80 KB, text/x-matlab)
2016-03-11 12:53 UTC, Menanteau Guy
no flags Details
target path patch (362 bytes, patch)
2016-03-11 12:54 UTC, Menanteau Guy
no flags Details | Diff
golang path patch (413 bytes, patch)
2016-03-11 12:55 UTC, Menanteau Guy
no flags Details | Diff
Use golang as compiler for ppc64le (398 bytes, patch)
2016-04-25 09:02 UTC, Menanteau Guy
no flags Details | Diff

Description Menanteau Guy 2016-02-10 10:43:13 UTC
It seems that kubernetes have been tested upstream for powerpc64le secondary arch:  https://github.com/kubernetes/kubernetes/pull/18417

Could you please update kubernetes version to have a chance to get it built on
secondary arches for f24 ?

Comment 1 Jan Chaloupka 2016-02-22 14:23:28 UTC
The current srpm carries support for ppc64el. Although, have not tried to build k8s on the architecture.

Comment 2 Menanteau Guy 2016-03-11 12:52:30 UTC
Following kubernetes k8s upstream commits are needed:
4774e7146e0980b0ab9e0a8027e50254e7f6945d 
c969c041e2cda926e6d582175bea565353aed040

The only way I found to get it built is to point on 1.2.0-alpha.8 version
got from https://github.com/kubernetes/kubernetes/tree/v1.2.0-alpha.8

Patch keep-solid-port-for-kube-proxy.patch seems to not apply anymore.
This needs to be checked.

Also to have fedora ppc64le built, I needed to add two patches and to change the spec file. This needs to be reviewed.

- ppc64le-redhat-linux-gcc-path.patch
  This patch to change "powerpc64le-linux-gnu-gcc" reference by
  "ppc64le-redhat-linux-gnu"
This is specific to fedora and I guess a more elegant way exists to change this
and I am not sure if the problem is not in rpm macros.
rpm --eval "%{_target_platform}" returns "ppc64le-redhat-linux-gnu" 

in /usr/lib/rpm/macros
%host_vendor  redhat

dnf list rpm
Installed Packages
rpm.ppc64le                    4.13.0-0.rc1.25.fc24                     @rawhide


- golang-1.6-kube-path.patch
  This patch to change the go binary path of golang 1.6
Again, it seems to be specific to ppc64le as this path is not the same for x86-64 build on primary with the same golang... This needs to be investigated.

koji build --scratch f24 /root/test/kubernetes-1.2.0-gm_0.14.alpha8.f24.src.rpm
on primary:
http://koji.fedoraproject.org/koji/taskinfo?taskID=13308156
on secondary:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3215054

Note that only ppc64le builds (no ppc64).
I just tried to build but did not do any functional tests.

Comment 3 Menanteau Guy 2016-03-11 12:53 UTC
Created attachment 1135225 [details]
changed spec

Comment 4 Menanteau Guy 2016-03-11 12:54 UTC
Created attachment 1135226 [details]
target path patch

Comment 5 Menanteau Guy 2016-03-11 12:55 UTC
Created attachment 1135227 [details]
golang path patch

Comment 6 Jan Chaloupka 2016-03-29 11:09:00 UTC
ose/origin 1.1.4 release picks upstream's 91d3e753a4eca4e87462b7c9e5391ec94bb792d9 commit which already carries the patch.

Once kubernetes gets updated, supported architectures get extended to ppc64le as well.

Comment 7 Menanteau Guy 2016-04-20 21:53:32 UTC
I did a scratch build on ppc64le based on primary source and it failed.
see http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3315227

I applied the 2 patches I previously attached on this bug and I changed the spec file to handle the 2 new patches and add the following change on kube path and
run a new koji scratch build.
koji scratch build of kubernetes patched built successfully.
see http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3315264

kube path changed in spec:
# fix golang 1.6 kube path for fedora ppc64le
%if 0%{?fedora_on_ppc64le}
output_path="${KUBE_OUTPUT_BINPATH}"
%else
output_path="${KUBE_OUTPUT_BINPATH}/$(kube::golang::current_platform)"
%endif

Comment 8 Menanteau Guy 2016-04-21 09:42:46 UTC
Could it be possible to have these patches quickly in order to add kubernetes package in fedora 24 for secondary.
Thanks

Comment 9 Jan Chaloupka 2016-04-21 11:18:39 UTC
Does the f24 build needs to be in updates or raw build in koji is enough?

Comment 10 Dan Horák 2016-04-21 11:23:31 UTC
We need all builds to go thru bodhi to be available on secondary arches.

Comment 11 Fedora Update System 2016-04-21 11:36:18 UTC
kubernetes-1.2.0-0.19.git4a3f9c5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-2adf0b1c86

Comment 12 Fedora Update System 2016-04-21 21:55:40 UTC
kubernetes-1.2.0-0.19.git4a3f9c5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-2adf0b1c86

Comment 13 Menanteau Guy 2016-04-22 15:50:25 UTC
In the patch attachment 1135226 [details] I proposed, I set gcc for ppc64le kubernetes.
It is a an error as we need to used "go" now.

The correct patch should have been:
diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
--- a/hack/lib/golang.sh
+++ b/hack/lib/golang.sh
@@ -222,9 +222,6 @@ kube::golang::set_platform_envs() {
   elif [[ ${platform} == "linux/arm64" ]]; then
     export CGO_ENABLED=1
     export CC=aarch64-linux-gnu-gcc
-  elif [[ ${platform} == "linux/ppc64le" ]]; then
-    export CGO_ENABLED=1
-    export CC=ppc64le-redhat-linux-gcc
   fi
 }


Sorry for the inconvenient.

Comment 14 Jan Chaloupka 2016-04-24 19:52:29 UTC
So what is the correct path that needs to be applied?

Comment 15 Menanteau Guy 2016-04-25 09:02 UTC
Created attachment 1150315 [details]
Use golang as compiler for ppc64le

The correct patch is this one.

Comment 16 Fedora Update System 2016-04-25 10:49:35 UTC
kubernetes-1.2.0-0.20.git4a3f9c5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ec72317438

Comment 17 Fedora Update System 2016-04-25 17:50:22 UTC
kubernetes-1.2.0-0.20.git4a3f9c5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ec72317438

Comment 18 Fedora Update System 2016-05-07 11:54:28 UTC
kubernetes-1.2.0-0.20.git4a3f9c5.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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