Skip to content

Replace swarm Capabilites API with cap add/drop API#41249

Merged
thaJeztah merged 2 commits intomoby:masterfrom
cpuguy83:swarm_caps
Jul 27, 2020
Merged

Replace swarm Capabilites API with cap add/drop API#41249
thaJeztah merged 2 commits intomoby:masterfrom
cpuguy83:swarm_caps

Conversation

@cpuguy83
Copy link
Member

Replace service "Capabilities" w/ add/drop API

After dicussing with maintainers, it was decided putting the burden of
providing the full cap list on the client is not a good design.
Instead we decided to follow along with the container API and use cap
add/drop.

This brings in the changes already merged into swarmkit.

This picks up the API changes for cap add/drop for services.

Signed-off-by: Brian Goff <[email protected]>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@olljanat
Copy link
Contributor

SGTM

@thaJeztah
Copy link
Member

Looks like compile is failing;


[2020-07-25T07:30:40.510Z] daemon/oci_windows.go:393:45: too many arguments in call to caps.TweakCapabilities
[2020-07-25T07:30:40.510Z] daemon/oci_windows.go:393:129: c.HostConfig.Capabilities undefined (type *"github.com/docker/docker/api/types/container".HostConfig has no field or method Capabilities)

@thaJeztah thaJeztah added status/2-code-review status/failing-ci Indicates that the PR in its current state fails the test suite labels Jul 25, 2020
@thaJeztah thaJeztah removed the status/failing-ci Indicates that the PR in its current state fails the test suite label Jul 27, 2020
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

(spotted one typo, but not a blocker)

After dicussing with maintainers, it was decided putting the burden of
providing the full cap list on the client is not a good design.
Instead we decided to follow along with the container API and use cap
add/drop.

This brings in the changes already merged into swarmkit.

Signed-off-by: Brian Goff <[email protected]>
@thaJeztah
Copy link
Member

Sigh

[2020-07-27T17:20:11.681Z] go: extracting gotest.tools/gotestsum v0.3.5
[2020-07-27T17:22:54.030Z] verifying gopkg.in/gemnasium/[email protected]/go.mod: gopkg.in/gemnasium/[email protected]/go.mod: Get https://sum.golang.org/lookup/gopkg.in/gemnasium/[email protected]: read tcp 172.21.183.185:49160->216.58.195.81:443: wsarecv: An existing connection was forcibly closed by the remote host.
[2020-07-27T17:22:54.030Z] verifying github.com/mattn/[email protected]/go.mod: github.com/mattn/[email protected]/go.mod: reading https://sum.golang.org/lookup/github.com/mattn/[email protected]: read tcp 172.21.183.185:49160->216.58.195.81:443: wsarecv: An existing connection was forcibly closed by the remote host.
[2020-07-27T17:22:54.030Z] verifying github.com/stretchr/[email protected]/go.mod: github.com/stretchr/[email protected]/go.mod: Get https://sum.golang.org/lookup/github.com/stretchr/[email protected]: read tcp 172.21.183.185:49160->216.58.195.81:443: wsarecv: An existing connection was forcibly closed by the remote host.

@thaJeztah
Copy link
Member

Looks like this one is flaky again

=== RUN   TestDockerSuite/TestLogsFollowSlowStdoutConsumer
    --- FAIL: TestDockerSuite/TestLogsFollowSlowStdoutConsumer (1.58s)
        docker_cli_logs_test.go:243: assertion failed: error is not nil: exit status 1

@thaJeztah
Copy link
Member

All green now

@thaJeztah thaJeztah merged commit b36e87a into moby:master Jul 27, 2020
thaJeztah added a commit to thaJeztah/cli that referenced this pull request Jul 28, 2020
full diff: http://github.com/docker/docker/compare/78e6ffd279b627ebba046b9675ff4849091d9cc3...0f41a77c6993ade605a639fb25994cfe5e1b3fe8

Relevant changes:

- moby/moby#41234 vendor: update buildkit to 4d1f260e8
- various updates to swagger files
- moby/moby#41249 Replace swarm Capabilites API with cap add/drop API
    - updates swarmkit to 035d564a3686f5e348d861ec0c074ff26854c498
- moby/moby#41254 Deprecate KernelMemory

Signed-off-by: Sebastiaan van Stijn <[email protected]>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request Jul 29, 2020
full diff: http://github.com/docker/docker/compare/78e6ffd279b627ebba046b9675ff4849091d9cc3...0f41a77c6993ade605a639fb25994cfe5e1b3fe8

Relevant changes:

- moby/moby#41234 vendor: update buildkit to 4d1f260e8
- various updates to swagger files
- moby/moby#41249 Replace swarm Capabilites API with cap add/drop API
    - updates swarmkit to 035d564a3686f5e348d861ec0c074ff26854c498
- moby/moby#41254 Deprecate KernelMemory

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Upstream-commit: 097d57314d12c5b2b8dd267353172e51948a25f1
Component: cli
akerouanton pushed a commit to akerouanton/cli that referenced this pull request Jul 29, 2020
full diff: http://github.com/docker/docker/compare/78e6ffd279b627ebba046b9675ff4849091d9cc3...0f41a77c6993ade605a639fb25994cfe5e1b3fe8

Relevant changes:

- moby/moby#41234 vendor: update buildkit to 4d1f260e8
- various updates to swagger files
- moby/moby#41249 Replace swarm Capabilites API with cap add/drop API
    - updates swarmkit to 035d564a3686f5e348d861ec0c074ff26854c498
- moby/moby#41254 Deprecate KernelMemory

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@dmandalidis
Copy link
Contributor

Placing a note here for anyone falling into this (like me). HostConfig.Capabilities (at least) were released with v1.40, therefore completely dropping them in favour of capAdd/capDrop didn't follow the usual deprecation process. Not a big deal, but I believe that this change was done under the impression that HostConfig.Capabilities were not released at all and their removal wouldn't break anyone. I guess this is also the reason that such change wasn't documented in the release notes of v1.41.

dmandalidis added a commit to dmandalidis/docker-client that referenced this pull request Dec 27, 2020
dmandalidis added a commit to dmandalidis/docker-client that referenced this pull request Dec 27, 2020
dmandalidis added a commit to dmandalidis/docker-client that referenced this pull request Dec 27, 2020
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.

6 participants