govet detected a case where we copy tls.Config although
the var contains mutexes. This is fixed in go1.8 with a
stdlib Clone method. Temporarily add a local copy of that
function until we can move to go1.8
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
With this change NetworkAttachmentConfig moves to TaskSpec. We will
continue to support setting the NetworkAttachmentConfig in ServiceSpec
in addition to supporting it in TaskSpec.
Also added `ManuallyAttachable` flag to NetworkCreateRequest and
NetworkResource types.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
When running docker client against a swarm cluster and connection to a
node failed, it's not obvious to figure out the targeting host from the
error message.
This is related to issue: https://github.com/docker/swarm/issues/2393
Signed-off-by: Jin Xu <jinuxstyle@hotmail.com>
v2: remove socket in the error message
This fix tries to address the issue raised in 368 and docker/25735
where NetworkCreate needs to set up the IPAM driver type. Otherwise
an error will be returned.
This fix change IPAM driver type to pointer so that `/networks/create`
does not the explicit specification of IPAM driver any more.
This fix fixes 368.
This fix is related to docker/25735.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Several fields in the `RaftConfig` and `DispatcherConfig` structures
lack clarification about their meaning in relation to time. While all
these fields describe a time-period, they have subtle yet important
differences in their meanings.
`HeartbeatPeriod` is an open time period, meaning the amount of time
between heartbeats for nodes communicating with the dispatcher. This
field has always been specified in nanoseconds and has been converted
directly to a `time.Duration` field. This will have impact except for a
slightly different type. The values used via the API will be identical,
so there is no impact.
`HeartbeatTick` and `ElectionTick` specify the period in units of ticks,
which are configured as one second in the manager. The role of these
fields is clarified and their relation with time is described
accordingly.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Really need to make sure we are only returning `ErrConnectionFailed`
when it's really a failed connection, not just something that reports as
a non-temporary error.
This fixes more tests on docker CI.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
1730fe8fb0 changed error checking to use
the `Temporary()` function from `net.Error`. Unfortunately having this
check so high up it is catching more than we really want it to and
causing the custom error checks below it to not be caught.
This moves the net.Error check to last since it is the most generic
check.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>