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 DOCKER_HTTP_HOST_COMPAT env var #22888

Merged
merged 1 commit into from May 26, 2016
Merged

Conversation

ibuildthecloud
Copy link
Contributor

@ibuildthecloud ibuildthecloud commented May 22, 2016

The whole go 1.6 breaking clients issue is a bit near and dear to my heart. I've been playing whack-a-mole over the past month or so dealing with distros breaking old clients. I'm glad to see the hack got merged, but disabling it by default really doesn't help.

First, before if you built docker wrong it would not work with old clients. Now by default docker doesn't work with old clients unless you know the magic env var. This is a terrible user experience but the key thing is that docker is by default incompatible with old clients.

Second, for those crying "technical debt! technical debt!" Introducing a env var is far worse debt because this is a public interface. Distros will have to set this env var. I know Ubuntu already backported the hack, and other distros are doing the same. So supporting old clients is important enough to them so they will set the env var. This is the type of thing 5 years later when you don't need the env var anymore it will still be in scripts and documentation because nobody really knows what it does and is afraid to remove it.

Third, one code path is better than two. If there is ever a bug caused by the hack it is not an obvious thing to consider if this env var is set or not. This is just yet another variable to consider, another thing to ask a user if X is set or not, etc.

Finally, once 1.12 ships my whack-a-mole will change from "don't compile with 1.6" to "set DOCKER_HTTP_HOST_COMPAT=1." This does not make me happy.

I really think the key point is that we are consciously choosing the purity of our code over user experience. And that is bad.

Signed-off-by: Darren Shepherd <darren@rancher.com>
@thaJeztah
Copy link
Member

ping @docker/core-engine-maintainers

@cpuguy83
Copy link
Member

In this case user experience is limited to a very specific case, and introducing this hack to the general public is far more likely to cause issues.

@ibuildthecloud
Copy link
Contributor Author

@cpuguy83 you will support and fix the hack regardless. You're just making support harder for yourself. Make it the only option until older client are officially not supported.

@cpuguy83
Copy link
Member

@ibuildthecloud Again, the number of users who need this hack is so small, it makes no sense to turn this on by default, especially with how much this potentially impacts performance (no connection re-use, extra allocation per request).

@mlaventure
Copy link
Contributor

I don't think we should make it the default either, especially since as time goes by this issue will be less and less likely to present itself as people update docker.

@ibuildthecloud
Copy link
Contributor Author

@cpuguy83 @mlaventure You guys are really missing the point. You have made the situation worse. Before you had to go out of your way to break old clients. Now with 1.12 you will break old clients by default. You're making your life more difficult, and mine. Until you declare old Dockers EOL, you should properly support them.

@cpuguy83 The extra allocation should make zero difference in the real world and no connection re-use only applies to old clients.

@crosbymichael
Copy link
Contributor

crosbymichael commented May 24, 2016

I'm with @ibuildthecloud on this one. an env var is pretty bad. As long as we can verify that this is not giving us overhead and everything works we might as well just have some bad code but happy users.

Also, not bad code as in the author wrote bad code, bad code as in its a hack that we wish we didn't have.

@rhatdan
Copy link
Contributor

rhatdan commented May 25, 2016

I am with @ibuildthecloud on this also. I think the Variable is bad.

@cpuguy83
Copy link
Member

@ibuildthecloud Ok, was thinking about this. I see your point.
The overhead is not so bad, and even people that don't need it won't be affected by it anyway.
It'll be good to have this tested before release anyway.

So, I'll go ahead and +1 this.

@runcom
Copy link
Member

runcom commented May 25, 2016

I'd love to remove that variable as well +1 hopefully we could battle test that code during RC

@ibuildthecloud
Copy link
Contributor Author

@runcom Are there any tests that need to be reverted if the env var is removed? Or other code?

@runcom
Copy link
Member

runcom commented May 25, 2016

@ibuildthecloud based on https://github.com/docker/docker/pull/22000/files I don't think so

@LK4D4
Copy link
Contributor

LK4D4 commented May 25, 2016

Ok, let's move it to code-review.
Also, it needs change in docs/breaking_changes.md

@LK4D4
Copy link
Contributor

LK4D4 commented May 25, 2016

LGTM

1 similar comment
@cpuguy83
Copy link
Member

LGTM

@cpuguy83
Copy link
Member

Hmm, actually do you think the CI failures could be from this?

@SvenDowideit
Copy link
Contributor

docs LGTM

@LK4D4
Copy link
Contributor

LK4D4 commented May 25, 2016

@cpuguy83 it might be indeed, but I wonder why only gccgo and userns.

@LK4D4
Copy link
Contributor

LK4D4 commented May 25, 2016

It passed second time :)

@thaJeztah
Copy link
Member

gccgo failed, related? https://jenkins.dockerproject.org/job/Docker-PRs-gccgo/5606/console

05:39:40 ----------------------------------------------------------------------
05:39:40 FAIL: docker_cli_import_test.go:88: TestImportFileWithMessage.pN52_github_com_docker_docker_integration_cli.DockerSuite
05:39:40 
05:39:40 /go/src/github.com/docker/docker/pkg/integration/dockerCmd_utils.go:42:
05:39:40     c.Assert(err, check.IsNil, check.Commentf(quote+"%v"+quote+" failed with errors: %s, %v", strings.Join(args, " "), out, err))
05:39:40 ... value *exec.ExitError = &exec.ExitError{ProcessState:(*os.ProcessState)(0xc2080aefa0)} ("exit status 1")
05:39:40 ... "import -m Testing commit message /tmp/exportImportTest948390921" failed with errors: An error occurred trying to connect: Post http:///go/src/github.com/docker/docker/bundles/1.12.0-dev/test-integration-cli/docker.sock/v1.24/images/create?fromSrc=-&message=Testing+commit+message&repo=&tag=: write unix /go/src/github.com/docker/docker/bundles/1.12.0-dev/test-integration-cli/docker.sock: broken pipe
05:39:40 , exit status 1
05:39:40

restarting

@thaJeztah
Copy link
Member

LGTM (if green)

@LK4D4
Copy link
Contributor

LK4D4 commented May 26, 2016

Merging

@LK4D4 LK4D4 merged commit ef89891 into moby:master May 26, 2016
@runcom
Copy link
Member

runcom commented May 26, 2016

🎉 :)

runcom added a commit to runcom/docker that referenced this pull request Jun 8, 2016
…ents

Upstream reference: moby#22000
Upstream reference: moby#23046
Upstream reference: moby#22888

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
thaJeztah added a commit to thaJeztah/docker that referenced this pull request Jul 18, 2019
This hack was added to fix a compatibility with clients
that were built using Go 1.5 and older (added in 3d6f598)

This hack causes some problems with current clients; with Go 1.5 and older
no longer being supported for some time, and being several years old, it
should now be ok to remove this hack altogether.

People using tools that are built with those versions of Go wouldn't have
updated those for years, and are probably out of date anyway; that's not
something we can continue taking into account.

This will affect docker clients (the docker cli) for docker 1.12 and older.
Those versions have reached EOL a long time ago (and have known unpatched
vulnerabilities), so should no longer be used anyway, but We should add
a nebtuib in the release notes, just in case someone, somewhere, still
has such old tools.

For those affected, using a more recent client (and if needed, setting
the DOCKER_API_VERSION environment variable to the needed API version)
should provide a way out.

This reverts the changes originally made in; moby#22000 and moby#22888,
which were to address moby#20865.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
psftw pushed a commit to psftw/docker that referenced this pull request Jul 23, 2019
This hack was added to fix a compatibility with clients
that were built using Go 1.5 and older (added in 3d6f598)

This hack causes some problems with current clients; with Go 1.5 and older
no longer being supported for some time, and being several years old, it
should now be ok to remove this hack altogether.

People using tools that are built with those versions of Go wouldn't have
updated those for years, and are probably out of date anyway; that's not
something we can continue taking into account.

This will affect docker clients (the docker cli) for docker 1.12 and older.
Those versions have reached EOL a long time ago (and have known unpatched
vulnerabilities), so should no longer be used anyway, but We should add
a nebtuib in the release notes, just in case someone, somewhere, still
has such old tools.

For those affected, using a more recent client (and if needed, setting
the DOCKER_API_VERSION environment variable to the needed API version)
should provide a way out.

This reverts the changes originally made in; moby#22000 and moby#22888,
which were to address moby#20865.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
burnMyDread pushed a commit to burnMyDread/moby that referenced this pull request Oct 21, 2019
This hack was added to fix a compatibility with clients
that were built using Go 1.5 and older (added in 3d6f598)

This hack causes some problems with current clients; with Go 1.5 and older
no longer being supported for some time, and being several years old, it
should now be ok to remove this hack altogether.

People using tools that are built with those versions of Go wouldn't have
updated those for years, and are probably out of date anyway; that's not
something we can continue taking into account.

This will affect docker clients (the docker cli) for docker 1.12 and older.
Those versions have reached EOL a long time ago (and have known unpatched
vulnerabilities), so should no longer be used anyway, but We should add
a nebtuib in the release notes, just in case someone, somewhere, still
has such old tools.

For those affected, using a more recent client (and if needed, setting
the DOCKER_API_VERSION environment variable to the needed API version)
should provide a way out.

This reverts the changes originally made in; moby#22000 and moby#22888,
which were to address moby#20865.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: zach <Zachary.Joyner@linux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants