From 67b329e3e370f481da545a4c95577f60c9be08b6 Mon Sep 17 00:00:00 2001 From: Jens Sauer Date: Mon, 4 Mar 2019 19:17:53 +0100 Subject: [PATCH] OVH: Refresh zone after deleting challenge record (#815) After removing the challenge record from OVH, the zone itself does not get refreshed and leaving the obsolete record in place. Calling '/domain/zone/ZONE/refresh' after deleting the record will apply the changes to the zone. --- providers/dns/ovh/ovh.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/providers/dns/ovh/ovh.go b/providers/dns/ovh/ovh.go index ee01c009..6473b198 100644 --- a/providers/dns/ovh/ovh.go +++ b/providers/dns/ovh/ovh.go @@ -173,6 +173,13 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error { return fmt.Errorf("ovh: error when call OVH api to delete challenge record (%s): %v", reqURL, err) } + // Apply the change + reqURL = fmt.Sprintf("/domain/zone/%s/refresh", authZone) + err = d.client.Post(reqURL, nil, nil) + if err != nil { + return fmt.Errorf("ovh: error when call api to refresh zone (%s): %v", reqURL, err) + } + // Delete record ID from map d.recordIDsMu.Lock() delete(d.recordIDs, fqdn)