Land feature 57's node-engine work on its release branch
mesh/merge-gate head 5a7ec3775b98 merged into trunk 53fd32618916 beside mesh-controller#346@c711e622 — pass: builds mesh-host → ace, g14, novox, shanks; no…
mesh/repo-check head 5a7ec3775b98 merged into trunk 53fd32618916 beside mesh-controller#346@c711e622 — pass: [release feat/57-config-and-provisioning, judg…
mesh/delivery stopped: its walk plan-1792114347281764422 was stopped by a person (mesh-controller): mesh-host#114 merged into the release branch feat/57-…
mesh/delivery-group group 57-config-and-provisioning stopped: a member was stopped
mesh/merge-gate head 5a7ec3775b98 merged into trunk 53fd32618916 beside mesh-controller#346@c711e622 — pass: builds mesh-host → ace, g14, novox, shanks; no…
mesh/repo-check head 5a7ec3775b98 merged into trunk 53fd32618916 beside mesh-controller#346@c711e622 — pass: [release feat/57-config-and-provisioning, judg…
mesh/delivery stopped: its walk plan-1792114347281764422 was stopped by a person (mesh-controller): mesh-host#114 merged into the release branch feat/57-…
mesh/delivery-group group 57-config-and-provisioning stopped: a member was stopped
The node-engine renders the feature's templates, collections and moved providers' files, on the SDK the feature's modules build on (feature 57, config and provisioning).
This commit is contained in:
+12
-2
@@ -5,6 +5,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/novox/mesh-host/internal/system"
|
||||
)
|
||||
|
||||
// Runner runs a command and answers what it printed — the apply's own (apply.ExecRunner), so a look reads
|
||||
@@ -12,8 +14,9 @@ import (
|
||||
type Runner func(ctx context.Context, name string, args ...string) (string, error)
|
||||
|
||||
// Exec reads the service managers through systemctl and the package database through the system's own
|
||||
// owner query. **Reads only**: `list-units`, `show` and the owner query are the whole of what it asks
|
||||
// (ADR 0240 rule 6, and a test holds it).
|
||||
// owner query. **Reads only**: `list-units`, `show`, the owner query, and — of the machine's manager and
|
||||
// user database — whether an account's manager is active, are the whole of what it asks (ADR 0240 rule 6,
|
||||
// and a test holds it).
|
||||
type Exec struct {
|
||||
Run Runner
|
||||
// System is what the host was built for; it says how a file's package is asked. A system with no
|
||||
@@ -103,3 +106,10 @@ func (e Exec) PackageOwning(ctx context.Context, path string) (string, bool, err
|
||||
}
|
||||
return "", false, nil
|
||||
}
|
||||
|
||||
// UserManagerRunning asks the machine's manager whether an account's own runs, as the apply does before it
|
||||
// touches a user-scoped unit (system.UserManagerRunning; novox/hq ADR 0177, issue 764). A system with no
|
||||
// manager per account cannot say, and is an error: that manager is said unread.
|
||||
func (e Exec) UserManagerRunning(ctx context.Context, account string) (running, exists bool, err error) {
|
||||
return system.ManagerRunning(ctx, e.System, system.Runner(e.Run), account)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user