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-7229 build: Remove client dependence on server libraries #5445

Merged
merged 9 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
15 changes: 12 additions & 3 deletions ci/rpm/test_daos_node.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/bin/bash

set -uex
sudo yum -y install --exclude ompi daos{,-client}-"${DAOS_PKG_VERSION}"
sudo yum -y install --exclude ompi,libpmemobj,argobots,spdk \
daos-client-"${DAOS_PKG_VERSION}"
if rpm -q daos-server; then
echo "daos-server RPM should not be installed as a dependency of daos-client"
exit 1
fi
sudo yum -y history rollback last-1
sudo yum -y install --exclude ompi daos{,-{server,client}}-"${DAOS_PKG_VERSION}"
sudo yum -y install --exclude ompi daos{,-tests}-"${DAOS_PKG_VERSION}"
sudo yum -y install --exclude ompi daos-server-"${DAOS_PKG_VERSION}"
if rpm -q daos-server; then
echo "daos-client RPM should not be installed as a dependency of daos-server"
exit 1
fi
sudo yum -y install --exclude ompi daos-tests-"${DAOS_PKG_VERSION}"

me=$(whoami)
for dir in server agent; do
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
daos (1.3.0-8) unstable; urgency=medium
[ Jeff Olivier ]
* Remove client dependencies on PMDK, SPDK, and argobots

-- Jeff Olivier <jeffrey.v.olivier@intel.com> Wed, 14 Apr 2021 13:27:00 -0400

daos (1.3.0-7) unstable; urgency=medium
[ Brian J. Murrell ]
* Update Argobots to 1.1
Expand Down
3 changes: 1 addition & 2 deletions debian/daos-client.dirs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ usr/lib64
usr/lib64/daos
usr/lib64/python3/site-packages/pydaos
usr/lib64/python3/site-packages/pydaos/raw
usr/lib64/python3/site-packages/storage_estimator
usr/share/daos/daos
usr/lib/systemd/system
usr/share/man/man8
usr/share/man/man8
5 changes: 1 addition & 4 deletions debian/daos-client.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ usr/bin/daos_agent
usr/bin/dfuse
usr/bin/daos
usr/bin/dfuse_hl
usr/bin/daos_storage_estimator.py
usr/lib64/libdfs.so
usr/lib64/daos/API_VERSION
usr/lib64/libduns.so
usr/lib64/libdfuse.so
usr/lib64/libioil.so
usr/lib64/libdfs_internal.so
usr/lib64/libvos_size.so
usr/lib64/python3/site-packages/pydaos/*.py
usr/lib64/python3/site-packages/storage_estimator/*.py
usr/lib64/python3/site-packages/pydaos/pydaos_shim.so
usr/lib64/python3/site-packages/pydaos/raw/*.py
usr/share/daos/ioil-ld-opts
etc/daos/daos_agent.yml
etc/daos/daos_control.yml
usr/lib/systemd/system/daos_agent.service
usr/share/man/man8/daos.8*
usr/share/man/man8/dmg.8*
usr/share/man/man8/dmg.8*
3 changes: 2 additions & 1 deletion debian/daos-server.dirs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ etc/daos/certs/clients
usr/bin
usr/lib64/daos_srv
usr/share/daos/control
usr/lib/systemd/system
usr/lib/systemd/system
usr/lib64/python3/site-packages/storage_estimator
7 changes: 7 additions & 0 deletions debian/daos-server.install
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
etc/daos/daos_server.yml
etc/daos/daos_server.yml
etc/ld.so.conf.d/daos.conf
etc/daos/vos_size_input.yaml
# set daos_admin to be setuid root and group daos_server in order to perform privileged tasks
usr/bin/daos_admin
# set daos_server to be setgid daos_server in order to invoke daos_admin
Expand All @@ -17,5 +18,11 @@ usr/lib64/daos_srv/librebuild.so
usr/lib64/daos_srv/librsvc.so
usr/lib64/daos_srv/libsecurity.so
usr/lib64/daos_srv/libvos_srv.so
usr/lib64/daos_srv/libvos_size.so
usr/lib64/daos_srv/libvos.so
usr/lib64/daos_srv/libbio.so
usr/lib64/libdaos_common_pmem.so
usr/share/daos/control/setup_spdk.sh
usr/lib/systemd/system/daos_server.service
usr/bin/daos_storage_estimator.py
usr/lib64/python3/site-packages/storage_estimator/*.py
6 changes: 6 additions & 0 deletions debian/daos-tests.install
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ usr/bin/daos_perf
usr/bin/daos_racer
usr/bin/evt_ctl
usr/bin/obj_ctl
usr/bin/io_conf
usr/bin/jump_pl_map
usr/bin/ring_pl_map
usr/bin/pl_bench
usr/bin/rdbt
usr/bin/daos_gen_io_conf
usr/bin/daos_run_io_conf
usr/bin/crt_launch
usr/bin/fault_status
usr/lib64/libdaos_tests.so
usr/lib64/libdts.so
etc/daos/fault-inject-cart.yaml
# For avocado tests
Expand Down
14 changes: 0 additions & 14 deletions debian/daos.install
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
# you might think libvio.so goes in the server RPM but
# the 2 tools following it need it
usr/lib64/daos_srv/libbio.so
# you might think libdaos_tests.so goes in the tests RPM but
# the 4 tools following it need it
usr/lib64/libdaos_tests.so
usr/bin/io_conf
usr/bin/jump_pl_map
usr/bin/ring_pl_map
usr/bin/pl_bench
usr/bin/rdbt
usr/lib64/libvos.so
usr/lib64/libdaos_common.so
etc/daos/memcheck-cart.supp
etc/daos/vos_size_input.yaml
# TODO: this should move from daos_srv to daos
usr/lib64/daos_srv/libplacement.so
# Certificate generation files
usr/lib64/daos/certgen/*
usr/lib64/daos/VERSION
etc/bash_completion.d/daos.bash
usr/lib64/libdaos_common_pmem.so
1 change: 0 additions & 1 deletion src/client/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def scons():
SConscript('dfs/SConscript')
SConscript('dfuse/SConscript')
SConscript('pydaos/SConscript')
SConscript('storage_estimator/SConscript')

if __name__ == "SCons.Script":
scons()
5 changes: 3 additions & 2 deletions src/placement/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ def scons():

denv = env.Clone()

denv.AppendUnique(LIBS=['isal'])
libraries = ['isal']

# Common placement code
common_tgts = denv.SharedObject(['pl_map.c', 'ring_map.c',
'jump_map.c', 'pl_map_common.c'])

# generate server module
print("libs = %s" % denv.subst("$LIBS"))
srv = daos_build.library(denv, 'placement', common_tgts,
install_off="../..")
install_off="../..", LIBS=libraries)
denv.Install('$PREFIX/lib64/daos_srv', srv)

# placement client library
Expand Down
6 changes: 3 additions & 3 deletions src/tests/suite/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def scons():
"""Execute build"""
Import('denv')

libraries = ['daos_common_pmem', 'daos', 'dfs', 'daos_tests', 'gurt',
libraries = ['daos', 'dfs', 'daos_tests', 'gurt',
'cart']
libraries += ['uuid', 'dfs', 'cmocka', 'pthread', 'isal']

Expand Down Expand Up @@ -107,12 +107,12 @@ def scons():
daos_aggregate_ec.c daos_degrade_ec.c
daos_extend_simple.c""")
daostest = daos_build.program(newenv, 'daos_test', c_files + daos_test_tgt,
LIBS=libraries)
LIBS=['daos_common'] + libraries)

c_files = Split("""dfs_unit_test.c dfs_par_test.c dfs_test.c""")
newenv.AppendUnique(CPPPATH=["#/src/client/dfs"])
dfstest = daos_build.program(newenv, 'dfs_test', c_files + daos_test_tgt,
LIBS=libraries)
LIBS=['daos_common'] + libraries)

denv.Install('$PREFIX/bin/', daostest)
denv.Install('$PREFIX/bin/', dfstest)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Import('env')

def scons():
"""Execute build"""
libs = ['daos', 'daos_common_pmem', 'uuid', 'dfs', 'duns', 'gurt', 'cart']
libs = ['daos', 'daos_common', 'uuid', 'dfs', 'duns', 'gurt', 'cart']

denv = env.Clone()

Expand Down
16 changes: 8 additions & 8 deletions src/vos/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ def build_vos(env, standalone):
if standalone:
denv.Append(CPPDEFINES={'VOS_STANDALONE' : '1'})
denv.Append(OBJPREFIX="s_")
install = 'lib64'
offset = ".."
offset = "../../"
libname = 'vos'
else:
install = 'lib64/daos_srv'
libname = 'vos_srv'
offset = "../.."

Expand All @@ -31,9 +29,9 @@ def build_vos(env, standalone):
#profiling tools will point at preprocessed file lines.
files = denv.Preprocess(FILES)

vos = daos_build.library(denv, libname, files, install_off=offset,
vos = daos_build.library(denv, libname, files, install_off='../..',
LIBS=['vea'])
denv.Install('$PREFIX/' + install, vos)
denv.Install('$PREFIX/lib64/daos_srv', vos)

def build_vos_internal(env):
"""build vos internal"""
Expand All @@ -42,12 +40,13 @@ def build_vos_internal(env):
libraries = ['vos', 'bio', 'abt', 'daos_common_pmem', 'gurt']

# Add runtime paths for daos libraries
denv.AppendUnique(LINKFLAGS=[r'-Wl,-rpath=\$$ORIGIN/daos_srv'])
denv.AppendUnique(RPATH_FULL=['$PREFIX/lib64/daos_srv'])


vos_size = daos_build.library(denv, 'vos_size', ['vos_size.c'],
LIBS=libraries)
LIBS=libraries, install_off='../..')

denv.Install('$PREFIX/lib64/', vos_size)
denv.Install('$PREFIX/lib64/daos_srv', vos_size)

def scons():
"""Execute build"""
Expand All @@ -67,6 +66,7 @@ def scons():
build_vos_internal(denv)

SConscript('tests/SConscript', exports='denv')
SConscript('storage_estimator/SConscript')

if __name__ == "SCons.Script":
scons()
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def _load_lib(self, lib_name):

class VOS_SIZE(BASE_CLASS):
def __init__(self):
super().__init__('libvos_size.so')
super().__init__('daos_srv/libvos_size.so')
self._data = STR_BUFFER()

def __del__(self):
Expand Down
3 changes: 2 additions & 1 deletion src/vos/vos_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ vos_tls_fini(void *data)
d_uhash_destroy(tls->vtl_cont_hhash);

umem_fini_txd(&tls->vtl_txd);
vos_ts_table_free(&tls->vtl_ts_table);
if (tls->vtl_ts_table)
vos_ts_table_free(&tls->vtl_ts_table);
D_FREE(tls);
}

Expand Down
Loading