|
|
@ -105,8 +105,19 @@ func (ext *LockableExt) HandleErrorSignal(ctx *Context, node *Node, source NodeI
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case Locking:
|
|
|
|
case Locking:
|
|
|
|
changes.Add(LockableExtType, "state")
|
|
|
|
changes.Add(LockableExtType, "state")
|
|
|
|
ext.State = AbortingLock
|
|
|
|
|
|
|
|
ext.Requirements[info.Destination] = Unlocked
|
|
|
|
ext.Requirements[info.Destination] = Unlocked
|
|
|
|
|
|
|
|
unlocked := 0
|
|
|
|
|
|
|
|
for _, state := range(ext.Requirements) {
|
|
|
|
|
|
|
|
if state == Unlocked {
|
|
|
|
|
|
|
|
unlocked += 1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if unlocked == len(ext.Requirements) {
|
|
|
|
|
|
|
|
ctx.Log.Logf("lockable", "%s unlocked from error %s from %s", node.ID, signal.Error, source)
|
|
|
|
|
|
|
|
ext.State = Unlocked
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ext.State = AbortingLock
|
|
|
|
for id, state := range(ext.Requirements) {
|
|
|
|
for id, state := range(ext.Requirements) {
|
|
|
|
if state == Locked {
|
|
|
|
if state == Locked {
|
|
|
|
ext.Requirements[id] = Unlocking
|
|
|
|
ext.Requirements[id] = Unlocking
|
|
|
@ -116,6 +127,8 @@ func (ext *LockableExt) HandleErrorSignal(ctx *Context, node *Node, source NodeI
|
|
|
|
ctx.Log.Logf("lockable", "sent abort unlock to %s from %s", id, node.ID)
|
|
|
|
ctx.Log.Logf("lockable", "sent abort unlock to %s from %s", id, node.ID)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
case Unlocking:
|
|
|
|
case Unlocking:
|
|
|
|
ext.Requirements[info.Destination] = Locked
|
|
|
|
ext.Requirements[info.Destination] = Locked
|
|
|
|
all_returned := true
|
|
|
|
all_returned := true
|
|
|
|