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

DAOS-15136 client: Switch to using libfused #14077

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
df7aadc
DAOS-15136 client: Switch to using libfused
jolivier23 Mar 27, 2024
7bf9fb8
Merge branch 'master' into jvolivie/fused
jolivier23 Mar 28, 2024
20bf3b6
PR-repos: fused@1:28
jolivier23 Mar 28, 2024
1cff4e9
Fix whitespace issue
jolivier23 Mar 28, 2024
cb44999
Merge branch 'master' into jvolivie/fused
jolivier23 Apr 5, 2024
28e8479
PR-repos: fused@PR-1:28
jolivier23 Apr 5, 2024
1a37b21
fix bad merge
jolivier23 Apr 25, 2024
ef30117
Merge branch 'master' into jvolivie/fused
jolivier23 Apr 25, 2024
22ac591
PR-repos: fused@PR-1:29
jolivier23 Apr 25, 2024
926f43a
DAOS-15753 dfuse: Do not deadlock when failing to mount.
ashleypittman Apr 25, 2024
2a8ff90
PR-repos: fused@PR-1:29
jolivier23 Apr 25, 2024
e5fbffa
Merge branch 'master' into jvolivie/fused
jolivier23 Dec 20, 2024
e991acb
Empty commit for pragmas
jolivier23 Dec 20, 2024
18b1e5e
Remove the sed
jolivier23 Dec 20, 2024
a397c1e
Fix a few more issues
jolivier23 Dec 20, 2024
dc5d340
Features: dfuse
jolivier23 Dec 20, 2024
85041ed
Clean up rpm dependencies
jolivier23 Dec 20, 2024
0ed4c7c
empty commit for test
jolivier23 Dec 20, 2024
4b266cf
Add back valgrind testing
jolivier23 Dec 20, 2024
3f3a397
fix typo
jolivier23 Dec 20, 2024
515b136
Try again
jolivier23 Dec 21, 2024
7585023
Add missing FUSE_CAP for printing
jolivier23 Dec 21, 2024
45a2e77
Merge branch 'master' into jvolivie/fused
jolivier23 Dec 21, 2024
c1082d5
Merge branch 'master' into jvolivie/fused
jolivier23 Dec 23, 2024
7ba97a2
Merge branch 'master' into jvolivie/fused
jolivier23 Dec 26, 2024
6fd013c
Merge master again now that jenkins is back
jolivier23 Dec 26, 2024
53e307a
Merge branch 'master' into jvolivie/fused
jolivier23 Jan 7, 2025
c3c65a9
Test again
jolivier23 Jan 7, 2025
3a98c97
Merge branch 'master' into jvolivie/fused
jolivier23 Jan 8, 2025
f0002f9
Features: dfuse
jolivier23 Jan 8, 2025
fad1a2d
empty commit to retest
jolivier23 Jan 9, 2025
5752261
Use static library
jolivier23 Jan 11, 2025
02e8a79
Empty commit to retest
jolivier23 Jan 12, 2025
3487bc6
Try again to see if it picks up #4
jolivier23 Jan 12, 2025
0f3267e
Test with static library
jolivier23 Jan 12, 2025
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
8 changes: 7 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
daos (2.5.101-4) unstable; urgency=medium
daos (2.5.101-5) unstable; urgency=medium
[ Jeff Olivier ]
* Switch from libfuse3 to libfused

-- Jeff Olivier <[email protected]> Thu, 25 Apr 2024 10:30:00 +0000

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth bringing this timestamp up-to-date.

daos (2.5.101-5) unstable; urgency=medium
[ Fan Yong ]
* NOOP change to keep in parity with RPM version

Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Build-Depends: debhelper (>= 10),
libabt-dev,
libucx-dev,
libpmemobj-dev (>= 2.0.0),
libfuse3-dev,
libfused-dev,
libprotobuf-c-dev,
libjson-c-dev,
dpdk-dev (>= 21.11.2),
Expand Down
14 changes: 13 additions & 1 deletion site_scons/components/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2023 Intel Corporation
# Copyright 2016-2024 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -308,6 +308,18 @@ def define_components(reqs):
required_progs=['libtoolize', 'ninja', 'meson'],
out_of_src_build=True)

reqs.define('fused', libs=['fused'], defines=['FUSE_USE_VERSION=35'],
retriever=GitRepoRetriever('https://github.com/daos-stack/fused.git'),
commands=[['find', '../fused', '-type', 'f', '-name', '*', '-exec', 'sed', '-i',
's/fuse3/fused/g', '{}', ';'],
['meson', 'setup', '--prefix=$FUSED_PREFIX', '-Ddisable-mtab=True',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments in daos-stack/fused#1 about -name * and xargs.

'-Dudevrulesdir=$FUSED_PREFIX/udev', '-Dutils=False',
'--default-library', 'shared', '../fused'],
['ninja', 'install']],
headers=['fused/fuse.h'],
required_progs=['libtoolize', 'ninja', 'meson'],
out_of_src_build=True)

# Tell SPDK which CPU to optimize for, by default this is native which works well unless you
# are relocating binaries across systems, for example in CI under GitHub actions etc. There
# isn't a minimum value needed here, but getting this wrong will cause daos server to exit
Expand Down
3 changes: 1 addition & 2 deletions site_scons/prereq_tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ def __init__(self, env, opts):
opts.Add(('MPI_PKG', 'Specifies name of pkg-config to load for MPI', None))
opts.Add(BoolVariable('FIRMWARE_MGMT', 'Build in device firmware management.', False))
opts.Add(BoolVariable('STACK_MMAP', 'Allocate ABT ULTs stacks with mmap()', False))
opts.Add(BoolVariable('STATIC_FUSE', "Build with static libfuse library", False))
opts.Add(EnumVariable('BUILD_TYPE', "Set the build type", 'release',
['dev', 'debug', 'release'], ignorecase=1))
opts.Add(EnumVariable('TARGET_TYPE', "Set the prerequisite type", 'default',
Expand Down Expand Up @@ -521,7 +520,7 @@ def run_build(self, opts):
# argobots is not really needed by client but it's difficult to separate
common_reqs = ['ucx', 'ofi', 'hwloc', 'mercury', 'boost', 'uuid', 'crypto', 'protobufc',
'lz4', 'isal', 'isal_crypto']
client_reqs = ['fuse', 'json-c', 'capstone']
client_reqs = ['fused', 'json-c', 'capstone']
server_reqs = ['argobots', 'pmdk', 'spdk', 'ipmctl']
test_reqs = ['cmocka']

Expand Down
30 changes: 4 additions & 26 deletions src/client/dfuse/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def check_ioctl_def(context, ctype):
context.Message(f'Checking if fuse ioctl is type {ctype} ')

# pylint: disable-next=consider-using-f-string
src = """#include <fuse3/fuse_lowlevel.h>
src = """#include <fused/fuse_lowlevel.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for working with various fuse versions, we should replace this with a simple version check.


extern void
my_ioctl (fuse_req_t req, fuse_ino_t ino, %s cmd,
Expand Down Expand Up @@ -175,22 +175,6 @@ def configure_fuse(cenv):
check.Finish()


def find_static_fuse(cenv):
"""Find and copy static fuse library"""

fuse_prefix = '/usr'
if os.path.exists(cenv.subst('$FUSE_PREFIX')):
fuse_prefix = cenv.subst('$FUSE_PREFIX')

for path in ['lib64', 'lib/x86_64-linux-gnu', 'lib']:
fuselib = os.path.join(fuse_prefix, path, "libfuse3.a")
if os.path.exists(fuselib):
return [File(fuselib)]

print("Could not find libfuse3.a")
return []


def scons():
"""Scons function"""

Expand Down Expand Up @@ -229,14 +213,8 @@ def scons():
cenv.AppendUnique(LIBS=['dfs', 'duns'])

cenv.require('hwloc')
if cenv.get('STATIC_FUSE'):
cenv.require('fuse', headers_only=True)
static_fuse = find_static_fuse(cenv)
extra_libs = ['dl']
else:
cenv.require('fuse')
static_fuse = []
extra_libs = ['dl']
cenv.require('fused')
extra_libs = ['dl']

configure_fuse(cenv)

Expand All @@ -246,7 +224,7 @@ def scons():
for src in OPS_SRC:
dfuse_obj += cenv.Object(os.path.join('ops', f'{src}.c'))
cenv.AppendUnique(LIBS=['gurt'] + extra_libs)
dfuse_bin = cenv.d_program('dfuse/dfuse', common + dfuse_obj + static_fuse)
dfuse_bin = cenv.d_program('dfuse/dfuse', common + dfuse_obj)

Default(dfuse_bin)

Expand Down
4 changes: 2 additions & 2 deletions src/client/dfuse/dfuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include <semaphore.h>

#include <fuse3/fuse.h>
#include <fuse3/fuse_lowlevel.h>
#include <fused/fuse.h>
#include <fused/fuse_lowlevel.h>

#include <gurt/list.h>
#include <gurt/hash.h>
Expand Down
2 changes: 2 additions & 0 deletions src/client/dfuse/dfuse_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,8 @@ dfuse_fs_start(struct dfuse_info *dfuse_info, struct dfuse_cont *dfs)
}

err_threads:
dfuse_info->di_shutdown = true;

for (int i = 0; i < dfuse_info->di_eq_count; i++) {
struct dfuse_eq *eqt = &dfuse_info->di_eqt[i];

Expand Down
2 changes: 1 addition & 1 deletion src/client/dfuse/dfuse_fuseops.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/

#include <fuse3/fuse_lowlevel.h>
#include <fused/fuse_lowlevel.h>

#include "dfuse_common.h"
#include "dfuse.h"
Expand Down
4 changes: 2 additions & 2 deletions src/client/dfuse/dfuse_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <getopt.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <fuse3/fuse.h>
#include <fuse3/fuse_lowlevel.h>
#include <fused/fuse.h>
#include <fused/fuse_lowlevel.h>
#include <string.h>

#include <sys/types.h>
Expand Down
2 changes: 1 addition & 1 deletion src/client/dfuse/dfuse_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <pthread.h>

#include <fuse3/fuse_lowlevel.h>
#include <fused/fuse_lowlevel.h>
#define D_LOGFAC DD_FAC(dfuse)
#include "dfuse.h"

Expand Down
3 changes: 1 addition & 2 deletions utils/build.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ component=daos

[commit_versions]
ARGOBOTS = v1.1
FUSE = fuse-3.16.2
FUSED = master
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to pin this for build reproducibiliy?

PMDK = 2.0.0
ISAL = v2.30.0
ISAL_CRYPTO = v2.23.0
Expand All @@ -17,4 +17,3 @@ UCX=v1.14.1
spdk=https://github.com/spdk/spdk/commit/b0aba3fcd5aceceea530a702922153bc75664978.diff,https://github.com/spdk/spdk/commit/445a4c808badbad3942696ecf16fa60e8129a747.diff
ofi=https://github.com/ofiwg/libfabric/commit/d827c6484cc5bf67dfbe395890e258860c3f0979.diff
mercury=https://raw.githubusercontent.com/daos-stack/mercury/857f1d5d2ca72d4c1b8d7be5e7fd26d6292b495f/na_ucx_am_send_retry.patch,https://github.com/mercury-hpc/mercury/commit/b8c26fd86281f3b0883c31bd2d0cb467a12b860d.diff,https://github.com/mercury-hpc/mercury/commit/a35589c3d1134d9c80640e78247e210162ac4a3c.diff,https://github.com/mercury-hpc/mercury/commit/fa4abbb6273d975b2ef17ac4e561fd4255d384db.diff
fuse=https://github.com/libfuse/libfuse/commit/c9905341ea34ff9acbc11b3c53ba8bcea35eeed8.diff
2 changes: 1 addition & 1 deletion utils/node_local_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6502,7 +6502,7 @@ def main():
parser.add_argument('--dfuse-debug', default=None)
parser.add_argument('--client-debug', default=None)
parser.add_argument('--class-name', default=None, help='class name to use for junit')
parser.add_argument('--memcheck', default='some', choices=['yes', 'no', 'some'])
parser.add_argument('--memcheck', default='no', choices=['yes', 'no', 'some'])
parser.add_argument('--server-valgrind', action='store_true')
parser.add_argument('--server-fi', action='store_true', help='Run server fault injection test')
parser.add_argument('--multi-user', action='store_true')
Expand Down
17 changes: 8 additions & 9 deletions utils/rpms/daos.spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

Name: daos
Version: 2.5.101
Release: 4%{?relval}%{?dist}
Release: 5%{?relval}%{?dist}
Summary: DAOS Storage Engine

License: BSD-2-Clause-Patent
Expand Down Expand Up @@ -51,9 +51,9 @@ BuildRequires: boost-devel
%endif
BuildRequires: libpmemobj-devel >= 2.0.0
%if (0%{?rhel} >= 8)
BuildRequires: fuse3-devel >= 3
BuildRequires: fused-devel >= 1
%else
BuildRequires: fuse3-devel >= 3.4.2
BuildRequires: fused-devel >= 1
%endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The >= 1 is redundant here as is the %if branch.

Suggested change
%if (0%{?rhel} >= 8)
BuildRequires: fuse3-devel >= 3
BuildRequires: fused-devel >= 1
%else
BuildRequires: fuse3-devel >= 3.4.2
BuildRequires: fused-devel >= 1
%endif
BuildRequires: fused-devel

(Sorry, GH is really mangling this suggestion due to the unchanged lines in it.)

%if (0%{?suse_version} >= 1500)
BuildRequires: go-race
Expand Down Expand Up @@ -175,7 +175,7 @@ Requires: mercury >= %{mercury_version}
Requires: libfabric >= %{libfabric_version}
%if (0%{?suse_version} >= 1500)
Requires: libfabric1 >= %{libfabric_version}
Requires: libfuse3-3 >= 3.4.2
Requires: fused >= 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at all necessary.

Suggested change
Requires: fused >= 1

%endif
Requires: /usr/bin/fusermount3
%{?systemd_requires}
Expand Down Expand Up @@ -223,11 +223,7 @@ Requires: libcapstone-devel
Requires: Lmod
Requires: capstone-devel
%endif
%if (0%{?rhel} >= 8)
Requires: fuse3-devel >= 3
%else
Requires: fuse3-devel >= 3.4.2
%endif
Requires: fused >= 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto, if this really should be a change from fused-devel to fused but it's not clear why the -devel is not needed here now.

So either:

Suggested change
Requires: fused >= 1

or

Suggested change
Requires: fused >= 1
Requires: fused-devel


%description client-tests
This is the package needed to run the DAOS test suite (client tests)
Expand Down Expand Up @@ -587,6 +583,9 @@ getent passwd daos_agent >/dev/null || useradd -s /sbin/nologin -r -g daos_agent
# No files in a shim package

%changelog
* Thu Apr 25 2024 Jeff Olivier <[email protected]> 2.5.101-5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This datestamp could use an update.

- Switch libfuse3 to libfused

* Fri Apr 05 2024 Fan Yong <[email protected]> 2.5.101-4
- Catastrophic Recovery

Expand Down
Loading