mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
c9fb551d60
The swarm scope network connected containers with autostart enabled there was a dependency problem with the cluster to be initialized before we can autostart them. With the current container restart code happening before cluster init, these containers were not getting autostarted properly. Added a fix to delay the container start of those containers which has atleast one swarm scope endpoint to until after the cluster is initialized. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
package network
|
|
|
|
import (
|
|
networktypes "github.com/docker/docker/api/types/network"
|
|
clustertypes "github.com/docker/docker/daemon/cluster/provider"
|
|
"github.com/docker/go-connections/nat"
|
|
)
|
|
|
|
// Settings stores configuration details about the daemon network config
|
|
// TODO Windows. Many of these fields can be factored out.,
|
|
type Settings struct {
|
|
Bridge string
|
|
SandboxID string
|
|
HairpinMode bool
|
|
LinkLocalIPv6Address string
|
|
LinkLocalIPv6PrefixLen int
|
|
Networks map[string]*EndpointSettings
|
|
Service *clustertypes.ServiceConfig
|
|
Ports nat.PortMap
|
|
SandboxKey string
|
|
SecondaryIPAddresses []networktypes.Address
|
|
SecondaryIPv6Addresses []networktypes.Address
|
|
IsAnonymousEndpoint bool
|
|
HasSwarmEndpoint bool
|
|
}
|
|
|
|
// EndpointSettings is a package local wrapper for
|
|
// networktypes.EndpointSettings which stores Endpoint state that
|
|
// needs to be persisted to disk but not exposed in the api.
|
|
type EndpointSettings struct {
|
|
*networktypes.EndpointSettings
|
|
IPAMOperational bool
|
|
}
|