home-assistant / supervisor

:house_with_garden: Home Assistant Supervisor
https://home-assistant.io/hassio/
Apache License 2.0
1.79k stars 650 forks source link

Unable to install anything or create a backup, reporting "not enough free space (0.8GB) left on the device" #4329

Closed robinlee09201 closed 1 year ago

robinlee09201 commented 1 year ago

Describe the issue you are experiencing

The system was restored from a backup created on HAOS 10.0. After updating to 10.2, core 2023.5.2, the system refused to install any add-ons or create backups. When installing add-on, “Failed to install add-on. 'AddonManager.install' blocked from execution, not enough free space (0.8GB) left on the device” prompted。 When trying to create a backup, "Unknown error, see supervisor" prompted. When trying to update HA Core, similar happens. Logs shown below. Note that I have at least 800MB available. Run du on root shows only 270.6MB is used. df shows 862.3MB available.

Logs from HA Core when updating HA Core: Logger: homeassistant.components.websocket_api.http.connection Source: components/hassio/update.py:305 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 3:11:17 PM (1 occurrences) Last logged: 3:11:17 PM

[140346768498576] Error updating Home Assistant Core 'HomeAssistantCore.update' blocked from execution, not enough free space (0.8GB) left on the device Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 303, in async_install await async_update_core(self.hass, version=version, backup=backup) File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper raise HassioAPIError(data["message"]) homeassistant.components.hassio.handler.HassioAPIError: 'HomeAssistantCore.update' blocked from execution, not enough free space (0.8GB) left on the device

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 981, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 156, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 417, in async_install_with_progress await self.async_install(version, backup) File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 305, in async_install raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: Error updating Home Assistant Core 'HomeAssistantCore.update' blocked from execution, not enough free space (0.8GB) left on the device

What operating system image do you use?

generic-x86-64 (Generic UEFI capable x86-64 systems)

What version of Home Assistant Operating System is installed?

10.2

Did you upgrade the Operating System.

Yes

Steps to reproduce the issue

  1. Install HAOS 10.1
  2. Restore a backup created by HAOS 10.0
  3. Upgrade to HAOS 10.2
  4. Try to install any add-on (e.g. VScode)
  5. Error occurs.
  6. Try to create a backup under Settings -> System -> Backups, error occurs. ...

Anything in the Supervisor logs that might be useful for us?

Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 108, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 116, in wrapper
    raise self.on_condition(error_msg, _LOGGER.warning) from None
supervisor.exceptions.StoreJobError: 'GitRepo.pull' blocked from execution, not enough free space (0.8GB) left on the device
23-05-31 13:59:30 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-327' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:104> exception=StoreJobError("'GitRepo.pull' blocked from execution, not enough free space (0.8GB) left on the device")>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 108, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 116, in wrapper
    raise self.on_condition(error_msg, _LOGGER.warning) from None
supervisor.exceptions.StoreJobError: 'GitRepo.pull' blocked from execution, not enough free space (0.8GB) left on the device
23-05-31 13:59:30 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-329' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:104> exception=StoreJobError("'GitRepo.pull' blocked from execution, not enough free space (0.8GB) left on the device")>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 108, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 116, in wrapper
    raise self.on_condition(error_msg, _LOGGER.warning) from None
supervisor.exceptions.StoreJobError: 'GitRepo.pull' blocked from execution, not enough free space (0.8GB) left on the device
23-05-31 15:00:27 INFO (MainThread) [supervisor.backups.manager] Found 0 backup files
23-05-31 15:00:27 INFO (MainThread) [supervisor.backups.manager] Found 0 backup files
23-05-31 15:00:29 INFO (MainThread) [supervisor.jobs] 'BackupManager.do_backup_full' blocked from execution, not enough free space (0.8GB) left on the device

Anything in the Host logs that might be useful for us?

Nothing related

System information

System Information

version core-2023.5.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.11
os_name Linux
os_version 6.1.29
arch x86_64
timezone America/Toronto
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.32.1 Stage | running Available Repositories | 1352 Downloaded Repositories | 8 HACS Data | ok
AccuWeather can_reach_server | ok -- | -- remaining_requests | 25
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 10.2 -- | -- update_channel | stable supervisor_version | supervisor-2023.04.1 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 5.2 GB disk_used | 4.1 GB healthy | true supported | true board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.6.1)
Dashboards dashboards | 3 -- | -- resources | 2 views | 4 mode | storage
Recorder oldest_recorder_run | May 23, 2023 at 1:12 PM -- | -- current_recorder_run | May 31, 2023 at 1:59 PM estimated_db_size | 77.48 MiB database_engine | sqlite database_version | 3.40.1

Additional information

The backup was created in April, right before I migrate my HAOS to a VM. There was no issue until 10.2 is installed.

robinlee09201 commented 1 year ago

Managed to expand and successfully. Seems it's not a bug, I guess you set to prevent installation/backup when space available is lower than somewhere around 900MB? However, I suggest adding a notice stating the threshold to avoid confusion.

mdegat01 commented 1 year ago

There sort of is. Before repairs existed supervisor had its resolution center and would list out issues it found there. That never made it to the UI though, you could only see them if you did ha resolution info in the CLI. There's an issue for too little free space, if you ran that command on your system with only 800MB you should see it (it says you have too little when there is 1GiB or less).

Now that repairs exist we've been making the supervisor issues into repairs one by one. Each requires a manual change in core though. That one hasn't made its way over yet but I agree, it should.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

mishoboss commented 1 year ago

I believe this one is related to the one I reported: https://github.com/home-assistant/supervisor/issues/4386

Space is occupied by temp files in my case. Probably in your too.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.