[pbs-devel] [PATCH proxmox-backup 2/7] api types: add run-on-mount flag to SyncJobConfig

Christian Ebner c.ebner at proxmox.com
Tue Feb 4 15:24:06 CET 2025


Should now be relocated to the pbs-api-types in `proxmox` repo, but 
still applies cleanly.

further comments inline.
On 1/16/25 07:45, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
> ---
>   pbs-api-types/src/jobs.rs | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs
> index 04631d920..da2565e07 100644
> --- a/pbs-api-types/src/jobs.rs
> +++ b/pbs-api-types/src/jobs.rs
> @@ -622,6 +622,9 @@ pub struct SyncJobConfig {
>       pub resync_corrupt: Option<bool>,
>       #[serde(skip_serializing_if = "Option::is_none")]
>       pub sync_direction: Option<SyncDirection>,
> +    /// Run job when datastore is mounted
> +    #[serde(default)]
> +    pub run_on_mount: bool,

This should rather be an optional flag (like e.g. the resync corrupted) 
in order to:
1. not fail for pre-existing configs
2. limit the number of properties if only the default ones are set

Further, it needs to be included also in the api schema description just 
before the struct declaration.

>   }
>   
>   impl SyncJobConfig {





More information about the pbs-devel mailing list