diff --git a/Makefile b/Makefile index 4e838e1..d0d512f 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ test: deps quicktest go vet $(TEST) docker: deps + find . -name ".DS_Store" -depth -exec rm {} \; docker build -t $(DOCKERREPO)/$(NAME) . docker tag -f $(DOCKERREPO)/$(NAME) $(DOCKERREPO)/$(NAME):$(VERSION) diff --git a/mesos/mesos.go b/mesos/mesos.go index a6018f3..77a5600 100644 --- a/mesos/mesos.go +++ b/mesos/mesos.go @@ -4,12 +4,13 @@ import ( "encoding/json" "errors" "fmt" - "github.com/CiscoCloud/mantl-api/utils/http" - log "github.com/Sirupsen/logrus" "io/ioutil" "os" "strconv" "strings" + + "github.com/CiscoCloud/mantl-api/utils/http" + log "github.com/Sirupsen/logrus" ) type Mesos struct { @@ -102,7 +103,6 @@ func (m Mesos) Shutdown(frameworkId string) error { } func (m Mesos) ShutdownFrameworkByName(name string) error { - log.Debugf("Looking for %s framework", name) // find mesos framework fw, err := m.FindFramework(name) @@ -125,9 +125,11 @@ func (m Mesos) FindFrameworks(name string) ([]*Framework, error) { return []*Framework{}, err } + log.Debugf("mesos.FindFrameworks: looking for framework %s", name) matching := make(map[string]*Framework) for _, fw := range state.Frameworks { - if fw.Name == name && fw.Active { + log.Debugf("mesos.FindFrameworks: framework %s - %s - %t", fw.Name, fw.ID, fw.Active) + if strings.EqualFold(fw.Name, name) { matching[fw.ID] = fw } }