The link knows a superseded report (issue 031)
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"sort"
|
||||
|
||||
"github.com/novox/mesh-controller/internal/broker"
|
||||
@@ -161,6 +162,9 @@ func (e Enrolment) Heard(ctx context.Context, report Report) error {
|
||||
// this with only a node name; a real report always carries an account (something applied, or
|
||||
// a refusal, or a failure), so those are the reports that get written down.
|
||||
if report.Applied == nil && report.Refused == "" && len(report.Failed) == 0 {
|
||||
if report.Superseded != "" {
|
||||
log.Printf("%s set aside declaration %s for the newer %s", report.Node, report.Declared, report.Superseded)
|
||||
}
|
||||
return e.Inventory.Seen(ctx, node.ID)
|
||||
}
|
||||
// What it did is kept whichever way it went. Until this, a refusal or a failure moved
|
||||
|
||||
Reference in New Issue
Block a user