Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5.7.1withceph #21

Merged
merged 49 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1d2bde3
5.4.3 client compatibility patch
Jo-stfc Mar 28, 2023
44e8b22
SEGV fix for multistream
Jo-stfc Mar 28, 2023
afe6e32
CMS token patch for scope /
Jan 11, 2024
f2422ae
patch to reject /foobar paths when scope is set to /foo
Jan 17, 2024
445e69b
add stat permission to create/modify/delete in scitokens
Feb 9, 2024
5ab9a35
allow stat and folder creation of superfolders according to specs in …
Feb 9, 2024
c3ac3ad
allow stat and folder creation of superfolders according to specs in …
Feb 9, 2024
a3a69a6
restrict mkdir superfolder permission to create/modify scopes only
Jo-stfc Feb 15, 2024
fc51cea
revised load balancing algorithm - weighed random selection
Jo-stfc Feb 28, 2024
684d851
default to skip nodes
Jo-stfc Feb 28, 2024
d435439
sort compilation warnings
Jo-stfc Feb 29, 2024
b4d4962
Merge pull request #4 from stfc/superfolder_access
Jo-stfc Feb 29, 2024
1d846c8
remove stale checksum check in standard xrootd
Feb 13, 2024
8095f8a
Merge pull request #10 from stfc/noscript_checksum
Jo-stfc Mar 4, 2024
e8e6433
add case when multiple nodes report max load for selection to still h…
Jo-stfc Mar 4, 2024
975006c
Merge branch 'v5.5.4patched' into noscript_checksum
Jo-stfc Apr 30, 2024
025b629
Merge pull request #9 from stfc/noscript_checksum
Jo-stfc Apr 30, 2024
df37fd8
Merge pull request #12 from stfc/v5.5.4patched
Jo-stfc May 8, 2024
6db725d
case insensitive headers for xrdhttp
Jo-stfc May 8, 2024
8123a86
Merge pull request #13 from stfc/v5.5.4fix
Jo-stfc May 8, 2024
f9e1691
making random generation static to limit memory usage
Jun 13, 2024
553935d
prevent allocation overflow for weighed array when no nodes are logge…
Jun 14, 2024
1531255
restrict new LB to section previously taken by load selection
Jun 14, 2024
c071a30
restrict new LB to section previously taken by load selection
Jun 14, 2024
9986339
revert LB algorithm for rocky8 primary cmsd
Jun 14, 2024
8af86c8
static array
Jun 19, 2024
d81af68
static array
Jun 19, 2024
a8181eb
stop crashes due to CA
Jo-stfc Jun 21, 2024
9686073
pgrwdbg
Jo-stfc Jun 21, 2024
0d9a457
pgrwdbg
Jo-stfc Jun 21, 2024
f2fce2e
do not pgio
Jo-stfc Jun 21, 2024
cf22600
Amadio's fix
Jo-stfc Jun 25, 2024
09080c2
Merge pull request #15 from stfc/upstream_lb
Jo-stfc Jul 26, 2024
f753f67
Merge branch 'v5.5.4patched' into rocky8temp
Jo-stfc Jul 26, 2024
7764992
Merge branch 'v5.7.0patched' into rocky8temp
Jo-stfc Aug 4, 2024
d03e7e3
Merge pull request #16 from stfc/rocky8temp
Jo-stfc Aug 4, 2024
d2dc437
remove Centos7 CI
Jo-stfc Aug 4, 2024
ed754de
fixed version
Jo-stfc Aug 8, 2024
6dd8cd1
XrdCeph module back into core
Jo-stfc Aug 8, 2024
003d5e8
[XrdPfc] Make sure direct vread requests conform to protocol limits. …
osschar Aug 22, 2024
431f515
[Protocol] Define readv limits.
abh3 Aug 17, 2024
1796a3c
[Protocol] Indicate whether or not server has a cache in kXR_Protocol…
abh3 Jul 31, 2024
fdf0e65
spec tuning
Jo-stfc Sep 9, 2024
b53f318
Merge tag 'v5.7.1' of https://github.com/xrootd/xrootd
Jo-stfc Sep 9, 2024
bfcf7db
Merge branch 'v5.7.1withceph' into v5.7.1
Jo-stfc Sep 9, 2024
46dca9d
Merge pull request #18 from stfc/v5.7.1
Jo-stfc Sep 9, 2024
d583a7f
match spec
Jo-stfc Sep 18, 2024
441fd05
edit filenotfound response for dfs
Jo-stfc Sep 24, 2024
16892b5
Merge branch 'v5.7.2patched' into v5.7.1withceph
Jo-stfc Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
run: |
tests/post-install.sh
tests/check-headers.sh

centos7:
name: CentOS 7
runs-on: ubuntu-latest
Expand Down Expand Up @@ -134,7 +134,6 @@ jobs:
run: |
source /opt/rh/devtoolset-7/enable
su -p runner -c 'ctest3 -VV -S test.cmake'

alma8:
name: Alma 8
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$Format:%(describe)$
v5.7.1
5 changes: 5 additions & 0 deletions packaging/makesrpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ echo "[i] Working with version: $VERSION"
# Sanitize version to work with RPMs
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
#-------------------------------------------------------------------------------
RELEASE=4
if test x`echo $VERSION | grep -E $RCEXP` != x; then
RELEASE=0.`echo $VERSION | sed 's/.*-rc/rc/'`
VERSION=`echo $VERSION | sed 's/-rc.*//'`
fi

VERSION=${VERSION#v} # remove "v" prefix
VERSION=${VERSION/-rc/~rc} # release candidates use ~ in RPMs
Expand Down
28 changes: 22 additions & 6 deletions src/XrdCeph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ else()
endif()
endif()

include_directories( ${RADOS_INCLUDE_DIR} )

set(BUILD_CEPH TRUE CACHE BOOL INTERNAL FORCE)

add_library(XrdCephPosix SHARED
XrdCephPosix.cc XrdCephPosix.hh)
XrdCephPosix.cc XrdCephPosix.hh
XrdCephBulkAioRead.cc XrdCephBulkAioRead.hh
)

target_compile_options(XrdCephPosix
PRIVATE -Wno-deprecated-declarations)
Expand All @@ -28,17 +32,29 @@ target_include_directories(XrdCephPosix
PUBLIC ${RADOS_INCLUDE_DIR} $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>)

set_target_properties(XrdCephPosix
PROPERTIES VERSION 0.0.1 SOVERSION 0)
PROPERTIES VERSION 5.7.0 SOVERSION 0)

set(LIB_XRD_CEPH XrdCeph-${PLUGIN_VERSION})

add_library(${LIB_XRD_CEPH} MODULE
XrdCephOss.cc XrdCephOss.hh
XrdCephOssFile.cc XrdCephOssFile.hh
XrdCephOssDir.cc XrdCephOssDir.hh)
XrdCephOss.cc XrdCephOss.hh
XrdCephOssFile.cc XrdCephOssFile.hh
XrdCephOssDir.cc XrdCephOssDir.hh
XrdCephBulkAioRead.cc XrdCephBulkAioRead.hh
XrdCephOssBufferedFile.cc XrdCephOssBufferedFile.hh
XrdCephOssReadVFile.cc XrdCephOssReadVFile.hh
XrdCephBuffers/XrdCephBufferDataSimple.cc XrdCephBuffers/XrdCephBufferDataSimple.hh
XrdCephBuffers/XrdCephBufferAlgSimple.cc XrdCephBuffers/XrdCephBufferAlgSimple.hh
XrdCephBuffers/CephIOAdapterRaw.cc XrdCephBuffers/CephIOAdapterRaw.hh
XrdCephBuffers/CephIOAdapterAIORaw.cc XrdCephBuffers/CephIOAdapterAIORaw.hh
XrdCephBuffers/BufferUtils.cc XrdCephBuffers/BufferUtils.hh
XrdCephBuffers/XrdCephReadVNoOp.cc XrdCephBuffers/XrdCephReadVNoOp.hh
XrdCephBuffers/XrdCephReadVBasic.cc XrdCephBuffers/XrdCephReadVBasic.hh
)

target_link_libraries(${LIB_XRD_CEPH}
PRIVATE ${XROOTD_LIBRARIES} XrdCephPosix)
PRIVATE ${XROOTD_LIBRARIES} XrdCephPosix
)

set(LIB_XRD_CEPH_XATTR XrdCephXattr-${PLUGIN_VERSION})

Expand Down
169 changes: 169 additions & 0 deletions src/XrdCeph/XrdCephBuffers/BufferUtils.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@

#include "BufferUtils.hh"
#include <algorithm> // std::max

using namespace XrdCephBuffer;

#ifdef CEPHBUFDEBUG
// to synchronise logging statements
std::mutex cephbuf_iolock;
#endif

// ------------------------------------------------------ //
// Extent //

bool Extent::in_extent(off_t pos) const
{
return ((pos > begin()) && (pos < end()));
}

bool Extent::isContiguous(const Extent &rhs) const
{
// does the rhs connect directly to the end of the first
if (end() != rhs.begin())
return false;
return true;
}

bool Extent::allInExtent(off_t pos, size_t len) const
{
// is all the range in this extent
if ((pos < begin()) || (pos >= end()))
return false;

if (off_t(pos + len) > end())
return false;
return true;
}
bool Extent::someInExtent(off_t pos, size_t len) const
{ // is some of the range in this extent
if ((off_t(pos + len) < begin()) || (pos >= end()))
return false;
return true;
}

Extent Extent::containedExtent(off_t pos, size_t len) const
{
// return the subset of input range that is in this extent
off_t subbeg = std::max(begin(), pos);
off_t subend = std::min(end(), off_t(pos + len));

return Extent(subbeg, subend - subbeg);
}
Extent Extent::containedExtent(const Extent &rhs) const
{
return containedExtent(rhs.begin(), rhs.len());
}

bool Extent::operator<(const Extent &rhs) const
{
// comparison primarily on begin values
// use end values if begin values are equal.

if (begin() > rhs.begin()) return false;
if (begin() < rhs.begin()) return true;
if (end() < rhs.end() ) return true;
return false;
}
bool Extent::operator==(const Extent &rhs) const
{
// equivalence based only on start and end
if (begin() != rhs.begin())
return false;
if (end() != rhs.end())
return false;
return true;
}

// ------------------------------------------------------ //
// ExtentHolder //

ExtentHolder::ExtentHolder() {}

ExtentHolder::ExtentHolder(size_t elements)
{
m_extents.reserve(elements);
}

ExtentHolder::ExtentHolder(const ExtentContainer &extents)
{
m_extents.reserve(extents.size());
for (ExtentContainer::const_iterator vit = m_extents.cbegin(); vit != m_extents.cend(); ++vit) {
push_back(*vit);
}

}
ExtentHolder::~ExtentHolder()
{
m_extents.clear();
}

void ExtentHolder::push_back(const Extent & in) {
if (size()) {
m_begin = std::min(m_begin, in.begin());
m_end = std::max(m_end, in.end());
} else {
m_begin = in.begin();
m_end = in.end();
}
return m_extents.push_back(in);
}



Extent ExtentHolder::asExtent() const {
// if (!size()) return Extent(0,0);
// ExtentContainer se = getSortedExtents();
// off_t b = se.front().begin();
// off_t e = se.back().end();

return Extent(m_begin, m_end-m_begin);

}

size_t ExtentHolder::bytesContained() const {
size_t nbytes{0};
for (ExtentContainer::const_iterator vit = m_extents.cbegin(); vit != m_extents.cend(); ++vit) {
nbytes += vit->len();
}
return nbytes;
}

size_t ExtentHolder::bytesMissing() const {
size_t bytesUsed = bytesContained();
size_t totalRange = asExtent().len(); //might be expensive to call
return totalRange - bytesUsed;
}


void ExtentHolder::sort() {
std::sort(m_extents.begin(), m_extents.end());
}


ExtentContainer ExtentHolder::getSortedExtents() const {
ExtentContainer v;
v.assign(m_extents.begin(), m_extents.end() );
std::sort(v.begin(), v.end());
return v;
}

ExtentContainer ExtentHolder::getExtents() const {
ExtentContainer v;
v.assign(m_extents.begin(), m_extents.end() );
return v;
}

// ------------------------------------------------------ //
// Timer ns //

Timer_ns::Timer_ns(long &output) : m_output_val(output)
{
m_start = std::chrono::steady_clock::now();
}

Timer_ns::~Timer_ns()
{
auto end = std::chrono::steady_clock::now();
m_output_val = std::chrono::duration_cast<std::chrono::nanoseconds>(end - m_start).count();
}
Loading
Loading