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

Disallow using legacy (V1) registries #35751

Merged
merged 1 commit into from Dec 11, 2017

Conversation

Projects
None yet
5 participants
@thaJeztah
Member

thaJeztah commented Dec 8, 2017

Interacting with v1 registries was deprecated in Docker 1.8.3, disabled by default
in Docker 17.06, and scheduled for removal in Docker 17.12.

This patch disallows enabling V1 registry through the --disable-legacy-registry
option, and the "disable-legacy-registry": false option in the daemon configuration
file. The actual V1 registry code is still in place, and will be removed separately.

With this patch applied:

$ dockerd --disable-legacy-registry=false
ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported

Or, when setting through the daemon.json configuration file

$ mkdir -p /etc/docker/
$ echo '{"disable-legacy-registry":false}' > /etc/docker/daemon.json
$ dockerd
ERROR: The 'disable-legacy-registry' configuration option has been removed. Interacting with legacy (v1) registries is no longer supported

This is a smaller patch than #35479, which requires additional review.

- Description for the changelog

* Remove support for legacy (v1) registries. Support for v1 registries was deprecated in docker 1.8, disabled by default in docker 17.06, and is now removed. [moby/moby#35751](https://github.com/moby/moby/pull/35751)
Disallow using legacy (V1) registries
Interacting with v1 registries was deprecated in Docker 1.8.3, disabled by default
in Docker 17.06, and scheduled for removal in Docker 17.12.

This patch disallows enabling V1 registry through the `--disable-legacy-registry`
option, and the `"disable-legacy-registry": false` option in the daemon configuration
file. The actual V1 registry code is still in place, and will be removed separately.

With this patch applied:

    $ dockerd --disable-legacy-registry=false
    ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported

Or, when setting through the `daemon.json` configuration file

    $ mkdir -p /etc/docker/
    $ echo '{"disable-legacy-registry":false}' > /etc/docker/daemon.json
    $ dockerd
    ERROR: The 'disable-legacy-registry' configuration option has been removed. Interacting with legacy (v1) registries is no longer supported

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Dec 9, 2017

Member

hmf forgot to remove some of the tests; updated

Member

thaJeztah commented Dec 9, 2017

hmf forgot to remove some of the tests; updated

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Dec 9, 2017

Member

experimental is a flaky test; #23516

11:37:09 ----------------------------------------------------------------------
11:37:09 FAIL: docker_api_swarm_node_test.go:76: DockerSwarmSuite.TestAPISwarmNodeDrainPause
11:37:09 
11:37:09 [d80827dac28d1] waiting for daemon to start
11:37:09 [d80827dac28d1] daemon started
11:37:09 
11:37:09 [d91ac5a1c8813] waiting for daemon to start
11:37:09 [d91ac5a1c8813] daemon started
11:37:09 
11:37:09 docker_api_swarm_node_test.go:105:
11:37:09     waitAndAssert(c, defaultReconciliationTimeout*2, reducedCheck(sumAsIntegers, d1.CheckActiveContainerCount, d2.CheckActiveContainerCount), checker.Equals, instances)
11:37:09 docker_utils_test.go:465:
11:37:09     c.Assert(v, checker, args...)
11:37:09 ... obtained int = 2
11:37:09 ... expected int = 1
11:37:09 ... output: "1db9f3ea5a76\n9bc28e19a80a\n"
11:37:09 
11:37:09 [d80827dac28d1] exiting daemon
11:37:09 [d91ac5a1c8813] exiting daemon
Member

thaJeztah commented Dec 9, 2017

experimental is a flaky test; #23516

11:37:09 ----------------------------------------------------------------------
11:37:09 FAIL: docker_api_swarm_node_test.go:76: DockerSwarmSuite.TestAPISwarmNodeDrainPause
11:37:09 
11:37:09 [d80827dac28d1] waiting for daemon to start
11:37:09 [d80827dac28d1] daemon started
11:37:09 
11:37:09 [d91ac5a1c8813] waiting for daemon to start
11:37:09 [d91ac5a1c8813] daemon started
11:37:09 
11:37:09 docker_api_swarm_node_test.go:105:
11:37:09     waitAndAssert(c, defaultReconciliationTimeout*2, reducedCheck(sumAsIntegers, d1.CheckActiveContainerCount, d2.CheckActiveContainerCount), checker.Equals, instances)
11:37:09 docker_utils_test.go:465:
11:37:09     c.Assert(v, checker, args...)
11:37:09 ... obtained int = 2
11:37:09 ... expected int = 1
11:37:09 ... output: "1db9f3ea5a76\n9bc28e19a80a\n"
11:37:09 
11:37:09 [d80827dac28d1] exiting daemon
11:37:09 [d91ac5a1c8813] exiting daemon
@boaz1337

LGTM 🥇

@dnephin

LGTM

@vieux

vieux approved these changes Dec 11, 2017

LGTM

@vieux vieux merged commit 549a2b9 into moby:master Dec 11, 2017

5 of 6 checks passed

experimental Jenkins build Docker-PRs-experimental 38334 has failed
Details
dco-signed All commits are signed
janky Jenkins build Docker-PRs 47069 has succeeded
Details
powerpc Jenkins build Docker-PRs-powerpc 7446 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 18585 has succeeded
Details
z Jenkins build Docker-PRs-s390x 7270 has succeeded
Details

@thaJeztah thaJeztah deleted the thaJeztah:disallow-v1-registries branch Dec 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment