[pbs-devel] [PATCH proxmox-backup v3 13/24] api: mark removable datastores as unplugged after restart
Dietmar Maurer
dietmar at proxmox.com
Wed Apr 10 13:18:40 CEST 2024
> diff --git a/src/bin/proxmox-backup-api.rs b/src/bin/proxmox-backup-api.rs
> index e46557a0..50f31d4e 100644
> --- a/src/bin/proxmox-backup-api.rs
> +++ b/src/bin/proxmox-backup-api.rs
> @@ -10,6 +10,8 @@ use proxmox_lang::try_block;
> use proxmox_router::RpcEnvironmentType;
> use proxmox_sys::fs::CreateOptions;
>
> +use pbs_api_types::{DataStoreConfig, MaintenanceMode, MaintenanceType};
> +use pbs_datastore::check_if_available;
> use proxmox_rest_server::{daemon, ApiConfig, RestServer};
>
> use proxmox_backup::auth_helpers::*;
> @@ -73,6 +75,8 @@ async fn run() -> Result<(), Error> {
>
> proxmox_backup::auth_helpers::setup_auth_context(true);
>
> + mark_removable_datastores_unplugged()?;
Do we really want to fail service startup if that fails?
Maybe it is good enough to just log a warning?
Or schedule a task to do it at regular intervals?
More information about the pbs-devel
mailing list