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

kubectl 1.6.0-beta.1 is twice the size of kubectl-1.5.3 #42573

Closed
justinsb opened this issue Mar 6, 2017 · 18 comments
Closed

kubectl 1.6.0-beta.1 is twice the size of kubectl-1.5.3 #42573

justinsb opened this issue Mar 6, 2017 · 18 comments
Labels
area/kubectl priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@justinsb
Copy link
Member

justinsb commented Mar 6, 2017

Comparing sizes indicates the size has gone from 49MB => 114MB. Did we change the compilation options? Do the betas ship with more debug options enabled?

>  wget https://storage.googleapis.com/kubernetes-release/release/v1.5.3/bin/linux/amd64/kubectl -O kubectl-1.5.3
> wget https://storage.googleapis.com/kubernetes-release/release/v1.6.0-beta.1/bin/linux/amd64/kubectl -O kubectl-1.6.0-beta.1

> ls -lh
-rw-r--r-- 1 justinsb justinsb  49M Feb 15 03:51 kubectl-1.5.3
-rw-r--r-- 1 justinsb justinsb 114M Mar  2 18:57 kubectl-1.6.0-beta.1
@nikhiljindal nikhiljindal added this to the v1.6 milestone Mar 6, 2017
@ixdy
Copy link
Member

ixdy commented Mar 7, 2017

Looks like the 1.6.0-beta.0 kubectl was only 66M, which is a more justifiable increase (though still a lot).

Between 1.6.0-beta.0 and 1.6.0-beta.1 we went from go1.7.4 to go1.7.5.

@ixdy
Copy link
Member

ixdy commented Mar 8, 2017

OK, it is not due to the golang version bump:

$ _output/bin/kubectl version --client
Client Version: version.Info{Major:"1", Minor:"7+", GitVersion:"v1.7.0-alpha.0.936+d6ae61c3c9b102", GitCommit:"d6ae61c3c9b10265f29ea9963e76b90768e4739d", GitTreeState:"clean", BuildDate:"2017-03-08T00:08:30Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
$ du -h _output/bin/kubectl
114M    _output/bin/kubectl

@ixdy
Copy link
Member

ixdy commented Mar 8, 2017

Happened between https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-build-1.6/3?log#log and https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-build-1.6/4?log#log:

I0228 23:24:12.490]   66.1 MiB  2017-03-01T07:23:31Z  gs://kubernetes-release-dev/ci/v1.6.0-beta.0.525+b877536df3c6f2/bin/linux/amd64/kubectl
I0301 14:56:35.981] 112.94 MiB  2017-03-01T22:55:54Z  gs://kubernetes-release-dev/ci/v1.6.0-beta.0.640+30dd66013dd0d3/bin/linux/amd64/kubectl

So something in b877536...30dd660.
I'm digging in the CI build artifacts for master (gs://kubernetes-release-dev/ci/v1.7.0-alpha.0.*) to find a more specific commit.

@ixdy
Copy link
Member

ixdy commented Mar 8, 2017

Search complete.

  70400990  2017-03-01T18:57:17Z  gs://kubernetes-release-dev/ci/v1.7.0-alpha.0.629+c713ef434d05a5/bin/linux/amd64/kubectl
 118424917  2017-03-01T19:55:15Z  gs://kubernetes-release-dev/ci/v1.7.0-alpha.0.635+cdf0cae9e4d604/bin/linux/amd64/kubectl

New smaller range: c713ef4...cdf0cae

@liggitt
Copy link
Member

liggitt commented Mar 8, 2017

c713ef4...cdf0cae#diff-095754adfdcb15cae5584c79c20510e0 massively increases the import tree of the apiserver

@ixdy
Copy link
Member

ixdy commented Mar 8, 2017

Pretty sure #41906 is to blame. The artifacts from a PR test build on that PR confirm:

$ gsutil ls -lh gs://kubernetes-release-dev/ci/v1.7.0-alpha.0.203+834ae0df9d012d*/bin/linux/amd64/kubectl
111.24 MiB  2017-02-25T03:04:54Z  gs://kubernetes-release-dev/ci/v1.7.0-alpha.0.203+834ae0df9d012d-pull-gke/bin/linux/amd64/kubectl

@gnufied @rootfs @saad-ali @smarterclayton is this expected?

@ixdy
Copy link
Member

ixdy commented Mar 8, 2017

@kubernetes/release-team fyi

@smarterclayton
Copy link
Contributor

smarterclayton commented Mar 8, 2017 via email

@smarterclayton smarterclayton added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Mar 8, 2017
@gnufied
Copy link
Member

gnufied commented Mar 8, 2017

I am looking at options what we can do. The reason volume plugins are getting imported in api server is because - we wanted to do a creation time validation of PVs and whether underlying volume plugin supports mount options (there are many that don't).

@smarterclayton
Copy link
Contributor

smarterclayton commented Mar 8, 2017 via email

@gnufied
Copy link
Member

gnufied commented Mar 8, 2017

There are couple of options I am thinking:

  1. Define new subpackage that contains PV validation code and plugin imports and directly call that function via https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/core/persistentvolume/strategy.go#L56 hooks. These are the entry points from where validation.ValidateXXX methods are called anyways.

  2. We can drop creation time validation of mount options for PVs altogether.

I am thinking I will go with option#1 and open a follow up PR.

@gnufied
Copy link
Member

gnufied commented Mar 8, 2017

@smarterclayton I still don't quite get what you mean by we can't have "dynamic" plugins in the API. These volume plugins aren't dynamic and they don't change API interface in anyway. The mount option is merely an annotation .The only thing they can "potentially" change is - whether a PV type will accept mount options or not.

Having said that, I didn't expect kubectl to import api/validation. :(
I looked at decoupling validations required in CLI and validation required in server side. They seem to be tangled and any such refactoring will require larger work.

@smarterclayton
Copy link
Contributor

smarterclayton commented Mar 8, 2017 via email

@saad-ali
Copy link
Member

saad-ali commented Mar 8, 2017

@gnufied Let's drop creation time validation of mount options for PVs for this (1.6) release, that'll get rid of the dependencies in API server, and open an issue to reimplement them without importing the full dependency tree in v1.7 (as @smarterclayton suggested, maybe multiple packages, we'll need to think about it).

@gnufied
Copy link
Member

gnufied commented Mar 8, 2017

Okay I have removed creation time validation of mount options for now - #42706

Follow up issue is here for 1.7 - #42707 . @saad-ali please assign the issue to me.

@calebamiles
Copy link
Contributor

Added your PR to the 1.6 milestone @gnufied.

cc: @ethernetdan, @kubernetes/release-team, @kubernetes/kubernetes-release-managers

@gnufied
Copy link
Member

gnufied commented Mar 9, 2017

@calebamiles thank you.

Just to make it clearer, I have opened two PRs to fix this problem.

  1. Either - Remove mount option validation #42706 -- which simply drops creation time validation of mount options to avoid referring volume plugins in pkg/api/validation.
  2. Or - Extract mount option pv validation in its own package #42750 -- which splits the packaging such that, mount option validation is removed from pkg/api/validation. We are still doing the validation of mount options when user tries to create PV but we do this via new package.

Spoke with @saad-ali about this. My preference would be to merge #42750 since this way we still get to keep the validation. Waiting for approval from @smarterclayton @justinsb @liggitt

k8s-github-robot pushed a commit that referenced this issue Mar 10, 2017
Automatic merge from submit-queue (batch tested with PRs 42811, 42859)

 Validation PVs for mount options

We are going to move the validation in its own package and we will be calling validation for individual volume types as needed.

Fixes #42573
@gnufied
Copy link
Member

gnufied commented Mar 10, 2017

We ended up not merging both of above PRs, but we merged third PR I made for fixing same problem - #42811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

8 participants