AFS_AETHER_CONTROL_SOCKET
Deep-dive reference for:
AFS_AETHER_CONTROL_SOCKET
Status
active-or-experimental
Audience
production/user
Type and Default
- Type: filesystem path (
PathBuf). - Default (when unset):
<cache>/<session>/content/locks/control.sock
where:
<cache>comes fromAFS_AETHER_CACHE_DIR/aether.toml/ CLI--cache-dir/ cache defaults.<session>is the resolved session ID for the running mount or command target.
What It Does
Sets the local Unix domain socket path used for Aether runtime control IPC.
The running aether mount process listens on this socket, and other CLI commands
connect to it to control/query that running mount.
Examples of control-socket backed commands:
aether stopaether statusaether debug handlesaether debug sessionsaether trace captureaether journal throttleaether cache inspect/aether cache clear
Input Surfaces
- Env:
AFS_AETHER_CONTROL_SOCKET=/path/to/control.sock - Config file (
aether.toml):control_socket = "/path/to/control.sock" - CLI mount override:
aether mount --control-socket /path/to/control.sock - CLI command target override:
--socket /path/to/control.sock(for status/debug/cache/journal/trace/stop targeting flows)- Compatibility alias:
--control-socketis also accepted foraether stop.
- Compatibility alias:
Resolution and Override Order
Mount startup path resolution:
- Config defaults
aether.toml- Environment (
AFS_AETHER_CONTROL_SOCKET) - CLI
aether mount --control-socket ... - If still unset, derive default
<cache>/<session>/content/locks/control.sock
Control command target resolution (status, debug, cache, journal, trace, stop):
- Command target
--socket(or compatible stop alias) - Resolved config
control_socket - Derived default from resolved cache/session
Socket Lifecycle and Permissions
When the mount starts the control server:
- Parent directory is created if needed.
- Parent directory is tightened to
0700on Unix (best effort). - Socket is bound and permissions are set to
0600. - If a stale socket file exists and no listener is reachable, Aether removes it.
- If an active listener already exists at the same path, startup fails with socket-in-use.
- On shutdown, Aether removes the socket file.
Platform Notes
- Implemented for Unix-domain sockets; non-Unix platforms return unsupported control-socket operations.
- Runtime control server is Linux-targeted in mount wiring.
Operational Guidance
- Use defaults unless you have a concrete reason to pin a custom path (for example, integrating with external supervisors or running multiple explicit mount contexts).
- If commands cannot reach a running mount, first verify both sides resolve to the same socket path.
Troubleshooting
failed to connect to control socket ... no such file:- mount is not running, or command is targeting the wrong socket path.
permission denied:- caller UID cannot access socket or parent directory.
control socket already in useon mount startup:- another mount is already bound to that path, or stale permissions/path collision.
Primary Implementation Sources
packages/aether/src/config/types/model_defaults.rspackages/aether/src/config/types/file_config_loader.rspackages/aether/src/config/types/apply_env.rspackages/aether/src/config/types/config_resolution.rspackages/aether/src/core/control/control_client.rspackages/aether/src/mount/control.rspackages/aether/src/mount/mount_fuse3.rspackages/aether-cli/src/cli/args/cli_option_args.rspackages/aether-cli/src/cli/args/cli_root_commands.rspackages/aether-cli/src/app/dispatch_and_runtime.rs