From: Norbert Bizet Date: Wed, 3 Nov 2021 13:30:10 +0000 (-0400) Subject: cloud: Fix #8265 Do not re-open part.1 during truncate X-Git-Tag: Release-11.3.2~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17674123f9a8bbef8cf2d8ce14d1e609f50bd513;p=thirdparty%2Fbacula.git cloud: Fix #8265 Do not re-open part.1 during truncate Whem using glacier, if we re-open the part.1 after the truncate, bacula might have to wait 3 days to get the part.1 from the cloud to finally truncate it as well. During this call, the SD is locked and all jobs are blocked. --- diff --git a/bacula/src/stored/cloud_dev.c b/bacula/src/stored/cloud_dev.c index c403a4f28..c892cf833 100644 --- a/bacula/src/stored/cloud_dev.c +++ b/bacula/src/stored/cloud_dev.c @@ -1792,16 +1792,6 @@ bool cloud_dev::truncate(DCR *dcr) dcr->VolCatInfo.VolLastPartBytes = 0; dcr->VolCatInfo.VolCatCloudParts = 0; - openmode = CREATE_READ_WRITE; - if (!open_next_part(dcr)) { - goto get_out; - } - - /* check if the current volume is present in the proxy */ - if (!probe_cloud_proxy(dcr, getVolCatName())) { - goto get_out; - } - /* wrap the uploads in a parts ilist */ transfer *tpkt; foreach_alist(tpkt, dcr->uploads) {