Ask the packet filter's holder allowed at every compose of the filter
The node-engine stays the one renderer of the filter file: at each compose of a converged node's filter it asks the holder of node-packet-filter its verb allowed within the setting compose-ask-bound (10 s) and renders the answer. When allowed does not answer, or answers what is not its answer, no filter file is composed: the one loaded is kept as it runs, the holder's module is not held (an old holder must stay replaceable), and the part withheld is said once in the journal until an answer comes between. The node hears allowances-changed on its own node's subject and composes again. The manifest invokes seat:node-packet-filter.allowed and consumes node-packet-filter.allowances-changed. Builds: design 08 control-verbs §1, §3, §4, §5, §7, §8; ADR 0683; H-A-305, H-A-307 (1), (2), H-A-314 (3), (5), (7), H-A-315 (2), (6), H-A-321
This commit is contained in:
@@ -176,10 +176,10 @@ func ComposeIn(in Input, node string, mode Mode) (Declared, []string, error) {
|
||||
// none (resolution.NoStoreError, whatever the shape: an image, a source, a tools bundle, a runtime program, a templates
|
||||
// archive) is left out of the declaration with its words and the rest composes again; the node is never refused whole for it
|
||||
// (design 47 G A-461, A-452). The rendering returned carries the modules so left out, for the filter and the rest to read.
|
||||
func composeWithoutStoreFetchers(plan catalogue.Resolution, with catalogue.Rendering, holding resolution.Holding) (catalogue.Composed, catalogue.Rendering, map[string]string, error) {
|
||||
func composeWithoutStoreFetchers(plan catalogue.Resolution, with catalogue.Rendering, holding resolution.Holding, filter resolution.Filter) (catalogue.Composed, catalogue.Rendering, map[string]string, error) {
|
||||
var held map[string]string
|
||||
for {
|
||||
composed, err := resolution.ComposeHolding(plan, with, holding)
|
||||
composed, err := resolution.ComposeHoldingFiltered(plan, with, holding, filter)
|
||||
var none *resolution.NoStoreError
|
||||
if !errors.As(err, &none) {
|
||||
return composed, with, held, err
|
||||
@@ -223,7 +223,7 @@ func (c *composer) declaration(nodeName string, mode Mode) (Declared, error) {
|
||||
}
|
||||
// A held module's share of a holder's words is what runs of each runtime process (design 47 H, H-A-335, H-A-337).
|
||||
holding := resolution.Holding{Held: node.Held, Runs: node.RunsRuntimes}
|
||||
composed, with, storeHeld, err := composeWithoutStoreFetchers(plan, with, holding)
|
||||
composed, with, storeHeld, err := composeWithoutStoreFetchers(plan, with, holding, node.Filter)
|
||||
if err != nil {
|
||||
return Declared{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user