From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Stoiko Ivanov <s.ivanov@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 2/2] acme: plugin: add sleep for dns propagation
Date: Mon, 28 Jun 2021 19:01:43 +0200 [thread overview]
Message-ID: <80dc2af6-c84d-0de5-79b5-7a9787b6c449@proxmox.com> (raw)
In-Reply-To: <20210628162741.74992-3-s.ivanov@proxmox.com>
"fix #3496: ..."
On 28.06.21 18:27, Stoiko Ivanov wrote:
> the dns plugin config allow for a specified amount of time to wait for
> the TXT record to be set and propagated through DNS.
>
> This patch adds a sleep for this amount of time.
> The log message was taken from the perl implementation in proxmox-acme
> for consistency.
>
> Tested with the powerdns plugin in my test setup.
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> src/acme/plugin.rs | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/src/acme/plugin.rs b/src/acme/plugin.rs
> index 5e0e547a..96f64b7d 100644
> --- a/src/acme/plugin.rs
> +++ b/src/acme/plugin.rs
> @@ -2,6 +2,7 @@ use std::future::Future;
> use std::pin::Pin;
> use std::process::Stdio;
> use std::sync::Arc;
> +use std::time::Duration;
>
> use anyhow::{bail, format_err, Error};
> use hyper::{Body, Request, Response};
> @@ -168,6 +169,13 @@ impl DnsPlugin {
> );
> }
>
> + let validation_delay = self.core.validation_delay.unwrap_or(30) as u64;
misses the `if validation_delay > 0 {` for consistency with PVE and PMG.
> + task.log(format!(
> + "Sleeping {} seconds to wait for TXT record propagation",
> + validation_delay
> + ));
> + tokio::time::sleep(Duration::from_secs(validation_delay)).await;
> +
This now adds the delay on every action, not only on "setup" like in PVE/PMG - makes
no sense to do so for teardown...
> Ok(&challenge.url)
> }
> }
>
prev parent reply other threads:[~2021-06-28 17:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 16:27 [pbs-devel] [PATCH proxmox-backup 0/2] acme: add sleep for dns record propagation Stoiko Ivanov
2021-06-28 16:27 ` [pbs-devel] [PATCH proxmox-backup 1/2] config: acme: make validation_delay crate public Stoiko Ivanov
2021-06-28 16:27 ` [pbs-devel] [PATCH proxmox-backup 2/2] acme: plugin: add sleep for dns propagation Stoiko Ivanov
2021-06-28 17:01 ` Thomas Lamprecht [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=80dc2af6-c84d-0de5-79b5-7a9787b6c449@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=s.ivanov@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