Bug 1306214 - kubernetes for powerpc arches
kubernetes for powerpc arches
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kubernetes (Show other bugs)
24
ppc64le Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Chaloupka
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: PPCTracker F-ExcludeArch-ppc64le/PPC64LETracker
  Show dependency treegraph
 
Reported: 2016-02-10 05:43 EST by Menanteau Guy
Modified: 2016-05-07 07:54 EDT (History)
9 users (show)

See Also:
Fixed In Version: kubernetes-1.2.0-0.16.alpha6.git4a3f9c5.fc24 kubernetes-1.2.0-0.20.git4a3f9c5.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-07 07:54:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Menanteau Guy 2016-02-10 05:43:13 EST
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 09:23:28 EST
The current srpm carries support for ppc64el. Although, have not tried to build k8s on the architecture.
Comment 2 Menanteau Guy 2016-03-11 07:52:30 EST
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 07:53 EST
Created attachment 1135225 [details]
changed spec
Comment 4 Menanteau Guy 2016-03-11 07:54 EST
Created attachment 1135226 [details]
target path patch
Comment 5 Menanteau Guy 2016-03-11 07:55 EST
Created attachment 1135227 [details]
golang path patch
Comment 6 Jan Chaloupka 2016-03-29 07:09:00 EDT
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 17:53:32 EDT
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 05:42:46 EDT
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 07:18:39 EDT
Does the f24 build needs to be in updates or raw build in koji is enough?
Comment 10 Dan Horák 2016-04-21 07:23:31 EDT
We need all builds to go thru bodhi to be available on secondary arches.
Comment 11 Fedora Update System 2016-04-21 07:36:18 EDT
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 17:55:40 EDT
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 11:50:25 EDT
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 15:52:29 EDT
So what is the correct path that needs to be applied?
Comment 15 Menanteau Guy 2016-04-25 05:02 EDT
Created attachment 1150315 [details]
Use golang as compiler for ppc64le

The correct patch is this one.
Comment 16 Fedora Update System 2016-04-25 06:49:35 EDT
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 13:50:22 EDT
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 07:54:28 EDT
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.