all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dylan Whyte <d.whyte@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Hannes Laimer <h.laimer@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v9 0/6] closes #3071: maintenance mode for datastore
Date: Wed, 6 Apr 2022 15:08:03 +0200	[thread overview]
Message-ID: <cf7c9fff-7f06-1794-bcbf-885c6ca6c6b4@proxmox.com> (raw)
In-Reply-To: <20220217171457.72206-1-h.laimer@proxmox.com>

Hi,

On 2/17/22 18:14, Hannes Laimer wrote:
> Adds maintenance mode and tracking of active reading/writing operations.
> The maintenance mode prevents the start of new operations if the type of
> operation they would perform on the datastore would conflict with the
> maintenance type that is currently set. This check is performed when
> lookup_datastore is called. Tasks only call this function once at the
> beginning, therefore updating the maintenance type cannot interfere with
> already running tasks.
>
> active operations tracking:
> Changed file layout to now also keep track of the pid+starttime and the
> counts of operations that that pid started, like this it is possible to
> not count operations that were started by a dead process, since they
> are also not active anymore. Whenever the file is updated, also entries
> of dead processes are removed. When the file is read, only entries of
> active processes are counted.
>
> The UI shows a spinner with the count of conflictintg tasks (the tasks
> that were started before the maintenance type was updated) next to it.
> As soon as all conflicting tasks are finished a checkmark appears.
>
> Hannes Laimer (6):
>    api-types: add maintenance type
>    datastore: add check for maintenance in lookup
>    pbs-datastore: add active operations tracking
>    api: make maintenance_type updatable
>    api: add get_active_operations endpoint
>    ui: add option to change the maintenance type
>
>   debian/control                       |   6 +-
>   pbs-api-types/Cargo.toml             |   2 +-
>   pbs-api-types/src/datastore.rs       |  24 +++++-
>   pbs-api-types/src/lib.rs             |   3 +
>   pbs-api-types/src/maintenance.rs     |  78 +++++++++++++++++
>   pbs-datastore/Cargo.toml             |   1 +
>   pbs-datastore/src/datastore.rs       | 121 +++++++++++++++++++--------
>   pbs-datastore/src/lib.rs             |   4 +
>   pbs-datastore/src/snapshot_reader.rs |   6 +-
>   pbs-datastore/src/task_tracking.rs   | 110 ++++++++++++++++++++++++
>   src/api2/admin/datastore.rs          |  81 ++++++++++++------
>   src/api2/backup/mod.rs               |   4 +-
>   src/api2/config/datastore.rs         |   5 ++
>   src/api2/reader/mod.rs               |   6 +-
>   src/api2/status.rs                   |   4 +-
>   src/api2/tape/backup.rs              |   6 +-
>   src/api2/tape/restore.rs             |   6 +-
>   src/bin/proxmox-backup-api.rs        |   1 +
>   src/bin/proxmox-backup-proxy.rs      |   4 +-
>   src/server/mod.rs                    |  16 +++-
>   src/server/prune_job.rs              |   4 +-
>   src/server/pull.rs                   |   4 +-
>   src/server/verify_job.rs             |   4 +-
>   www/Makefile                         |   1 +
>   www/Utils.js                         |  23 +++++
>   www/datastore/OptionView.js          |  30 +++++++
>   www/window/MaintenanceOptions.js     |  77 +++++++++++++++++
>   27 files changed, 540 insertions(+), 91 deletions(-)
>   create mode 100644 pbs-api-types/src/maintenance.rs
>   create mode 100644 pbs-datastore/src/task_tracking.rs
>   create mode 100644 www/window/MaintenanceOptions.js

I just wanted to reply to this series, to get the ball rolling again. 
However, I can't say that I found much real issues with it on first 
glance, so I've just added some very minor suggestions.

As a rebase is now required for it to apply, I haven't done any testing. 
I'd be happy to test once it's rebased though.


regards,

Dylan





  parent reply	other threads:[~2022-04-06 13:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 17:14 Hannes Laimer
2022-02-17 17:14 ` [pbs-devel] [PATCH proxmox-backup v9 1/6] api-types: add maintenance type Hannes Laimer
2022-04-06 13:08   ` Dylan Whyte
2022-04-11  7:33     ` Thomas Lamprecht
2022-02-17 17:14 ` [pbs-devel] [PATCH proxmox-backup v9 2/6] datastore: add check for maintenance in lookup Hannes Laimer
2022-04-06 13:08   ` Dylan Whyte
2022-02-17 17:14 ` [pbs-devel] [PATCH proxmox-backup v9 3/6] pbs-datastore: add active operations tracking Hannes Laimer
2022-02-17 17:14 ` [pbs-devel] [PATCH proxmox-backup v9 4/6] api: make maintenance_type updatable Hannes Laimer
2022-02-17 17:14 ` [pbs-devel] [PATCH proxmox-backup v9 5/6] api: add get_active_operations endpoint Hannes Laimer
2022-02-17 17:14 ` [pbs-devel] [PATCH proxmox-backup v9 6/6] ui: add option to change the maintenance type Hannes Laimer
2022-04-06 13:08 ` Dylan Whyte [this message]
2022-04-11  7:35   ` [pbs-devel] [PATCH proxmox-backup v9 0/6] closes #3071: maintenance mode for datastore Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf7c9fff-7f06-1794-bcbf-885c6ca6c6b4@proxmox.com \
    --to=d.whyte@proxmox.com \
    --cc=h.laimer@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal