tescophil
(Phil)
September 17, 2023, 3:25pm
1
Just been playing around with the HA command line and found hundred of supervisor jobs in the jobs list. For example:
ha jobs info | grep supervisor_check_connectivity | wc -l
This returns a count of 430, each job looks like this
- child_jobs: []
done: null
name: supervisor_check_connectivity
progress: 0
reference: null
stage: null
uuid: <some hex string for the id>
Anyone else have this…, why so many…?
Ah damn. So those are all actually the jobs that never ran. The way it works is all jobs have conditions and limits on when they can run and how often. For instance, supervisors connectivity check is throttled like so:
@Job(
name="supervisor_check_connectivity",
limit=JobExecutionLimit.THROTTLE,
throttle_period=_check_connectivity_throttle_period,
)
async def check_connectivity(self):
It is only allowed to run if the last check failed or it’s been at least 5 minutes since the last success.
However there’s a bug it seems. Jobs which are rejected due to limits or conditions are not being properly cleaned up. That’s why done
is null
on all of them, it becomes false
when they actually get started.
Can you submit an issue here for this? I’m traveling currently but will fix it when I get a moment. Thanks for reporting this
tescophil
(Phil)
September 17, 2023, 5:11pm
3
Thanks Mike, reported here
opened 05:11PM - 17 Sep 23 UTC
bug
### Describe the issue you are experiencing
Just been playing around with the H… A command line and found hundred of supervisor jobs in the jobs list. For example:
ha jobs info | grep supervisor_check_connectivity | wc -l
This returns a count of 430, each job looks like this
- child_jobs: []
done: null
name: supervisor_check_connectivity
progress: 0
reference: null
stage: null
uuid: <some hex string for the id>
Reported on the community forum[here](https://community.home-assistant.io/t/supervisor-check-connectivity/615359?u=tescophil)
Comment from CommandCentral (Mike)
Jobs which are rejected due to limits or conditions are not being properly cleaned up. That’s why done is null on all of them, it becomes false when they actually get started.
### What type of installation are you running?
Home Assistant OS
### Which operating system are you running on?
Home Assistant Operating System
### Steps to reproduce the issue
1. Just run ha jobs info on the command line to see a (very long) list of jobs which have not been able to run.
2.
3.
...
### Anything in the Supervisor logs that might be useful for us?
```txt
Small extract:
- child_jobs: []
done: null
name: check_dns_server_ipv6_run
progress: 0
reference: null
stage: null
uuid: e6db4a8670b24dd5944dc9df4a80a17f
- child_jobs: []
done: null
name: supervisor_check_connectivity
progress: 0
reference: null
stage: null
uuid: f9e34e23ac3b47a2bf4339ea9941b448
- child_jobs: []
done: null
name: supervisor_check_connectivity
progress: 0
reference: null
stage: null
uuid: 79403b9b6eef45c9bbcd595cbed74cd4
- child_jobs: []
done: null
name: supervisor_check_connectivity
progress: 0
reference: null
stage: null
uuid: 448b04bb474d439b9a9f7f6ea9ee460b
- child_jobs: []
done: null
name: supervisor_check_connectivity
progress: 0
reference: null
stage: null
uuid: 5a051fe4084e493a8b23f68725ddafcd
- child_jobs: []
done: null
name: supervisor_check_connectivity
progress: 0
reference: null
stage: null
uuid: e592b8cf9fea40a9aeff66f0851a8756
```
### System Health information
## System Information
version | core-2023.9.0
-- | --
installation_type | Home Assistant OS
dev | false
hassio | true
docker | true
user | root
virtualenv | false
python_version | 3.11.5
os_name | Linux
os_version | 6.1.21-v8
arch | aarch64
timezone | Europe/London
config_dir | /config
<details><summary>Home Assistant Community Store</summary>
GitHub API | ok
-- | --
GitHub Content | ok
GitHub Web | ok
GitHub API Calls Remaining | 5000
Installed Version | 1.32.1
Stage | running
Available Repositories | 1283
Downloaded Repositories | 8
</details>
<details><summary>Home Assistant Cloud</summary>
logged_in | false
-- | --
can_reach_cert_server | ok
can_reach_cloud_auth | ok
can_reach_cloud | ok
</details>
<details><summary>Home Assistant Supervisor</summary>
host_os | Home Assistant OS 10.5
-- | --
update_channel | stable
supervisor_version | supervisor-2023.09.2
agent_version | 1.5.1
docker_version | 23.0.6
disk_total | 109.3 GB
disk_used | 20.2 GB
healthy | true
supported | failed to load: Unsupported
board | rpi3-64
supervisor_api | ok
version_api | ok
installed_addons | Duck DNS (1.15.0), File editor (5.6.0), Home Assistant Google Drive Backup (0.111.1), Advanced SSH & Web Terminal (15.0.8)
</details>
<details><summary>Dashboards</summary>
dashboards | 2
-- | --
resources | 5
views | 10
mode | storage
</details>
<details><summary>Recorder</summary>
oldest_recorder_run | 15 September 2023 at 18:35
-- | --
current_recorder_run | 17 September 2023 at 02:40
estimated_db_size | 107.38 MiB
database_engine | sqlite
database_version | 3.41.2
</details>
<details><summary>Sonoff</summary>
version | 3.5.2 (2ad1cd7)
-- | --
cloud_online | 13 / 14
local_online | 1 / 10
</details>
### Supervisor diagnostics
Reporting this on an android phone dso can't drag and drop...
### Additional information
_No response_