do targets some other way
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
5d9eb5add6
commit
d62931e46a
4
http.go
4
http.go
|
@ -85,7 +85,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
|||
if zood == nil {
|
||||
log.Info("machine", m.Hostname, "does not have zood installed")
|
||||
} 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
|
||||
|
@ -116,7 +116,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
|||
if route == "/target" {
|
||||
log.HttpMode(w)
|
||||
defer log.HttpMode(nil)
|
||||
me.targets[packname] = version
|
||||
// me.targets[packname] = version
|
||||
log.Log(NOW, "setting package/version to ", packname, " ", version)
|
||||
return
|
||||
}
|
||||
|
|
2
main.go
2
main.go
|
@ -52,7 +52,7 @@ func main() {
|
|||
log.Warn("load config failed", err)
|
||||
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
|
||||
|
||||
go NewWatchdog()
|
||||
|
|
|
@ -17,6 +17,6 @@ type stuff struct {
|
|||
distro string // debian,redhat,gentoo,macos,wincrap
|
||||
packages *zoopb.Packages // installed packages and versions
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue