mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
Added nil to network.MapLabelToValues call
This commit is contained in:
@@ -2,13 +2,14 @@ package client
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
consul "github.com/hashicorp/consul/api"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
"github.com/hashicorp/nomad/nomad/structs"
|
||||
"log"
|
||||
"net/url"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
consul "github.com/hashicorp/consul/api"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
"github.com/hashicorp/nomad/nomad/structs"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -95,7 +96,7 @@ func (c *ConsulClient) ShutDown() {
|
||||
|
||||
func (c *ConsulClient) findPortAndHostForLabel(portLabel string, task *structs.Task) (string, int) {
|
||||
for _, network := range task.Resources.Networks {
|
||||
if p, ok := network.MapLabelToValues()[portLabel]; ok {
|
||||
if p, ok := network.MapLabelToValues(nil)[portLabel]; ok {
|
||||
return network.IP, p
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user