Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions daemon/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ func (daemon *Daemon) startIngressWorker() {
go func() {
for r := range ingressJobsChannel {
if r.create != nil {
daemon.setupIngress(&daemon.config().Config, r.create, r.ip, ingressID)
ingressID = r.create.ID
daemon.setupIngress(&daemon.config().Config, r.create, r.ip, ingressID)
} else {
daemon.releaseIngress(ingressID)
ingressID = ""
Expand All @@ -174,7 +174,7 @@ func (daemon *Daemon) startIngressWorker() {
// enqueueIngressJob adds a ingress add/rm request to the worker queue.
// It guarantees the worker is started.
func (daemon *Daemon) enqueueIngressJob(job *ingressJob) {
ingressWorkerOnce.Do(daemon.startIngressWorker)
daemon.startIngressWorker()
ingressJobsChannel <- job
}

Expand Down Expand Up @@ -228,10 +228,6 @@ func (daemon *Daemon) setupIngress(cfg *config.Config, create *clustertypes.Netw
func (daemon *Daemon) releaseIngress(id string) {
controller := daemon.netController

if id == "" {
return
}

n, err := controller.NetworkByID(id)
if err != nil {
log.G(context.TODO()).Errorf("failed to retrieve ingress network %s: %v", id, err)
Expand Down Expand Up @@ -458,7 +454,6 @@ func validateIpamConfig(data []networktypes.IPAMConfig, enableIPv6 bool) error {
}

if !enableIPv6 && subnetFamily == 6 {
continue
}

if cfg.Subnet != cfg.Subnet.Masked() {
Expand Down