Skip to content

Conversation

luxas
Copy link
Member

@luxas luxas commented Mar 16, 2016

@k8s-bot
Copy link

k8s-bot commented Mar 16, 2016

GCE e2e build/test failed for commit 66751b4bb050120ac8ef4ccce6e8bb75768a6ff9.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@luxas luxas force-pushed the auto_arch_pause branch from 66751b4 to a6368c1 Compare March 16, 2016 17:13
@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 16, 2016
@k8s-github-robot
Copy link

Labelling this PR as size/S

if runtime.GOARCH == "amd64" {
return DefaultPodInfraContainerImageName + ":" + DefaultPodInfraContainerImageVersion
} else {
return DefaultPodInfraContainerImageName + "-" + runtime.GOARCH + ":" + DefaultPodInfraContainerImageVersion
Copy link
Member

Choose a reason for hiding this comment

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

I know this pattern was not introduced here but I'm confused as to why we have been putting arch in the image name and not the build tag. It seems like it should be:

gcr.io/google_containers/hyperkube:v1.1.8
gcr.io/google_containers/hyperkube:v1.1.8-386
gcr.io/google_containers/hyperkube:v1.1.8-amd64
gcr.io/google_containers/hyperkube:v1.1.8-arm
gcr.io/google_containers/hyperkube:v1.2.0
gcr.io/google_containers/hyperkube:v1.2.0-386
gcr.io/google_containers/hyperkube:v1.2.0-amd64
gcr.io/google_containers/hyperkube:v1.2.0-arm

Copy link
Member Author

Choose a reason for hiding this comment

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

Ask @brendandburns :)
I'm just following the conventions, but I do prefer binary-arch:version too, and it's implemented at quite many places atm.
I think we should go with that, but that's just my opinion :)

Copy link
Member

Choose a reason for hiding this comment

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

I'll try to convince @david-mcmahon next time i see him :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Haha, make sure to have an issue or something if you're planning to change that, so you're listening to the community :)

However, the important thing is consistency. We must choose either and go with that all the time. binary-arch:version is already implemented in the codebase and for example arm images are pushed with every release with binary-arch:version naming, so I don't know if it's worth the effort to change.

Copy link
Member

Choose a reason for hiding this comment

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

I think our consistent should be consistent with other projects. Multi architecture support is recent enough IMO that we could still change it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's work in progress. Images like etcd, hyperkube, kube-proxy are turned into etcd-amd64, hyperkube-amd64 and kube-proxy-amd64. The older naming convention (hyperkube is kept for backwards-compability for a while though)

Copy link
Contributor

Choose a reason for hiding this comment

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

@mikedanese What do you have to convince me of? I wasn't involved in any of this naming. My general guidance here is to follow a (sane) precedent and to be consistent with other projects.

Copy link
Member Author

Choose a reason for hiding this comment

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

So do you vote for binary-arch:version or binary:version-arch?
And no, you weren't involved in the naming, but now you are :)

Copy link
Contributor

Choose a reason for hiding this comment

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

What is typical for docker containers / other projects?

Copy link
Member Author

Choose a reason for hiding this comment

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

Docker at least uses armhf/, armel/, ppc64le/ and so on for the "official" images.
Not sure if that's related to this, but anyway

@k8s-bot
Copy link

k8s-bot commented Mar 16, 2016

GCE e2e build/test passed for commit a6368c13fd842401cee54f6ebd596a97ad62a4cb.

@luxas
Copy link
Member Author

luxas commented Mar 16, 2016

As #15140 points out, there is many places where the pause image should be standardized and there should be a constant somewhere that the whole codebase should use, but let's take one problem at a time.

// system default DNS resolver configuration
ResolvConfDefault = "/etc/resolv.conf"

DefaultPodInfraContainerImageName = "gcr.io/google_containers/pause"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I'd prefer this logic staying out of the kubelet package. cmd/kubelet seems like a better location

Copy link
Member

Choose a reason for hiding this comment

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

I agree. we should toggle this when we create the flag so it shows up in --help.

https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/options/options.go#L154

Copy link
Member Author

Choose a reason for hiding this comment

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

So where should I put it? cmd/kubelet/app/constants.go, cmd/kubelet/app/pause.go or cmd/kubelet/app/options/options.go, which do you prefer?

Another option would be breaking out all pause constants to some other place not directly tied to kubelet.

@luxas
Copy link
Member Author

luxas commented Mar 24, 2016

@vishh Updated. PTAL

@@ -17,7 +17,7 @@ limitations under the License.
package types

const (
PodInfraContainerImage = "gcr.io/google_containers/pause:2.0"

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Remove this empty line.

@k8s-bot
Copy link

k8s-bot commented Mar 24, 2016

GCE e2e build/test passed for commit b6f0da976ea49b595c8423c685099c78b77edebe.

@luxas luxas force-pushed the auto_arch_pause branch from b6f0da9 to d8aafd2 Compare March 24, 2016 21:27
@luxas
Copy link
Member Author

luxas commented Mar 24, 2016

@vishh Fixed the nit. Does this look good to you now?

@k8s-bot
Copy link

k8s-bot commented Mar 24, 2016

GCE e2e build/test passed for commit d8aafd222902d33df9edd138482ab723cfdd5cab.

@vishh
Copy link
Contributor

vishh commented Mar 25, 2016

LGTM.

@vishh
Copy link
Contributor

vishh commented Mar 25, 2016

@mikedanese: Do you have any other comments on this PR? If not, this is ready to be merged.

@mikedanese
Copy link
Member

Even though I despise the image naming convention we've settled on (probably decided by brendan and joe years ago), I will most likely survive. lgtm

@mikedanese
Copy link
Member

needs an update-generated-docs to update man pages

@luxas
Copy link
Member Author

luxas commented Mar 25, 2016

hack/update-generated-docs.sh didn't update anything and hack/verify-generated-docs.sh returned Generated docs are up to date..

Should I run something else?

@mikedanese
Copy link
Member

Oops bad guess:

FAIL    k8s.io/kubernetes/pkg/kubelet/dockertools [build failed]

@luxas luxas force-pushed the auto_arch_pause branch from d8aafd2 to c6172e5 Compare March 25, 2016 21:46
@k8s-github-robot
Copy link

Labelling this PR as size/M

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 25, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 25, 2016

GCE e2e build/test passed for commit c6172e5.

@k8s-github-robot
Copy link

The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label?

@luxas
Copy link
Member Author

luxas commented Mar 26, 2016

This works nicely on an ARM host, I tested it now.

$ kubelet --help
...
--pod-infra-container-image="gcr.io/google_containers/pause-arm:2.0": The image whose network/ipc namespaces containers in each pod will use.
...

And it starts pause-arm containers automatically.
On amd64 hosts, the default is still gcr.io/google_containers/pause:2.0 (which probably will be updated to gcr.io/google_containers/pause-amd64:3.0 soon)

@thockin
Copy link
Member

thockin commented Mar 26, 2016

Before we commit this:

Mike,

Why? Can you explain any value or cost to one over the other? To my eyes
foo:1.2-arm and foo:1.3-amd64 are two point releases in the same series (as
per semver-ish semantics). That's wrong. OTOH foo-arm:1.2 and
foo-amd64:1.2 are clearly apples and oranges. I still dislike the ad-hoc
nature of it.

Are there any other projects with multi-arch outputs? What are they
doing? What is Docker itself doing?
On Mar 25, 2016 11:11 AM, "Mike Danese" notifications@github.com wrote:

Even though I despise the image naming convention we've settled on
(probably decided by brendan and joe years ago), I will most likely
survive. lgtm


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#23059 (comment)

@luxas
Copy link
Member Author

luxas commented Mar 26, 2016

Are there any other projects with multi-arch outputs?

I'm sorry but I don't think there is any other large open-source Go project that is multiarch and comparable to Kubernetes.
Sample Github search

What is Docker itself doing?

moby/moby#8256

@thockin
Copy link
Member

thockin commented Mar 26, 2016

From that docker issue, do I understand that it is largely undecided yet?

I personally think arch has higher precedence than version, so given only
two fields (name and version) this belongs in the name.
On Mar 26, 2016 2:14 PM, "Lucas Käldström" notifications@github.com wrote:

Are there any other projects with multi-arch outputs?

I'm sorry but I don't think there is any other large open-source Go
project that is multiarch and compareable to Kubernetes.
Sample Github search
https://github.com/search?l=&o=desc&q=language%3AGo&ref=advsearch&s=stars&type=Repositories&utf8=%E2%9C%93

What is Docker itself doing?

moby/moby#8256 moby/moby#8256


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#23059 (comment)

@luxas
Copy link
Member Author

luxas commented Mar 27, 2016

Yes, I also see it as largely undecided, and I think it will take a while before docker really implement something usable.

I think these images should be multiarch primarily:
Get docker-multinode working:

Get DNS working:

Docker wrapped Kubernetes binaries:

I worked with the dashboard team, and it has had multiarch support from the first release.
I'm maybe gonna add multiarch support for official heapster too, now when it has reached v1.
On kubernetes-on-arm, I already have heapster, influxdb and grafana nicely running as a cluster addon.

When we once has ported Kubernetes to ARM and decided about the naming, it's much easier to add support for ARM 64-bit, ppc64le and maybe some other arch, who knows?

@luxas
Copy link
Member Author

luxas commented Mar 29, 2016

@thockin @mikedanese @vishh Can we proceed with this one?
This PR isn't that tightly integrated with the naming as it uses two already existing images as the default (pause and pause-arm)
It this ok?

@vishh
Copy link
Contributor

vishh commented Mar 29, 2016

LGTM

@vishh
Copy link
Contributor

vishh commented Mar 29, 2016

@thockin

I personally think arch has higher precedence than version, so given only
two fields (name and version) this belongs in the name.

+1

@vishh vishh added lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-merge labels Mar 29, 2016
@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Mar 30, 2016

GCE e2e build/test passed for commit c6172e5.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Mar 30, 2016

GCE e2e build/test passed for commit c6172e5.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

9 participants