do targets some other way
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
1abcc862fe
commit
cea50e3541
4
http.go
4
http.go
|
@ -85,7 +85,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
if zood == nil {
|
if zood == nil {
|
||||||
log.Info("machine", m.Hostname, "does not have zood installed")
|
log.Info("machine", m.Hostname, "does not have zood installed")
|
||||||
} else {
|
} else {
|
||||||
log.Info("zood version", zood.Version, "vs target version", v, "on machine", m.Hostname)
|
log.Info(fmt.Sprintf("zood version %s vs target version %s on machine %s", zood.Version, v, m.Hostname))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
@ -116,7 +116,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
if route == "/target" {
|
if route == "/target" {
|
||||||
log.HttpMode(w)
|
log.HttpMode(w)
|
||||||
defer log.HttpMode(nil)
|
defer log.HttpMode(nil)
|
||||||
me.targets[packname] = version
|
// me.targets[packname] = version
|
||||||
log.Log(NOW, "setting package/version to ", packname, " ", version)
|
log.Log(NOW, "setting package/version to ", packname, " ", version)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
2
main.go
2
main.go
|
@ -52,7 +52,7 @@ func main() {
|
||||||
log.Warn("load config failed", err)
|
log.Warn("load config failed", err)
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
me.targets = make(map[string]string) // keep track of what versions the machines should be running
|
// me.targets = make(map[string]string) // keep track of what versions the machines should be running
|
||||||
me.upgrade = make(map[string]bool) // used to trigger upgrade attempts
|
me.upgrade = make(map[string]bool) // used to trigger upgrade attempts
|
||||||
|
|
||||||
go NewWatchdog()
|
go NewWatchdog()
|
||||||
|
|
|
@ -17,6 +17,6 @@ type stuff struct {
|
||||||
distro string // debian,redhat,gentoo,macos,wincrap
|
distro string // debian,redhat,gentoo,macos,wincrap
|
||||||
packages *zoopb.Packages // installed packages and versions
|
packages *zoopb.Packages // installed packages and versions
|
||||||
machines *zoopb.Machines // every machine that has reported itself to the zookeeper
|
machines *zoopb.Machines // every machine that has reported itself to the zookeeper
|
||||||
targets map[string]string // what versions the machines should be running
|
// targets map[string]string // what versions the machines should be running
|
||||||
upgrade map[string]bool // use this to trigger builds
|
upgrade map[string]bool // use this to trigger builds
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue