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

Remove initial docker unit #1851

Merged
merged 2 commits into from
Aug 21, 2017
Merged

Remove initial docker unit #1851

merged 2 commits into from
Aug 21, 2017

Conversation

r2d4
Copy link
Contributor

@r2d4 r2d4 commented Aug 20, 2017

Fixes #1811

This delete the default docker configuration in the minikube iso. This should slightly decrease start time. I ran into #1811 when caching images.

I've also cherry picked ff2667f, since that seems to fix all the flakiness we've been seeing with the integration tests.

Summaries from the commits:

The docker daemon initially starts up in the ISO, only to be stopped
and replaced by minikube's custom configuration. This removes the
initial unit, so that docker doesn't automatically start up until
minikube restarts it with its configuration.

Rewrite configureAuth

The current implementation assumes that we already have docker running.
This switches it to not remove any previous docker configuration
(since there isn't any), and uses our native file transfer utils
instead of the printf commands.

Also, the CopyLocal function can be deleted and the bootstrapper.ExecRunner.Copy can be used. Its included since the CommandRunner isn't merged yet.

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

codecov-io commented Aug 20, 2017

Codecov Report

Merging #1851 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1851      +/-   ##
==========================================
- Coverage   36.27%   36.25%   -0.03%     
==========================================
  Files          51       51              
  Lines        3462     3462              
==========================================
- Hits         1256     1255       -1     
- Misses       2023     2024       +1     
  Partials      183      183
Impacted Files Coverage Δ
pkg/util/kubeconfig/config.go 46.93% <0%> (-0.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a0f0121...0db44af. Read the comment docs.

Makefile Outdated
@@ -95,7 +95,7 @@ out/localkube: $(shell $(LOCALKUBEFILES))
ifeq ($(LOCALKUBE_BUILD_IN_DOCKER),y)
$(KUBE_CROSS_DOCKER_CMD) make $@
else
CGO_ENABLED=1 go build -tags static_build,netgo -ldflags=$(LOCALKUBE_LDFLAGS) -o $(BUILD_DIR)/localkube ./cmd/localkube
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this has your netgo removal commit as well, want to merge that then rebase this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep that was the plan

@@ -205,3 +205,30 @@ func MaybeChownDirRecursiveToMinikubeUser(dir string) error {
}
return nil
}

func CopyFile(src, dst string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have anything for copying already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually we have CopyFileLocal. I'll use that. This was just cherry-picked from an old branch

return errors.Wrap(err, "error getting ip during provisioning")
}

if err := util.CopyFile(authOptions.CaCertPath, filepath.Join(authOptions.StorePath, "ca.pem")); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you put these into a loop[ going over the map you have on 229 somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, I think that was the point of the map down there anyways. I'll change that

The docker daemon initially starts up in the ISO, only to be stopped
and replaced by minikube's custom configuration.  This removes the
initial unit, so that docker doesn't automatically start up until
minikube restarts it with its configuration.
The current implementation assumes that we already have docker running.
 This switches it to not remove any previous docker configuration
(since there isn't any), and uses our native file transfer utils
instead of the printf commands.
@r2d4 r2d4 mentioned this pull request Aug 21, 2017
@r2d4
Copy link
Contributor Author

r2d4 commented Aug 21, 2017

@minikube-bot retest this please

@r2d4 r2d4 merged commit f995dce into kubernetes:master Aug 21, 2017
@r2d4 r2d4 deleted the docker-start-once branch August 21, 2017 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker daemon configuration disappears
4 participants