78 lines
1.4 KiB
Markdown
78 lines
1.4 KiB
Markdown
# CMD-20260709-fix-autonomous-controller-systemd-health
|
|
|
|
## Goal
|
|
|
|
Ensure Autonomous Controller survives reboot and is managed by systemd instead of only manual daemon process.
|
|
|
|
## Current Issue
|
|
|
|
Observed:
|
|
|
|
- Autonomous Controller daemon process running
|
|
- systemd service inactive/dead
|
|
|
|
This creates a restart reliability gap.
|
|
|
|
## Diagnose
|
|
|
|
Check:
|
|
|
|
```bash
|
|
systemctl status aios-autonomous-controller --no-pager
|
|
systemctl is-enabled aios-autonomous-controller
|
|
journalctl -u aios-autonomous-controller -n 200 --no-pager
|
|
ps aux | grep autonomous_controller
|
|
```
|
|
|
|
## Fix Requirements
|
|
|
|
Ensure:
|
|
|
|
- systemd unit exists
|
|
- unit enabled at boot
|
|
- service user/group correct
|
|
- WorkingDirectory correct
|
|
- Environment configuration loaded
|
|
- Restart policy enabled
|
|
- Logs available
|
|
|
|
Recommended service properties:
|
|
|
|
```ini
|
|
Restart=always
|
|
RestartSec=10
|
|
```
|
|
|
|
## Validation
|
|
|
|
Run:
|
|
|
|
```bash
|
|
systemctl daemon-reload
|
|
systemctl enable aios-autonomous-controller
|
|
systemctl restart aios-autonomous-controller
|
|
systemctl status aios-autonomous-controller --no-pager
|
|
```
|
|
|
|
Confirm:
|
|
|
|
- active (running)
|
|
- restart survives process kill test
|
|
- health checks execute
|
|
- Task Center status updated
|
|
|
|
## Success Signals
|
|
|
|
- AIOS_AUTONOMOUS_CONTROLLER_SYSTEMD_READY
|
|
- AIOS_AUTONOMOUS_CONTROLLER_RESTART_SAFE
|
|
- AIOS_AUTONOMOUS_CONTROLLER_HEALTH_VISIBLE
|
|
|
|
## Report
|
|
|
|
Return:
|
|
|
|
- service status
|
|
- unit file path
|
|
- restart policy
|
|
- health result
|