H-A-374: set a drifted directory the mesh made right at the engine's start
ace's Node toolchain cache directory stood at 0700 against its entry's 0711 while the engine said its composition was unchanged: an unchanged composition is never applied, and the judgement reads the compositions, not the disk. Each module taken as running at the engine's start now has every directory entry its record says the mesh made given its declared owner and mode where they drifted on disk, one journal line each; one the mesh never made stays used as found and is said (issue 339). The verb composition's diff names a drifted directory the mesh made. The agent test that marks modules not composed now waits for every want it marks. Builds: design 47 H2 §813; H-A-374, H-A-392
This commit is contained in:
@@ -49,6 +49,10 @@ type CompositionView struct {
|
||||
Judged JudgedView `json:"judged"`
|
||||
// Diff is every resource that differs from what runs, when asked.
|
||||
Diff []judge.ResourceChange `json:"diff,omitempty"`
|
||||
// Drift is, when the diff is asked, each directory entry of what runs that the mesh made, as its record holds, whose
|
||||
// owner or mode on disk differ from it (H-A-374, H-A-392): read-only; the engine sets it right at its next start or
|
||||
// apply of the module.
|
||||
Drift []DriftView `json:"drift,omitempty"`
|
||||
// Own is, of the node's own composition (module node), its own fields beside what runs names (issue 774: ace's
|
||||
// own composition dropped the provisioner client's account, and nothing read could show it).
|
||||
Own *OwnView `json:"own,omitempty"`
|
||||
@@ -302,6 +306,9 @@ func (a *Agent) Composition(ctx context.Context, module, digest string, diff boo
|
||||
}
|
||||
if diff {
|
||||
view.Diff = judge.ChangedResources(running, read.C)
|
||||
if running != nil && a.env.DirectoryDrift != nil {
|
||||
view.Drift = a.env.DirectoryDrift(*running)
|
||||
}
|
||||
}
|
||||
return view, nil
|
||||
}
|
||||
@@ -341,6 +348,14 @@ func (a *Agent) revisionsOf(ctx context.Context, key string) ([]compNow, error)
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DriftView is one directory entry the mesh made whose owner or mode on disk differ from it, as the verb composition's
|
||||
// diff names it (H-A-392): its id, its path and how, in words.
|
||||
type DriftView struct {
|
||||
ID string `json:"id"`
|
||||
Path string `json:"path"`
|
||||
Drift string `json:"drift"`
|
||||
}
|
||||
|
||||
// CompositionDiff answers the node-engine seat's read verb composition-diff (design 47 H2 §813 (3), H-A-349 DQ-12b): one
|
||||
// module's composition that runs beside another revision of its composition key, given by its revision or its digest,
|
||||
// as the entries that differ per resource; environment entries by name, a secret's value masked. It changes nothing.
|
||||
|
||||
Reference in New Issue
Block a user