Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File editor clears file when saving to full disk #3206

Closed
Biotronic opened this issue Sep 7, 2023 · 2 comments
Closed

File editor clears file when saving to full disk #3206

Biotronic opened this issue Sep 7, 2023 · 2 comments

Comments

@Biotronic
Copy link

Describe the issue you are experiencing

I had accidentally left debug logging on for zigbee while I was on vacation, and since HA complained about disk space I opened file editor to disable it. Pressing the save button I was informed that there was no space to save the file, so I deleted the log files and opened configuration.yaml anew, only you be greeted with an empty editor - everything was gone from the file.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

File editor

What is the version of the add-on?

5.6.0

Steps to reproduce the issue

  1. Fill disk to the brim
  2. Open some file in file editor, make some changes and save it. You should get an error message saying it was unable to save.
  3. Close the file and re-open it. Notice that it's empty.

System Health information

System Information

version core-2023.6.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.21-v8
arch aarch64
timezone Europe/Oslo
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.31.0
Stage running
Available Repositories 1358
Downloaded Repositories 18
Home Assistant Cloud
logged_in true
subscription_expiration December 15, 2023 at 01:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled false
remote_server eu-central-1-7.ui.nabu.casa
certificate_status ready
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 10.3
update_channel stable
supervisor_version supervisor-2023.08.1
agent_version 1.5.1
docker_version 23.0.6
disk_total 28.5 GB
disk_used 18.2 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons Z-Wave JS (0.1.84), Terminal & SSH (9.7.1), Grafana (8.3.0), Studio Code Server (5.8.0), Grocy (0.19.1), AppDaemon (0.13.1), Node-RED (14.2.2), Mosquitto broker (6.2.1), Z-Wave JS UI (1.13.4), File editor (5.6.0), UCTRONICS OLED Display (Python) (2021.10.25.003)
Dashboards
dashboards 1
resources 10
views 6
mode storage
Recorder
oldest_recorder_run August 13, 2023 at 02:35
current_recorder_run August 13, 2023 at 04:35
estimated_db_size 429.81 MiB
database_engine sqlite
database_version 3.41.2
Spotify
api_endpoint_reachable ok

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

No response

Anything in the add-on logs that might be useful for us?

INFO:2023-09-07 09:51:18,511:hass_configurator.configurator:172.30.32.2 - "GET /api/file?filename=/config/configuration.yaml HTTP/1.1" 200 -
WARNING:2023-09-07 09:51:42,551:hass_configurator.configurator:[Errno 28] No space left on device
INFO:2023-09-07 09:51:42,552:hass_configurator.configurator:172.30.32.2 - "POST /api/save HTTP/1.1" 200 -

Additional information

No response

@MattWestb
Copy link

I think from my experience that this is one underlying thing in the (most) Operating system and nothing the application can do and is the same if running out of storage on most Linux and Window versions.
The OS is priority is trying writing its important things so its deleting the file you have changing and before its writing the new its using the new free blocks for the system and cant writing your changes.
If out of storage booting external and deleting files is the only way doing it OK or booting on some kind of safe mode if its possible for fixing the config.

@frenck
Copy link
Member

frenck commented Sep 12, 2023

This is not an issue caused by the add-on, but not correctly handled by the configurator application that runs inside this add-on.

Please report this issue upstream with the hass configurator project, once they release and fix this, we can update the add-on to include it.

../Frenck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants