Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterize the binary path and host arch for the hyperkube image #47776

Merged

Conversation

jianzhangbjz
Copy link
Contributor

@jianzhangbjz jianzhangbjz commented Jun 20, 2017

As the cluster/images/hyperkube/README.md shows, I run the command: make build VERSION=test ARCH=ppc64le, but got the below errors, so this PR will fix it.

ARCH=ppc64le
cp -r ./* /tmp/hyperkubeTFbYrI
mkdir -p /tmp/hyperkubeTFbYrI/cni-bin
cp ../../../_output/dockerized/bin/linux/ppc64le/hyperkube /tmp/hyperkubeTFbYrI
cp: cannot stat '../../../_output/dockerized/bin/linux/ppc64le/hyperkube': No such file or directory
Makefile:62: recipe for target 'build' failed
make: *** [build] Error 1

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 20, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @jianzhangbjz. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 20, 2017
@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Jun 20, 2017
@jianzhangbjz
Copy link
Contributor Author

/assign @eparis

Copy link
Member

@luxas luxas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, but this is working exactly as expected.
Just copy _output/local/bin/linux/${ARCH}/hyperkube to _output/dockerized/bin/linux/${ARCH}/hyperkube if you want to build the hyperkube image. Using only make isn't a supported build, using make release (dockerized build) is.

The reason we're using the dockerized directory is because the official builds are located there and we won't change that.

And if we changed the ifeq clause to the ifneq you have there it would break the release scripts :/

I'm very sorry, but I can't take this PR

@luxas luxas self-assigned this Jun 20, 2017
@luxas
Copy link
Member

luxas commented Jun 20, 2017

I'm open to a HYPERKUBE_BIN variable though that defaults to _output/local/bin/linux/${ARCH}/hyperkube, but is configurable so you can set it to _output/dockerized/bin/linux/${ARCH}/hyperkube if you want

@jianzhangbjz
Copy link
Contributor Author

@luxas AFAIK, make release or make quick-releasecommands do not support on ppc64le, because could not get the cross-build images, like kube-build:build-1be53c2c9a-5-v1.7.5-2. So, there is no _output/dockerized/bin/linux/${ARCH}/hyperkube folder.

@jianzhangbjz
Copy link
Contributor Author

jianzhangbjz commented Jun 20, 2017

@luxas Ok, I will create the HYPERKUBE_BIN variable that defaults to _output/dockerized/bin/linux/${ARCH}/hyperkube as before, and is configurable so users can set it to _output/local/bin/linux/${ARCH}/hyperkube, how about this?

@jianzhangbjz
Copy link
Contributor Author

@luxas Update, added HYPERKUBE_BIN variable. :)

@jianzhangbjz
Copy link
Contributor Author

@luxas Needs to revise? Or something else I missed?

@jianzhangbjz
Copy link
Contributor Author

Just copy _output/local/bin/linux/${ARCH}/hyperkube to _output/dockerized/bin/linux/${ARCH}/hyperkube if you want to build the hyperkube image.

This operation still can't success, because the image for ppc64le and amd64 are the same in
# When building "normally" for amd64, remove the whole line, it has no part in the amd64 image, so I added this else ifeq condition.
I think the users (at least ppc64le users) will then be able to benefit from this modify. :)

@@ -74,6 +76,8 @@ endif
ifeq ($(ARCH),amd64)
# When building "normally" for amd64, remove the whole line, it has no part in the amd64 image
cd ${TEMP_DIR} && ${SED_CMD} "/CROSS_BUILD_/d" Dockerfile
else ifeq ($(ARCH),ppc64le)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break the release scripts, as ppc64le must be cross-built when on amd64.
What we should do instead is check the host platform and the target platform. If they equal,

cd ${TEMP_DIR} && ${SED_CMD} "/CROSS_BUILD_/d" Dockerfile

should be run.
If they aren't the same, the second case should be run.

So add a HOSTARCH?=amd64 variable and compare ifeq($(ARCH),$(HOSTARCH)) above.
Then you set HOSTARCH=ppc64le when running the script, and it will work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. This variable has been added. :)

Copy link
Member

@luxas luxas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please squash your commits

@luxas
Copy link
Member

luxas commented Jun 21, 2017

@k8s-bot ok to test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 21, 2017
@luxas
Copy link
Member

luxas commented Jun 21, 2017

/assign @ixdy
Can you please also take a look to verify this is correct?

@jianzhangbjz
Copy link
Contributor Author

@luxas Squashed it, thanks. :)

@luxas luxas added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Jun 21, 2017
@@ -71,7 +74,7 @@ ifeq ($(CACHEBUST),1)
cd ${TEMP_DIR} && sed -i.back "s|CACHEBUST|$(shell uuidgen)|g" Dockerfile
endif

ifeq ($(ARCH),amd64)
ifeq ($(ARCH),$(HOSTARCH))
# When building "normally" for amd64, remove the whole line, it has no part in the amd64 image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe update this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it has been updated.

@jianzhangbjz
Copy link
Contributor Author

/retest

@jianzhangbjz
Copy link
Contributor Author

/retest

@ixdy
Copy link
Member

ixdy commented Jun 22, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 22, 2017
@eparis
Copy link
Contributor

eparis commented Jun 22, 2017

/approve no-issue

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eparis, ixdy, jianzhangbjz

Associated issue requirement bypassed by: eparis

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2017
@luxas luxas changed the title build hyperkube image on ppc64le Parameterize the binary path and host arch for the hyperkube image Jun 24, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eparis, ixdy, jianzhangbjz

Associated issue requirement bypassed by: eparis

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

5 similar comments
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eparis, ixdy, jianzhangbjz

Associated issue requirement bypassed by: eparis

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eparis, ixdy, jianzhangbjz

Associated issue requirement bypassed by: eparis

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eparis, ixdy, jianzhangbjz

Associated issue requirement bypassed by: eparis

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eparis, ixdy, jianzhangbjz

Associated issue requirement bypassed by: eparis

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eparis, ixdy, jianzhangbjz

Associated issue requirement bypassed by: eparis

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit d0ee6bb into kubernetes:master Jun 24, 2017
@jianzhangbjz jianzhangbjz deleted the build-hyperkube-ppc64le branch June 24, 2017 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants