8000 Bump SwarmKit to f74983e7c015a38a81c8642803a78b8322cf7eac by thaJeztah · Pull Request #36274 · moby/moby · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bump SwarmKit to f74983e7c015a38a81c8642803a78b8322cf7eac #36274

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

Merged
merged 2 commits into from
Feb 15, 2018

Conversation

thaJeztah
Copy link
Member

Full diff:

moby/swarmkit@68a376d...f74983e

ping @anshulpundir @nishanttotla PTAL

- Replace EC Private Key with PKCS#8 PEMs
- Fix IP overlap with empty EndpointSpec
- Add support for Support SCTP port mapping (depends on changes in libnetwork)
- [orchestrator/updater] Do not reschedule tasks if only placement constraints change and are satisfied by the assigned node
- Ensure task reaper stopChan is closed no more than once
- [manager/dispatcher] Synchronization fixes

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

looks like several tests are failing

@thaJeztah
Copy link
Member Author

Failures are due to the changes in moby/swarmkit#2246, so the tests may need some updating. Talked with @cyli on Slack, and she'll assist with updating the tests 👍

@thaJeztah thaJeztah added the status/failing-ci Indicates that the PR in its current state fails the test suite label Feb 12, 2018
@cyli
Copy link
Contributor
cyli commented Feb 12, 2018

@thaJeztah Tested this locally, and the swarm lock/unlock tests that failed all pass with this change:

diff --git a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go
index 283f576f5..4a5ec9a56 100644
--- a/integration-cli/docker_cli_swarm_test.go
+++ b/integration-cli/docker_cli_swarm_test.go
@@ -4,7 +4,6 @@ package main

 import (
        "bytes"
-       "crypto/x509"
        "encoding/json"
        "encoding/pem"
        "fmt"
@@ -25,6 +24,7 @@ import (
        "github.com/docker/libnetwork/driverapi"
        "github.com/docker/libnetwork/ipamapi"
        remoteipam "github.com/docker/libnetwork/ipams/remote/api"
+       "github.com/docker/swarmkit/ca/keyutils"
        "github.com/go-check/check"
        "github.com/gotestyourself/gotestyourself/fs"
        "github.com/gotestyourself/gotestyourself/icmd"
@@ -1007,7 +1007,7 @@ func checkKeyIsEncrypted(d *daemon.Swarm) func(*check.C) (interface{}, check.Com
                        return fmt.Errorf("invalid PEM-encoded private key"), nil
                }

-               return x509.IsEncryptedPEMBlock(keyBlock), nil
+               return keyutils.IsEncryptedPEMBlock(keyBlock), nil
        }
 }

Basically the PKCS8 changes updated the encryption on the keys so that the x509.IsEncryptedPEMBlock may no longer return true because it can't parse the PEM block. The keyutils module in swarmkit can tell whether it's encrypted either way. However, it will return false if it's normal go encrypted in FIPS mode - I'm not sure if that's desirable for this test specifically (it is for the module, because if FIPS mode is enabled everything should be using PKCS8), but the test does not set the FIPS environment variable.

The PKCS8 changes updated the encryption on the keys so that the
`x509.IsEncryptedPEMBlock` may no longer return true because it cannot
parse the PEM block. The `keyutils` module in SwarmKit can tell whether
it is encrypted either way.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah removed the status/failing-ci Indicates that the PR in its current state fails the test suite label Feb 12, 2018
@thaJeztah
Copy link
Member Author

Applied the patch; let's see if CI goes green now 👍

Copy link
Member
@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🐯

Copy link
Member
@cpuguy83 cpuguy83 left a comment

C 8000 hoose a reason for hiding this comment

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

Looks like this patch is pulling in a change from moby/swarmkit#2495 that I'm a bit suspect of. The usage of the waitgroup looks racey on first glance.

// Note that Stop() first does Dispatcher.ctx.cancel() followed by
// shutdownWait.Wait() to make sure new rpc's don't start before waiting
// for existing ones to finish.
d.shutdownWait.Add(1)
Copy link
Member

Choose a reason for hiding this comment

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

This looks suspect to me.
A waitgroup Add() is not safe to do async.
Ping @anshulpundir

Copy link
Contributor

Choose a reason for hiding this comment

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

sync.WaitGroup operations should be atomic. I think this is a false alarm. I will try to follow up with the community.

FYI: https://groups.google.com/forum/#!topic/golang-nuts/Qq_h0_M51YM

Copy link
Contributor
@anshulpundir anshulpundir Feb 13, 2018

Choose a reason for hiding this comment

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

Actually it seems wg.Wait() must be synchronized with the first wg.Add(). While this should be OK from the code, I'll look at how to address this for the CI failures.

Copy link
Contributor
@anshulpundir anshulpundir left a comment

Choose a reason for hiding this comment

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

@nishanttotla and I discussed the data race failure in unit-tests and it should be OK to move forward. Because of how the waitgroup is used, the race should not have any undesired side-effects.

Copy link
Member
@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🌵

@thaJeztah
Copy link
Member Author

Looks like moby/swarmkit#2495 is being reverted in moby/swarmkit#2518

@thaJeztah thaJeztah mentioned this pull request Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an 8737 account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

swarm mode duplicate ip addresses
7 participants
0