Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-manzi committed Sep 18, 2019
2 parents 6706ca2 + 5ee3321 commit a6a7358
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 64 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ set (OUTPUT_NAME_TRANSFER "gfal_transfer")

set (VERSION_MAJOR 2)
set (VERSION_MINOR 16)
set (VERSION_PATCH 3)
set (VERSION_PATCH 4)
set (VERSION_STRING ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})

add_definitions(-DVERSION="${VERSION_STRING}")
Expand Down
31 changes: 31 additions & 0 deletions RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
GFAL2 RELEASE-NOTES
===================

## Wed Sep 18 2019 Andrea Manzi <amanzi at cern.ch> - 2.16.4
###Bug
- [DMC-1173] - The xrootd plugin ignores the make parent option

###Task
- [DMC-1159] - Implement Xrootd prepare evict on sources when Xrootd TPC transfers succeed
- [DMC-1160] - Remove conditional compilation code to still support xrootd v3 on xrootd plugin
- [DMC-1166] - Add support for canceling HTTP TPC transfers

## Fri May 17 2019 Andrea Manzi <amanzi at cern.ch> - 2.16.3
###Bug
- [DMC-1026] - gfal-copy segmentation fault on MacOSx
- [DMC-1137] - gfal2.Gfal2Context.cancel issue for Xrootd transfers
- [DMC-1147] - The autoCleanFileCopy function in gridftp plugin never executes the file unlink
- [DMC-1155] - gfal-rm with signed https URL gives 401 error

###Task
- [DMC-1152] - Map stat file flags for Xrootd to SRM user.status xattr
- [DMC-1156] - Sanitize gridftp checksum returned by globus
- [DMC-1157] - Integrate new API for staging canceling in Xrootd

## Thu Feb 21 2019 Andrea Manzi <amanzi at cern.ch> - 2.16.2
###Bug
- [DMC-1131] - Transfers gridftp->ftp fail as GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK is not supported on FTP

###Task
- [DMC-1123] - Add ENABLE_FALLBACK_COPY variable to http plugin
- [DMC-1125] - Add X509 delegation to Xrootd TPC job properties
- [DMC-1129] - Add a query parameter to HTTP urls for the configuration of the copy mode

## Wed Oct 31 2018 Andrea Manzi <amanzi at cern.ch> - 2.16.1
###Bug
- [DMC-1099] - Checksum comparison in Xrootd is wrongly enabled for FTS transfers
Expand Down
5 changes: 5 additions & 0 deletions packaging/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
gfal2 (2.16.4-1) unstable; urgency=low
* New version

-- DMC Devel <[email protected]> Tue, 9 Jul 2019 14:00

gfal2 (2.16.3-1) unstable; urgency=low
* New version

Expand Down
8 changes: 4 additions & 4 deletions packaging/rpm/gfal2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%bcond_with tests

Name: gfal2
Version: 2.16.3
Version: 2.16.4
Release: 1%{?dist}
Summary: Grid file access library 2.0
Group: Applications/Internet
Expand Down Expand Up @@ -54,9 +54,9 @@ BuildRequires: dcap-devel
#gridftp plugin dependencies
BuildRequires: globus-gass-copy-devel
#http plugin dependencies
BuildRequires: davix-devel >= 0.6.8
BuildRequires: davix-devel >= 0.7.4
#xrootd plugin dependencies
BuildRequires: xrootd-client-devel >= 1:4.9.0
BuildRequires: xrootd-client-devel >= 1:4.10.0
# sftp plugin dependencies
BuildRequires: libssh2-devel
#tests dependencies
Expand Down Expand Up @@ -169,7 +169,7 @@ the third party transfer support on the GSIFTP URLs.
Summary: Provides the HTTP/DAV support for %{name}
Group: Applications/Internet
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: davix-libs >= 0.6.8
Requires: davix-libs >= 0.7.4

%description plugin-http
Provides the HTTP (http[s]://) and WevDAV (dav[s]://) support for %{name}.
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/file/gfal_file_plugin_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ static ssize_t adler32_update(void *chk_handler, const char *buffer, size_t s)
static int adler32_getResult(void *chk_handler, char *resu, size_t s_b)
{
unsigned long *lp = (unsigned long *) chk_handler;
snprintf(resu, s_b, "%lx", *lp);
snprintf(resu, s_b, "%08lx", *lp);
free(lp);
return 0;
}
Expand Down
13 changes: 11 additions & 2 deletions src/plugins/http/gfal_http_copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ static int gfal_http_copy_make_parent(plugin_handle plugin_data,
}
}

static bool gfal_http_cancellationcopy_callback(void* data)
{
return gfal2_is_canceled(*static_cast<gfal2_context_t*>(data));
}

static void gfal_http_3rdcopy_perfcallback(const Davix::PerformanceData& perfData, void* data)
{
Expand Down Expand Up @@ -348,7 +352,8 @@ static std::string get_canonical_uri(const std::string& original)
}


static int gfal_http_third_party_copy(GfalHttpPluginData* davix,
static int gfal_http_third_party_copy(gfal2_context_t context,
GfalHttpPluginData* davix,
const char* src, const char* dst,
CopyMode mode,
gfalt_params_t params,
Expand Down Expand Up @@ -399,6 +404,7 @@ static int gfal_http_third_party_copy(GfalHttpPluginData* davix,
Davix::DavixCopy copy(davix->context, &req_params);

copy.setPerformanceCallback(gfal_http_3rdcopy_perfcallback, &perfCallbackData);
copy.setCancellationCallback(gfal_http_cancellationcopy_callback, &context);

Davix::DavixError* davError = NULL;
copy.copy(src_uri, dst_uri,
Expand Down Expand Up @@ -692,7 +698,7 @@ int gfal_http_copy(plugin_handle plugin_data, gfal2_context_t context,
}
}
else {
ret = gfal_http_third_party_copy(davix, src, dst, copy_mode, params, &nested_error);
ret = gfal_http_third_party_copy(context, davix, src, dst, copy_mode, params, &nested_error);
}

if (ret == 0) {
Expand All @@ -707,6 +713,9 @@ int gfal_http_copy(plugin_handle plugin_data, gfal2_context_t context,
nested_error->message);
// Delete any potential destination file.
gfal_http_copy_cleanup(plugin_data, dst, &nested_error);
if (!gfal_should_fallback(nested_error->code)){
break;
}
}

copy_mode = (CopyMode)((int)copy_mode + 1);
Expand Down
15 changes: 14 additions & 1 deletion src/plugins/http/gfal_http_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,17 @@ static gboolean gfal_http_check_url(plugin_handle plugin_data, const char* url,
}
}

gboolean gfal_should_fallback(int error_code)
{

switch(error_code) {
case ECANCELED:
return false;
default:
return true;

}
}

static int davix2errno(StatusCode::Code code)
{
Expand Down Expand Up @@ -508,6 +518,7 @@ static int davix2errno(StatusCode::Code code)
case StatusCode::CredentialNotFound:
case StatusCode::CredDecryptionError:
case StatusCode::SSLError:
case StatusCode::DelegationError:
errcode = EACCES;
break;

Expand All @@ -518,7 +529,9 @@ static int davix2errno(StatusCode::Code code)
case StatusCode::FileExist:
errcode = EEXIST;
break;

case StatusCode::Canceled:
errcode = ECANCELED;
break;
default:
errcode = EIO;
break;
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/http/gfal_http_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,6 @@ int gfal_http_copy(plugin_handle plugin_data, gfal2_context_t context, gfalt_par
int gfal_http_copy_check(plugin_handle plugin_data, gfal2_context_t context,
const char* src, const char* dst, gfal_url2_check check);

gboolean gfal_should_fallback(int error_code);

#endif //_GFAL_HTTP_PLUGIN_H
Loading

0 comments on commit a6a7358

Please sign in to comment.