Before submitting
What happened?
Version
devsy v1.18.0 (also v1.17.1), AWS provider, AWS_DEPLOYMENT_MODE=docker, macOS arm64 host.
What happens
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:
/contexts/default/workspaces//agent/workspace.json
Zero matches, so the timeout is never evaluated.
Workaround
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/.
devcontainer.json
Error output / logs
How often does this happen?
Every time
Operating system
Linux
Linux distribution (if applicable)
No response
Architecture
ARM64
Desktop app or CLI?
Both
Devsy version
v1.18.0
Devsy provider
AWS
Provider version
v1.4.33
Screenshots
No response
Anything else?
No response
Before submitting
What happened?
Version
devsy v1.18.0 (also v1.17.1), AWS provider,
AWS_DEPLOYMENT_MODE=docker, macOS arm64 host.What happens
INACTIVITY_TIMEOUT=10mis set on the provider and reaches the host correctly(
agent.inactivityTimeout: "10m"in the machine'sworkspace.json), but theinstance never stops. It runs until stopped by hand.
Two independent causes, both on the machine:
1.
devsy.servicecrash-loops. The AWS provider'sprovider.jsondefines noagent.dataPath, soInstallDaemonpasses an emptyagentDir,buildDaemonArgs(
pkg/daemon/agent/daemon.go:194) omits--agent-dir, andIsHostAgentInvocationthen rejects the invocation:
devsy internal agent daemon is only valid inside the workspace container or machine
systemd restarts it every 5s indefinitely (
NRestarts=250after 23 min on a freshmachine; 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:
/contexts/default/workspaces//agent/workspace.json
Zero matches, so the timeout is never evaluated.
Workaround
A systemd drop-in supplying
--agent-dir, plus anExecStartPrethat symlinks theglobbed path to
agent/workspace.json. A drop-in rather than a unit edit, becauseinstallOrUpdateUnitrewritesdevsy.servicewhenever 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=10mdevsy up . --provider awssystemctl show devsy -p ExecStart -p NRestarts— no--agent-dir, restarts climbing.ls <agentHome>/contexts/*/workspaces/*/workspace.json— no match; the file is underagent/.devcontainer.json
Error output / logs
How often does this happen?
Every time
Operating system
Linux
Linux distribution (if applicable)
No response
Architecture
ARM64
Desktop app or CLI?
Both
Devsy version
v1.18.0
Devsy provider
AWS
Provider version
v1.4.33
Screenshots
No response
Anything else?
No response