api: maintenance: allow setting of maintenance mode if 'unmounting'

So it is possible to reset it after a failed unmount, or abort an
unmount task by resetting it through the API.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
Hannes Laimer 2024-11-26 12:43:19 +01:00 committed by Fabian Grünbichler
parent 35fb5d4f7f
commit 2ed9c4bfca

View File

@ -416,7 +416,7 @@ impl DataStoreConfig {
Some(MaintenanceType::ReadOnly) => { /* always OK */ }
Some(MaintenanceType::Offline) => { /* always OK */ }
Some(MaintenanceType::Unmount) => {
bail!("datastore is being unmounted");
/* used to reset it after failed unmount, or alternative for aborting unmount task */
}
Some(MaintenanceType::Delete) => {
match new_type {