Commit Graph

23 Commits

Author SHA1 Message Date
Mike Degatano dfd8fe84e0
Mount manager reload mounts all failed mounts (#5014)
* Mount manager reload mounts all failed mounts

* Remove invalid part of mount manager reload test
2024-04-12 12:02:29 +02:00
Stefan Agner e32970f191
Fix new complaint by ruff 0.2.1 (#4898) 2024-02-16 14:35:31 +01:00
Mike Degatano b5bf270d22
Mount status checks look at connection (#4882)
* Mount status checks look at connection

* Fix tests and refactor to fixture

* Fix test
2024-02-12 17:32:54 +01:00
Mike Degatano 4c573991d2
Improve error handling when mounts fail (#4872) 2024-02-05 16:24:53 -05:00
Stefan Agner 11ec6dd9ac
Wait until mount unit is deactivated on unmount (#4733)
* Wait until mount unit is deactivated on unmount

The current code does not wait until the (bind) mount unit has been
actually deactivated (state "inactive"). This is especially problematic
when restoring a backup, where we deactivate all bind mounts before
restoring the target folder. Before the tarball is actually restored,
we delete all contents of the target folder. This lead to the situation
where the "rm -rf" command got executed before the bind mount actually
got unmounted.

The current code polls the state using an exponentially increasing
delay. Wait up to 30s for the bind mount to actually deactivate.

* Fix function name

* Fix missing await

* Address pytest errors

Change state of systemd unit according to use cases. Note that this
is currently rather fragile, and ideally we should have a smarter
mock service instead.

* Fix pylint

* Fix remaining

* Check transition fo failed as well

* Used alternative mocking mechanism

* Remove state lists in test_manager

---------

Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2023-12-01 00:35:15 +01:00
Stefan Agner 38d5d2307f
Bump tooling to target Python version 3.11 (#4666) 2023-11-03 12:02:55 +01:00
Mike Degatano 0aafda1477
Mount names cannot include non-alphanumerics (#4545) 2023-09-09 10:54:04 +02:00
Mike Degatano 1b649fe5cd
Use newer StrEnum and IntEnum over Enum (#4521)
* Use newer StrEnum and IntEnum over Enum

* Fix validation issue and remove unnecessary .value calls

---------

Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2023-09-06 12:21:04 -04:00
Mike Degatano f93b753c03
Backup and restore track progress in job (#4503)
* Backup and restore track progress in job

* Change to stage only updates and fix tests

* Leave HA alone if it wasn't restored

* skip check HA stage message when we don't check

* Change to helper to get current job

* Fix tests

* Mark jobs as internal to skip notifying HA
2023-08-30 16:01:03 -04:00
Mike Degatano 93ba8a3574
Add job names and references everywhere (#4495)
* Add job names and references everywhere

* Remove group names check and switch to const

* Ensure unique job names in decorator tests
2023-08-21 09:15:37 +02:00
Mike Degatano 9a7d547394
Allow all characters in mount credentials (#4399)
* Allow all characters in mount credentials

* Fix permissions on credential files

* Fix pylint issue
2023-06-22 15:55:13 -04:00
Mike Degatano d3031e2eae
Use noserverino option in cifs mounts (#4398) 2023-06-21 18:49:03 +02:00
Joakim Sørensen 35bd66119a
Allow specifying CIFS version (#4395)
* Allow specifying cifs_version

* cifs_version -> version
2023-06-21 12:08:56 -04:00
Joakim Sørensen 4bed8c1327
Allow mounting CIFS as guest (#4384) 2023-06-20 10:20:06 -04:00
Mike Degatano f4df298cb3
Exit reload early if no mounts (#4338)
* Exit reload early if no mounts

* Formatting
2023-06-05 10:40:16 -04:00
Mike Degatano 73d795e05e
Improve handling of NFS mounts and backup manager errors (#4323) 2023-05-30 17:29:51 -04:00
Mike Degatano e984797f3c
Support share mounts (#4318) 2023-05-29 11:40:03 +02:00
Joakim Sørensen bb497c0c9f
Add missing default_backup_mount to mount config (#4312) 2023-05-24 12:01:47 +02:00
Mike Degatano f6c3bdb6a8
Add mount to supported features (#4301)
* Add mount to supported features

* Typo in enable

* Fix places mocking os available without version

* Increase resilence of problematic repeat task test
2023-05-23 14:00:15 +02:00
Mike Degatano 5ced4e2f3b
Update to python 3.11 (#4296) 2023-05-22 19:12:34 +02:00
Mike Degatano b4fd5b28f6
Use backup mounts (#4289)
* Add support for backup mounts

* Fix tests

* Allow backups to local when there's a default location
2023-05-16 14:08:22 -04:00
Mike Degatano 7688e1b9cb
Fix bind mounting and remove on create failure (#4274)
* Fix bind mounting and remove on create failure

* Fix test and make update fully fail on dbus error
2023-05-02 08:33:01 +02:00
Mike Degatano 34c394c3d1
Add support for network mounts (#4269)
* Add support for network mounts

* Handle backups and save data

* fix pylint issues
2023-05-01 08:45:52 +02:00