You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: INACTIVITY_TIMEOUT never stops an AWS machine (agent daemon crash-loops, and globs the wrong workspace.json path) #1238
INACTIVITY_TIMEOUT=10m is set on the provider and reaches the host correctly
(agent.inactivityTimeout: "10m" in the machine's workspace.json), but the
instance never stops. It runs until stopped by hand.
Two independent causes, both on the machine:
1. devsy.service crash-loops. The AWS provider's provider.json defines no agent.dataPath, so InstallDaemon passes an empty agentDir, buildDaemonArgs
(pkg/daemon/agent/daemon.go:194) omits --agent-dir, and IsHostAgentInvocation
then rejects the invocation:
devsy internal agent daemon is only valid inside the workspace container or machine
systemd restarts it every 5s indefinitely (NRestarts=250 after 23 min on a fresh
machine; over 8200 on a long-lived one). The agent home is /home/devsy/.devsy.
2. Even when started, it sees no workspaces.workspaceConfigs()
(cmd/internal/agent_daemon.go:110) globs
/contexts//workspaces//workspace.json
but the AWS provider writes that file one level deeper:
A systemd drop-in supplying --agent-dir, plus an ExecStartPre that symlinks the
globbed path to agent/workspace.json. A drop-in rather than a unit edit, because installOrUpdateUnit rewrites devsy.service whenever its content differs.
With both in place the instance stops itself as configured (Client.InstanceInitiatedShutdown).
What did you expect to happen instead?
Expected
An idle AWS machine stops after INACTIVITY_TIMEOUT.
Steps to reproduce
Reproduce
devsy provider set aws -o INACTIVITY_TIMEOUT=10m
devsy up . --provider aws
On the host: systemctl show devsy -p ExecStart -p NRestarts — no --agent-dir, restarts climbing.
ls <agentHome>/contexts/*/workspaces/*/workspace.json — no match; the file is under agent/.
Activity