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

Bump x/sys and opencontainers/runc to support Risc-V architecture #82349

Closed
wants to merge 2 commits into from
Closed

Bump x/sys and opencontainers/runc to support Risc-V architecture #82349

wants to merge 2 commits into from

Conversation

carlosedp
Copy link
Contributor

@carlosedp carlosedp commented Sep 4, 2019

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Bump modules to allow building Kubernetes on Risc-V architecture.
Risc-V software support tracker on https://github.com/carlosedp/riscv-bringup

Special notes for your reviewer:

This PR depends on #82342 so it might need a rebase after that one get's merged.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 4, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @carlosedp. 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 /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.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubectl area/kubelet sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/node Categorizes an issue or PR as relevant to SIG Node. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 4, 2019
@BenTheElder
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 4, 2019
Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

x/sys should be fine, runc has some possibly noteworthy changes

func UseSystemd() bool {
if !systemdUtil.IsRunningSystemd() {
if !isRunningSystemd() {
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/coreos/go-systemd/blob/fd7a80b32e1fc73e890fde45604ed5009dc817a3/util/util.go#L72

confirming this is the same method, just lifted into this package (no behavior change)

@@ -208,10 +160,6 @@ func (m *Manager) Apply(pid int) error {

// if we create a slice, the parent is defined via a Wants=
if strings.HasSuffix(unitName, ".slice") {
// This was broken until systemd v229, but has been back-ported on RHEL environments >= 219
Copy link
Member

Choose a reason for hiding this comment

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

possibly notable change opencontainers/runc#2117

Transient units (and transient slice units) have been available for quite a long time and RHEL 7 with systemd v219 (likely the oldest OS we care about at this point) supports that. A system running a systemd without these features is likely to break a lot of other stuff that runc/libcontainer care about.

if hasDelegateSlice {
// systemd 237 and above no longer allows delegation on a slice
properties = append(properties, newProp("Delegate", true))
}
Copy link
Member

Choose a reason for hiding this comment

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

possibly notable change opencontainers/runc#2117

Regarding delegated slices, modern systemd doesn't allow it and runc/libcontainer run fine on it, so we might as well just stop requesting it on older versions of systemd which allowed it. (Those versions never really changed behavior significantly when that option was passed anyways.)

@carlosedp
Copy link
Contributor Author

Any idea on why the failing tests @BenTheElder ?

@BenTheElder
Copy link
Member

BenTheElder commented Sep 4, 2019

go: finding github.com/urfave/cli v1.21.0
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
Skipping golang.org/x/... dependencies, pass --all to include

Use the given commands to remove pinned module versions that aren't actually used:
GO111MODULE=on go mod edit -dropreplace github.com/urfave/cli

https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/82349/pull-kubernetes-dependencies/1169375978296709121

@carlosedp
Copy link
Contributor Author

/retest

@carlosedp
Copy link
Contributor Author

Now it's GTG @BenTheElder :) Let's ping the approvers.

@fedebongio
Copy link
Contributor

/cc @liggitt

@BenTheElder
Copy link
Member

I spoke to the upstream author re opencontainers/runc#2117 and in theory no supported distros should have systemd old enough for this to be a problem.

Still might be release note worthy.
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 5, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BenTheElder, carlosedp
To complete the pull request process, please assign lavalamp
You can assign the PR to them by writing /assign @lavalamp in a comment when ready.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@carlosedp
Copy link
Contributor Author

/assign @lavalamp

@carlosedp
Copy link
Contributor Author

/kind cleanup

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 10, 2019
@@ -422,7 +422,7 @@ replace (
golang.org/x/net => golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc
golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
golang.org/x/sync => golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
golang.org/x/sys => golang.org/x/sys v0.0.0-20190209173611-3b5209105503
Copy link
Member

Choose a reason for hiding this comment

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

we were intentionally pinned to 3b52091 because it is the branch matching our current version of go (https://github.com/golang/sys/commits/release-branch.go1.12). I would expect us to stay on that revision until we move to go 1.13, and then move to the https://github.com/golang/sys/commits/release-branch.go1.13 branch unless there's a compelling reason to move away from the go team's maintained release branches.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Commit 3b52091 still doesn't have support for Risc-V. The earliest commit that has the support and fixes is golang/sys@9eafafc. I checked that x/sys release branch 1.13 already has this.
What's the plans on moving to Go 1.13?

Copy link
Member

Choose a reason for hiding this comment

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

What's the plans on moving to Go 1.13?

Tracked in #82531, planned for 1.17, but not as trivial a move as previous go version bumps

Copy link
Member

Choose a reason for hiding this comment

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

go1.13 support landed in #82809

@liggitt
Copy link
Member

liggitt commented Sep 12, 2019

rebasing on master now that #82342 has merged will shrink the size of this

cc @kubernetes/sig-node-pr-reviews for runc bump approval

unless there's a compelling reason not to, I'd expect us to stay on the versions of golang.org/x/... dependencies that match our go version (#82349 (comment))

@carlosedp
Copy link
Contributor Author

Folks, let me know whenever I should rebase this to be merged.
Thanks!

@liggitt
Copy link
Member

liggitt commented Nov 26, 2019

Rebasing on master should shrink the size of this. I still would not expect to run ahead of our go release for golang.org/x/sys unless there was a strong reason to do so. Is there a discussion around prioritization of adding support for this architecture that I'm missing?

@carlosedp
Copy link
Contributor Author

carlosedp commented Nov 26, 2019

No priorization on the arch. I've been building the packages locally and applying changes. I'll demo K8s on Risc-V arch on the Risc-V Summit now in december so I came to check the status.

K8s 1.17 will be built with 1.13 already?

@carlosedp
Copy link
Contributor Author

@liggitt I've just checked the commits below and they have already bumped up the dependencies on master. I believe 1.18 will be cut from this, right?

660b17d
708a917

With this, I believe this PR can be closed.

@liggitt
Copy link
Member

liggitt commented Nov 27, 2019

1.17 will be cut with go1.13
1.18 will be cut from what is in master

@carlosedp
Copy link
Contributor Author

Hi @liggitt , I've just built K8s with latest master and it worked fine. All libraries have been bumped. I need to update hack/lib/golang.sh adding riscv64 to the list of architectures so make all KUBE_BUILD_PLATFORMS=linux/riscv64 works fine. I'll submit another PR and close this, ok?

@liggitt
Copy link
Member

liggitt commented Nov 29, 2019

I'm unsure of all the considerations for supporting a new architecture… does that mean we claim test/support for it?

@dims
Copy link
Member

dims commented Nov 30, 2019

@liggitt we already support builds for ppc64le, s390x etc and we don't claim "support" for those arches. so this would be similar to those i think

@carlosedp
Copy link
Contributor Author

Exactly, It's not claiming support or officially providing images right now but the ability to correctly build the packages using official pipeline and scripts.

@liggitt
Copy link
Member

liggitt commented Dec 2, 2019

Exactly, It's not claiming support or officially providing images right now but the ability to correctly build the packages using official pipeline and scripts.

Ok. I'll defer to the owners of those build/release scripts for approval on the follow up PR.

@BenTheElder
Copy link
Member

Hi @liggitt , I've just built K8s with latest master and it worked fine. All libraries have been bumped. I need to update hack/lib/golang.sh adding riscv64 to the list of architectures so make all KUBE_BUILD_PLATFORMS=linux/riscv64 works fine. I'll submit another PR and close this, ok?

👍, happy to review this

@carlosedp
Copy link
Contributor Author

Latest master branch builds correctly on riscv64.

@BenTheElder I've opened #86011 to address the build script.

Closing this.

@carlosedp carlosedp closed this Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubectl area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants