]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
cloud: Fix #10259 Oracle cloud failed behind. Several updates
authornorbert.bizet <norbert.bizet@baculasystems.com>
Thu, 24 Aug 2023 10:27:53 +0000 (06:27 -0400)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:02 +0000 (13:57 +0200)
bacula/src/stored/generic_driver.c
regress/scripts/functions

index 6819c8563b780555a616d11d38de2a525994e277..abde8b341e8499353b0a783b4e589a71b5e67bc5 100644 (file)
@@ -1128,17 +1128,20 @@ bool generic_driver::clean_cloud_volume(const char *VolumeName, cleanup_cb_type
       if (!parts.get(i)) {
          continue;
       }
-      rtn |= call_fct("delete", VolumeName, (char*)parts.get(i), NULL, NULL, cancel_cb, err);
-      if (rtn == 0) {
+      int r = call_fct("delete", VolumeName, (char*)parts.get(i), NULL, NULL, cancel_cb, err);
+      if (r == 0) {
          Dmsg2(dbglvl, "clean_cloud_volume for %s: Unlink file %s.\n", VolumeName, (char*)parts.get(i));
+      } else {
+         Dmsg4(dbglvl, "clean_cloud_volume delete %s/%s returns %d. err=%s\n", VolumeName, (char*)parts.get(i), r, err);
       }
+      rtn |= r;
       if ((cancel_cb && cancel_cb->fct && cancel_cb->fct(cancel_cb->arg))) {
          Mmsg(err, _("clean_cloud_volume. cancelled by job.\n"));
          return false;
       }
    }
 
-   return (ret == 0);
+   return (ret|rtn == 0);
 }
 
 struct get_cloud_volume_parts_list_read_cb_arg {
index 05ee29cf29d9a909ec2c373e1e64037eb0262d51..f2ff4856621a9793bc43581b76f0724beca6bf57 100755 (executable)
@@ -63,7 +63,7 @@ update_cloud()
    fi
 
    if [ x$CLOUD_NAME = xOracleCloud -a -f $HOME/.oci/config ]; then
-       oci  os bucket create --name ${1:-regressbucket}
+       #oci  os bucket create --name ${1:-regressbucket} --compartiment-id 
        $bperl -e "add_attribute('$conf/bacula-sd.conf', 'HostName', '$HOME/.oci/config', 'Cloud', 'OracleCloud')"
    fi