As described in #4996, Docker 25+ changes made sub-mounts of the /dev
filesystem to be mounted read-only. Revert to the previous behavior by
adjusting the ReadOnlyNonRecursive option. Cleaner way would be to
upstream support for setting this option via Mount class arguments, so
this change is meant to be rather a hotfix for the issue. Even better
approach would be mounting /dev non-recursively, and taking care of
creating all necessary filesystems when creating containers in
Supervisor.
* Migrate to Ruff for lint and format
* Fix pylint issues
* DBus property sets into normal awaitable methods
* Fix tests relying on separate tasks in connect
* Fixes from feedback
* Add background option to backup APIs
* Fix decorator tests
* Working error handling, initial test cases
* Change to schedule_job and always return job id
* Add tests
* Reorder call at/later args
* Validation errors return immediately in background
* None is invalid option for background
* Must pop the background option from body
* Added support for setting addon target path in map config
* Updated addon target path mapping to use dataclass
* Added check before adding string folder maps
* Moved enum to addon/const, updated map_volumes logic, fixed test
* Removed log used for debugging
* Use more readable approach to determine addon_config_used
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Use cleaner approach for checking volume config
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Use dict syntax and ATTR_TYPE
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Use coerce for validating mapping type
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Default read_only to true in schema
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Use ATTR_TYPE and ATTR_READ_ONLY instead of static strings
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Use constants instead of in-line strings
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Correct type for path
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Added read_only and path constants
* Fixed small syntax error and added includes for constants
* Simplify logic for handling string and dict entries in map config
* Use ATTR_PATH instead of inline string
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* Add missing ATTR_PATH reference
* Moved FolderMapping dataclass to data.py
* Fix edge case where "data" map type is used but optional path is not set
* Move FolderMapping dataclass to configuration.py to prevent circular reference
---------
Co-authored-by: Jeff Oakley <jeff.oakley@LearningCircleSoftware.com>
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
* Revert Home Assistant configuration to `/config`
With the new add-on config feature the intention is to provide a good
location for add-on specific configurations. Currently, add-ons such
as Node RED or ESPHome use the Home Assistant config directory because
this location is accessible to the user (via Samba VSCode add-on etc.).
To make it clear to add-on developer that the new intention is to use
add-on specific config, the implementation now bind mounts the add-on
configuration directory to `/config`. And since some add-ons still need
access to the Home Assistant configuration, its config folder is mounted
to `/homeassistant` under the new scheme.
However, users do know the path `/config`, and edit things e.g. through
the SSH or VS Code add-on. Also `/config` is still the
directory from inside the Core container.
For SSH/VS Code add-on we could work around using a symlink, but that
only works as long as these add-ons don't have a add-on config
themselfs.
This all has very high confusion potential, for not much gain. The
renaming is mainly "developer friendly", but not really user friendly.
Let's minimize potential confusion, and keep things where they are.
The Home Assistant config directory stays at `/config, in all cases,
everwhere.
Map the new add-on configuration directory to `/addon_config`.
* Adjust tests/comments
* Add job group execution limit option
* Fix pylint issues
* Assign variable before usage
* Cleanup jobs when done
* Remove isinstance check for performance
* Explicitly raise from None
* Add some more documentation info
* Reduce executor code for docker
* Fix pylint errors and move import/export image
* Fix test and a couple other risky executor calls
* Fix dataclass and return
* Fix test case and add one for corrupt docker
* Add some coverage
* Undo changes to docker manager startup
* Addon startup waits for healthy
* fix import for pylint
* wait_for to 5 in tests
* Adjust tests to simplify async tasks
* Remove wait_boot time from addons.boot tests
* Eliminate async task race conditions in tests
* Fix propagation mode of mounts to allow Ha-Core to start
Change the mount propagation mode from SLAVE to RSLAVE in case of /media and /share
* Check /share and /media to use RSLAVE as a propagation mode of mount
* Fix mount propagation mode of /share and /media
* Check /share and /media for rslave propagation mode
* Docker events based watchdog
* Separate monitor from DockerAPI since it needs coresys
* Move monitor into dockerAPI
* Fix properties on coresys
* Add watchdog tests
* Added tests
* pylint issue
* Current state failures test
* Thread-safe event processing
* Use labels property