noop as resource meta param
first part of #21 tested with example/noop1.yaml on CentOS 6
This commit is contained in:
committed by
James Shubin
parent
1584f20220
commit
6bbce039aa
@@ -729,7 +729,7 @@ func (g *Graph) Process(v *Vertex) {
|
||||
|
||||
obj.SetState(resStateCheckApply)
|
||||
// if this fails, don't UpdateTimestamp()
|
||||
checkok, err := obj.CheckApply(true)
|
||||
checkok, err := obj.CheckApply(!obj.GetMeta().Noop)
|
||||
if checkok && err != nil { // should never return this way
|
||||
log.Fatalf("%v[%v]: CheckApply(): %t, %+v", obj.Kind(), obj.GetName(), checkok, err)
|
||||
}
|
||||
@@ -745,6 +745,11 @@ func (g *Graph) Process(v *Vertex) {
|
||||
}
|
||||
}
|
||||
|
||||
// when noop is true we always want to update timestamp
|
||||
if obj.GetMeta().Noop && err == nil {
|
||||
ok = true
|
||||
}
|
||||
|
||||
if ok {
|
||||
// update this timestamp *before* we poke or the poked
|
||||
// nodes might fail due to having a too old timestamp!
|
||||
|
||||
Reference in New Issue
Block a user