Fix design-vs-implementation gaps found in verification
Critical fixes: - Wire monitor subsystem to agent startup (was dead code) - Implement NodeStatus RPC (disk, memory, CPU, runtime version, uptime) - Deploy respects active=false (sets desired_state=stopped, not always running) Medium fixes: - Add Started field to runtime.ContainerInfo, populate from podman inspect - Populate ComponentInfo.started in status handlers for uptime display - Add Monitor field to Agent struct for graceful shutdown Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Podman implements the Runtime interface using the podman CLI.
|
||||
@@ -98,7 +99,8 @@ type podmanInspectResult struct {
|
||||
User string `json:"User"`
|
||||
} `json:"Config"`
|
||||
State struct {
|
||||
Status string `json:"Status"`
|
||||
Status string `json:"Status"`
|
||||
StartedAt string `json:"StartedAt"`
|
||||
} `json:"State"`
|
||||
HostConfig struct {
|
||||
RestartPolicy struct {
|
||||
@@ -142,6 +144,9 @@ func (p *Podman) Inspect(ctx context.Context, name string) (ContainerInfo, error
|
||||
Cmd: r.Config.Cmd,
|
||||
Version: ExtractVersion(r.Config.Image),
|
||||
}
|
||||
if t, err := time.Parse(time.RFC3339Nano, r.State.StartedAt); err == nil {
|
||||
info.Started = t
|
||||
}
|
||||
|
||||
info.Network = r.HostConfig.NetworkMode
|
||||
if len(r.NetworkSettings.Networks) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user