Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5ad5ff2
DAOS-10686 API: allow empty container lables
Jun 1, 2022
1fb9757
DAOS-10686 API: replace centos8 with el8 in Jenkinsfile
Jun 1, 2022
a89f4ea
DAOS-10686 API: fixed typo and patch name
Jun 2, 2022
266fa99
DAOS-10686 API: update the packaging submodule
Jun 2, 2022
54fe555
DAOS-10686 API: add packaging/rpmlint--ignore-unused-rpmlintrc.patch
Jun 2, 2022
7acf648
DAOS-10686 API: Add "-g" in compiling and linking flags
Jun 2, 2022
175dd2d
DAOS-10686 API: Disable static lib by remove libmfu.a during packaging
Jun 2, 2022
1d77888
DAOS-10686 API: fix format in mpifileutils.spec
Jun 2, 2022
4a4c615
DAOS-10686 API: do not install libmfu.a
Jun 2, 2022
310fee2
DAOS-10686 API: fix rpmlint warnings in .spec
Jun 5, 2022
24e9e30
DAOS-10686 API: fix rpmlint warnings in .spec
Jun 5, 2022
a074e22
DAOS-10686 API: testing changes for rpmlint warnings in .spec
Jun 6, 2022
9122baf
DAOS-10686 API: testing changes for rpmlint warnings in .spec
Jun 6, 2022
f92afce
DAOS-10686 API: testing changes for rpmlint warnings in .spec
Jun 6, 2022
6fab382
DAOS-10686 API: Try installing dependent packages first
Jun 7, 2022
25abfb2
DAOS-10686 API: Fixed a typo
Jun 7, 2022
231ff4e
DAOS-10686 API: testing installation dependent packages
Jun 7, 2022
0686a65
DAOS-10686 API: Revert dnf -y install in Makefile_packaging.mk
Jun 7, 2022
b3c6e36
DAOS-10686 mpifileutils: Add John's patch and verbose for mock
Jun 10, 2022
77affbd
DAOS-10686 mpifileutils: Use optflags in .spec
Jun 10, 2022
40571e2
DAOS-10686 API: Add rpm for ubuntu 20
Jun 13, 2022
596442a
DAOS-10686 mpifileutils: strip binary files and add post
Jun 18, 2022
0586eaa
DAOS-10686 mpifileutils: remove post in .spec
Jun 18, 2022
955cdf9
DAOS-10686 mpifileutils: Use Tab to replace space
Jun 18, 2022
64b4610
OS-10686 mpifileutils: Building debuginfo packages for Leap 15
Jun 22, 2022
06b213c
DAOS-10686 mpifileutils: remove redundant debug_package
Jun 22, 2022
2fd643a
DAOS-10686 mpifileutils: suppress rpmlint warnings
Jun 23, 2022
d336bdc
DAOS-10686 mpifileutils: empty commit to trigger rebuild
Jun 23, 2022
8131366
DAOS-10686 mpifileutils: empty commit to trigger rebuild
Aug 17, 2022
8f56795
DAOS-10686 mpifileutils: empty commit to trigger rebuild
Aug 22, 2022
6588fb5
DAOS-10686 mpifileutils: Remove CentOS 7 in Jenkins
Aug 22, 2022
cc14617
DAOS-10686 mpifileutils: Set test tags mpifileutils
Aug 24, 2022
378d45f
DAOS-10686 mpifileutils: Set test tags mpifileutils
Aug 24, 2022
23eb514
DAOS-10686 mpifileutils: update packaging
Aug 24, 2022
b172578
DAOS-10686 mpifileutils: packageBuildingPipelineDAOSTest
Aug 24, 2022
0a14cfe
DAOS-10686 mpifileutils: Set test tags mfu
Aug 25, 2022
802e50f
DAOS-10686 mpifileutils: fixed format in mpifileutils.spec
Aug 25, 2022
42e117c
DAOS-10686 mpifileutils: updated test-tag
Aug 26, 2022
88b95d0
DAOS-10686 mpifileutils: update submodule packaging
Aug 26, 2022
84b95dc
Use repo-files PR
brianjmurrell Sep 16, 2022
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
44 changes: 0 additions & 44 deletions 0.11.1..356cb83d36a9243e30fe8a1bbc83e81fc46d2be2.patch

This file was deleted.

279 changes: 279 additions & 0 deletions 0.11.1..6230ed293c69f818aac5a47a0ce3665fc3fafba6.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d7c9a01..4ffcf16 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,17 +3,12 @@
*Thank you for taking the time to contribute!*

## Table of Contents
-[Resources](#resources)
-
[How To Contribute](#how-to-contribute)
* [Reporting an Issue & Feature Suggestions](#reporting-an-issue--feature-suggestions)
* [Pull Requests](#pull-requests)
* [License](#license)
* [Contributor's Declaration](#contributors-declaration)

-## Resources
-[mpiFileUtils Google Group](https://groups.google.com/forum/#!forum/mpifileutils)
-
## How To Contribute

### Reporting an Issue & Feature Suggestions
diff --git a/doc/rst/build.rst b/doc/rst/build.rst
index 047ba87..aedf67c 100644
--- a/doc/rst/build.rst
+++ b/doc/rst/build.rst
@@ -34,7 +34,7 @@ To be certain of compatibility, it is recommended that one install libarchive-3.
mkdir install
installdir=`pwd`/install

- wget https://github.com/libarchive/libarchive/releases/download/3.5.1/libarchive-3.5.1.tar.gz
+ wget https://github.com/libarchive/libarchive/releases/download/v3.5.1/libarchive-3.5.1.tar.gz
tar -zxf libarchive-3.5.1.tar.gz
cd libarchive-3.5.1
./configure --prefix=$installdir
@@ -135,7 +135,7 @@ which can be done with the following commands:
wget https://github.com/hpc/libcircle/releases/download/v0.3/libcircle-0.3.0.tar.gz
wget https://github.com/llnl/lwgrp/releases/download/v1.0.4/lwgrp-1.0.4.tar.gz
wget https://github.com/llnl/dtcmp/releases/download/v1.1.4/dtcmp-1.1.4.tar.gz
- wget https://github.com/libarchive/libarchive/releases/download/3.5.1/libarchive-3.5.1.tar.gz
+ wget https://github.com/libarchive/libarchive/releases/download/v3.5.1/libarchive-3.5.1.tar.gz

tar -zxf libcircle-0.3.0.tar.gz
cd libcircle-0.3.0
diff --git a/src/common/mfu_daos.c b/src/common/mfu_daos.c
index 8f53133..8981371 100644
--- a/src/common/mfu_daos.c
+++ b/src/common/mfu_daos.c
@@ -1182,7 +1182,9 @@ int daos_connect(
* If nothing is passed in for destination a uuid is always generated
* unless user passed one in, because destination container labels are
* not generated */
- rc = daos_cont_open(*poh, da->dst_cont_uuid, DAOS_COO_RW, coh, &co_info, NULL);
+ char cont_str[130];
+ uuid_unparse(da->dst_cont_uuid, cont_str);
+ rc = daos_cont_open(*poh, cont_str, DAOS_COO_RW, coh, &co_info, NULL);
} else {
rc = daos_cont_open(*poh, *cont, DAOS_COO_RW, coh, &co_info, NULL);
}
@@ -1273,14 +1275,12 @@ int daos_connect(
}

/* try to open it again */
- if (dst_cont_passed) {
- if (is_uuid) {
- rc = daos_cont_open(*poh, da->dst_cont_uuid, DAOS_COO_RW, coh, &co_info, NULL);
- } else {
- rc = daos_cont_open(*poh, *cont, DAOS_COO_RW, coh, &co_info, NULL);
- }
+ if (dst_cont_passed && !is_uuid) {
+ rc = daos_cont_open(*poh, *cont, DAOS_COO_RW, coh, &co_info, NULL);
} else {
- rc = daos_cont_open(*poh, da->dst_cont_uuid, DAOS_COO_RW, coh, &co_info, NULL);
+ char cont_str[130];
+ uuid_unparse(da->dst_cont_uuid, cont_str);
+ rc = daos_cont_open(*poh, cont_str, DAOS_COO_RW, coh, &co_info, NULL);
}
if (rc != 0) {
MFU_LOG(MFU_LOG_ERR, "Failed to open container: "DF_RC, DP_RC(rc));
@@ -3857,7 +3857,7 @@ static int cont_serialize_prop_str(struct hdf5_args* hdf5,
hid_t attr_dspace;
hid_t usr_attr;

- if (entry == NULL || entry->dpe_str == NULL) {
+ if (entry == NULL) {
MFU_LOG(MFU_LOG_ERR, "Property %s not found", prop_str);
rc = 1;
goto out;
@@ -3870,7 +3870,7 @@ static int cont_serialize_prop_str(struct hdf5_args* hdf5,
rc = 1;
goto out;
}
- status = H5Tset_size(attr_dtype, strlen(entry->dpe_str) + 1);
+ status = H5Tset_size(attr_dtype, (entry->dpe_str ? strlen(entry->dpe_str) : 0) + 1);
if (status < 0) {
MFU_LOG(MFU_LOG_ERR, "failed to set dtype size");
rc = 1;
@@ -3895,7 +3895,7 @@ static int cont_serialize_prop_str(struct hdf5_args* hdf5,
rc = 1;
goto out;
}
- status = H5Awrite(usr_attr, attr_dtype, entry->dpe_str);
+ status = H5Awrite(usr_attr, attr_dtype, entry->dpe_str ? entry->dpe_str : "");
if (status < 0) {
MFU_LOG(MFU_LOG_ERR, "failed to write attribute");
rc = 1;
@@ -5394,22 +5394,23 @@ int cont_deserialize_all_props(struct hdf5_args *hdf5,
goto out;
}

- rc = daos_cont_open(poh, label_entry->dpe_str, DAOS_COO_RW, &coh, &cont_info, NULL);
- if (rc == -DER_NONEXIST) {
- /* doesn't exist so ok to deserialize this container label */
- deserialize_label = true;
- } else if (rc != 0) {
- MFU_LOG(MFU_LOG_ERR, "daos_cont_open failed: "DF_RC, DP_RC(rc));
- goto out;
- } else {
- /* if this succeeds then label already exists, close container after
- * checking */
- rc = daos_cont_close(coh, NULL);
- if (rc != 0) {
+ if (label_entry->dpe_str[0]) {
+ rc = daos_cont_open(poh, label_entry->dpe_str, DAOS_COO_RW, &coh, &cont_info, NULL);
+ if (rc == -DER_NONEXIST) {
+ /* doesn't exist so ok to deserialize this container label */
+ deserialize_label = true;
+ } else if (rc != 0) {
+ MFU_LOG(MFU_LOG_ERR, "daos_cont_open failed: "DF_RC, DP_RC(rc));
goto out;
+ } else {
+ /* if this succeeds then label already exists, close container after
+ * checking */
+ rc = daos_cont_close(coh, NULL);
+ if (rc != 0) {
+ goto out;
+ }
}
}
-
if (deserialize_label) {
num_props++;
}
@@ -5617,7 +5618,7 @@ int daos_cont_deserialize_connect(daos_args_t *daos_args,
} else {
uuid_unparse(daos_args->dst_cont_uuid, cont_str);
MFU_LOG(MFU_LOG_INFO, "Successfully created container %s", cont_str);
- rc = daos_cont_open(daos_args->src_poh, daos_args->dst_cont_uuid,
+ rc = daos_cont_open(daos_args->src_poh, cont_str,
DAOS_COO_RW, &daos_args->src_coh, &co_info, NULL);
}
if (rc != 0) {
diff --git a/src/common/mfu_flist_copy.c b/src/common/mfu_flist_copy.c
index f5acaab..0e9c78f 100644
--- a/src/common/mfu_flist_copy.c
+++ b/src/common/mfu_flist_copy.c
@@ -1680,12 +1680,20 @@ static int mfu_copy_file_normal(
/* If we're using O_DIRECT, deal with short reads.
* Retry with same buffer and offset since those must
* be aligned at block boundaries. */
+ int retries = 0;
while (copy_opts->direct && /* using O_DIRECT */
bytes_read > 0 && /* read was not an error or eof */
bytes_read < left_to_read && /* shorter than requested */
(off + bytes_read) < file_size) /* not at end of file */
{
- /* TODO: probably should retry a limited number of times then abort */
+ /* try the read a limited number of times then given up with error */
+ retries++;
+ if (retries == 5) {
+ MFU_LOG(MFU_LOG_ERR, "Source file `%s' exceeded short read limit, maybe shorter than expected size of %llu bytes",
+ src, file_size);
+ return -1;
+ }
+
bytes_read = mfu_file_pread(src, buf, left_to_read, off, mfu_src_file);
}

@@ -1698,8 +1706,8 @@ static int mfu_copy_file_normal(

/* check for early EOF */
if (bytes_read == 0) {
- MFU_LOG(MFU_LOG_ERR, "Source file `%s' shorter than expected %llu (errno=%d %s)",
- src, file_size, errno, strerror(errno));
+ MFU_LOG(MFU_LOG_ERR, "Source file `%s' shorter than expected size of %llu bytes",
+ src, file_size);
return -1;
}

diff --git a/src/daos-gen/daos-gen.c b/src/daos-gen/daos-gen.c
index d96373a..46ee44d 100644
--- a/src/daos-gen/daos-gen.c
+++ b/src/daos-gen/daos-gen.c
@@ -18,6 +18,14 @@
#define BUFLEN 80
#define UUID_STR_LEN 129

+#if defined(DAOS_API_VERSION_MAJOR) && defined(DAOS_API_VERSION_MINOR)
+#define CHECK_DAOS_API_VERSION(major, minor) \
+ ((DAOS_API_VERSION_MAJOR > (major)) \
+ || (DAOS_API_VERSION_MAJOR == (major) && DAOS_API_VERSION_MINOR >= (minor)))
+#else
+#define CHECK_DAOS_API_VERSION(major, minor) 0
+#endif
+
static uint32_t obj_id_gen = 1;

/** Print a usage message. */
@@ -176,13 +184,18 @@ int main(int argc, char** argv)
char key[keys_per_object];
int i,j;
char uuid_str[UUID_STR_LEN];
+ uuid_t cont_uuid;
+
+#if CHECK_DAOS_API_VERSION(2, 0)
+ enum daos_otype_t otype;
+ otype = DAOS_OT_KV_HASHED;
+#else
daos_ofeat_t ofeats;
+ ofeats = DAOS_OF_KV_FLAT;
+#endif

- ofeats = DAOS_OF_DKEY_UINT64 | DAOS_OF_KV_FLAT | DAOS_OF_KV_FLAT;
/* connect to pool/cont then broadcast to rest of ranks */
if (rank == 0) {
- /* generate container UUID */
- uuid_generate(daos_args->src_cont);
daos_pool_info_t pool_info = {0};
daos_cont_info_t co_info = {0};
#if DAOS_API_VERSION_MAJOR < 1
@@ -199,14 +212,27 @@ int main(int argc, char** argv)
}

/* create cont and open */
+#if CHECK_DAOS_API_VERSION(2, 0)
+ rc = daos_cont_create(daos_args->src_poh, &cont_uuid, NULL, NULL);
+#else
+ /* generate container UUID */
+ uuid_generate(daos_args->src_cont);
+ uuid_copy(cont_uuid, daos_args->src_cont);
rc = daos_cont_create(daos_args->src_poh, daos_args->src_cont, NULL, NULL);
+#endif
if (rc != 0) {
MFU_LOG(MFU_LOG_ERR, "Failed to create cont: "DF_RC, DP_RC(rc));
rc = 1;
goto err_cont;
}
+ uuid_unparse(cont_uuid, uuid_str);
+#if CHECK_DAOS_API_VERSION(2, 0)
+ rc = daos_cont_open(daos_args->src_poh, uuid_str,
+ DAOS_COO_RW, &daos_args->src_coh, &co_info, NULL);
+#else
rc = daos_cont_open(daos_args->src_poh, daos_args->src_cont,
DAOS_COO_RW, &daos_args->src_coh, &co_info, NULL);
+#endif
if (rc != 0) {
MFU_LOG(MFU_LOG_ERR, "Failed to open container: "DF_RC, DP_RC(rc));
rc = 1;
@@ -222,8 +248,11 @@ int main(int argc, char** argv)
memset(buf, 'A', BUFLEN);
for (i = 0; i < num_objects; i++) {
oid[i] = dts_oid_gen(0);
-
+#if CHECK_DAOS_API_VERSION(2, 0)
+ rc = daos_obj_generate_oid(daos_args->src_coh, &oid[i], otype, OC_RP_XSF, 0, 0);
+#else
rc = daos_obj_generate_oid(daos_args->src_coh, &oid[i], ofeats, OC_RP_XSF, 0, 0);
+#endif
if (rc != 0) {
MFU_LOG(MFU_LOG_ERR, "Failed to generate oid: "DF_RC, DP_RC(rc));
rc = 1;
@@ -261,7 +290,6 @@ int main(int argc, char** argv)
* generates same amount */
if (rank == 0) {
int total_num_objects = size * num_objects;
- uuid_unparse(daos_args->src_cont, uuid_str);
printf("Container UUID: %s\n\ttotal objects:%d\n"
"\tkeys per object:%d\n", uuid_str, total_num_objects, keys_per_object);
}
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
// I.e. for testing library changes
//@Library(value="pipeline-lib@your_branch") _

packageBuildingPipeline(['distros' : ['centos7', 'centos8', 'leap15']])
packageBuildingPipelineDAOSTest(['distros' : ['el8', 'leap15'],
'test-tag': 'mpifileutils copy_procs dcp dsync dserialize'])

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NAME := mpifileutils
SRC_EXT := gz
REPO_NAME := mpifileutils-pkg
PKG_GIT_COMMIT := 356cb83d36a9243e30fe8a1bbc83e81fc46d2be2
PKG_GIT_COMMIT := 6230ed293c69f818aac5a47a0ce3665fc3fafba6
GITHUB_PROJECT := hpc/$(NAME)

TEST_PACKAGES := $(NAME)-mpich-devel $(NAME)-openmpi3-devel
Expand Down
5 changes: 5 additions & 0 deletions mpifileutils.rpmlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This line is mandatory to access the configuration functions
from Config import *

addFilter(r'mpifileutils-.+-devel\..+: W: only-non-binary-in-usr-lib')
addFilter(r'mpifileutils-.+: W: no-documentation')
Loading