all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	 Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup] api2/tape/backup: wait indefinitely for lock in scheduled backup jobs
Date: Thu, 18 Mar 2021 07:04:49 +0100 (CET)	[thread overview]
Message-ID: <78100482.244.1616047490016@webmail.proxmox.com> (raw)
In-Reply-To: <20210317133810.24041-1-d.csapak@proxmox.com>


> +            let (job_result, summary) = match try_block!({
> +                if schedule.is_some() {
> +                    // for scheduled tape backup jobs, we wait indefinitely for the lock
> +                    task_log!(worker, "waiting for drive lock...");
> +                    loop {
> +                        if let Ok(lock) = lock_tape_device(&drive_config, &setup.drive) {
> +                            drive_lock = Some(lock);
> +                            break;
> +                        } // ignore errors

I would prefer to add a timeout parameter to lock_tape_device() call.
The question is if the lock call gets interrupted by task abort?

> +
> +                        worker.check_abort()?;
> +                    }
> +                }
> +                set_tape_device_state(&setup.drive, &worker.upid().to_string())?;




      parent reply	other threads:[~2021-03-18  6:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 13:38 Dominik Csapak
2021-03-18  5:53 ` Dietmar Maurer
2021-03-18  9:25   ` Dominik Csapak
2021-03-18  6:04 ` Dietmar Maurer [this message]

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=78100482.244.1616047490016@webmail.proxmox.com \
    --to=dietmar@proxmox.com \
    --cc=d.csapak@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