summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-27 02:29:45 -0500
committerJeff Carr <[email protected]>2024-10-27 02:29:45 -0500
commitd0767eb9843fcdb9ab0e73200d8a9516e28c200c (patch)
treeca89594578c692211753e1d988c01c9aedcd3ba3 /main.go
parent5d1729f99ba8968900eaaaa38f74f327730fffd4 (diff)
validate stuff should be here
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/main.go b/main.go
index a5ef467..a36c0bc 100644
--- a/main.go
+++ b/main.go
@@ -43,8 +43,13 @@ func main() {
me.changed = false
// me.dmap = make(map[*pb.Droplet]*DropletT)
me.hmap = make(map[*pb.Hypervisor]*HyperT)
+
+ // how long a droplet can be missing until it's declared dead
me.unstableTimeout = 17 * time.Second
+ // how long the cluster must be stable before new droplets can be started
+ me.clusterStableDuration = 37 * time.Second
+
// read in the config file
me.cluster = new(pb.Cluster)
if err := me.cluster.ConfigLoad(); err != nil {
@@ -66,13 +71,13 @@ func main() {
var newEvents []*pb.Event
- // sanity check the droplets
- virtigoxml.CheckDroplets(me.cluster, false)
- newe := virtigoxml.CheckDiskFilenames(me.cluster)
+ // sanity check the cluster & droplets
+ ValidateDroplets(me.cluster, false)
+ newe := ValidateDiskFilenames(me.cluster)
for _, e := range newe {
newEvents = append(newEvents, e)
}
- virtigoxml.CheckUniqueFilenames(me.cluster)
+ ValidateUniqueFilenames(me.cluster)
for _, filename := range argv.Xml {
domcfg, err := virtigoxml.ReadXml(filename)