Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
Expand Down Expand Up @@ -71,6 +71,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
uses: github/codeql-action/upload-sarif@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Run Trivy vulnerability scanner in filesystem mode (table format)
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
trivy-config: 'utils/trivy/trivy.yaml'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
uses: github/codeql-action/upload-sarif@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
with:
sarif_file: 'trivy-results.sarif'

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ utils/githooks/*.d/*-user-*
.vscode
src/include/daos_version.h
utils/rpms/mock.cfg
trivy-report-daos.txt
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ pipeline {
defaultValue: true,
description: 'Run the Functional on EL 8 test stage')
booleanParam(name: 'CI_FUNCTIONAL_el9_TEST',
defaultValue: true,
defaultValue: false,
description: 'Run the Functional on EL 9 test stage')
booleanParam(name: 'CI_FUNCTIONAL_leap15_TEST',
defaultValue: true,
defaultValue: false,
description: 'Run the Functional on Leap 15 test stage' +
' Requires CI_MORE_FUNCTIONAL_PR_TESTS')
booleanParam(name: 'CI_FUNCTIONAL_ubuntu20_TEST',
Expand All @@ -311,7 +311,7 @@ pipeline {
defaultValue: false,
description: 'Run the Functional Hardware Medium MD on SSD test stage')
booleanParam(name: 'CI_medium_vmd_TEST',
defaultValue: true,
defaultValue: false,
description: 'Run the Functional Hardware Medium VMD test stage')
booleanParam(name: 'CI_medium_verbs_provider_TEST',
defaultValue: false,
Expand Down
2 changes: 1 addition & 1 deletion ci/provisioning/post_provision_config_nodes_LEAP.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright 2021-2024 Intel Corporation.

Check failure on line 3 in ci/provisioning/post_provision_config_nodes_LEAP.sh

View workflow job for this annotation

GitHub Actions / Copyright check

Copyright out of date
# Copyright 2025 Hewlett Packard Enterprise Development LP
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
Expand All @@ -9,7 +9,7 @@
rm -rf "$REPOS_DIR"
ln -s ../zypp/repos.d "$REPOS_DIR"
dnf -y remove lua54 lua-lmod
dnf -y --nogpgcheck install lua-lmod '--repo=*lua*' --repo '*network-cluster*'
dnf -y --nogpgcheck install lua-lmod --repo '*lua*' --repo '*network-cluster*' --repo '*oss-proxy*'
}

group_repo_post() {
Expand Down
53 changes: 27 additions & 26 deletions src/cart/crt_iv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright 2016-2024 Intel Corporation.

Check failure on line 2 in src/cart/crt_iv.c

View workflow job for this annotation

GitHub Actions / Copyright check

Copyright out of date
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
Expand Down Expand Up @@ -1843,11 +1843,10 @@
grp_ver = ivns_internal->cii_grp_priv->gp_membs_ver;
D_RWLOCK_UNLOCK(&ivns_internal->cii_grp_priv->gp_rwlock);
if (grp_ver != input->ivs_grp_ver) {
D_DEBUG(DB_ALL,
"Group (%s) version mismatch. Local: %d Remote :%d\n",
ivns_id.ii_group_name, grp_ver,
input->ivs_grp_ver);
D_GOTO(exit, rc = -DER_GRPVER);
rc = -DER_GRPVER;
DL_INFO(rc, "Group (%s) version mismatch. Local: %d Remote :%d",
ivns_id.ii_group_name, grp_ver, input->ivs_grp_ver);
goto exit;
}

iv_ops = crt_iv_ops_get(ivns_internal, input->ivs_class_id);
Expand Down Expand Up @@ -1922,7 +1921,7 @@
if (need_put && iv_ops)
iv_ops->ivo_on_put(ivns_internal, NULL, user_priv);

output->rc = rc;
output->ivs_rc = rc;
crt_reply_send(rpc_req);

/* ADDREF done in lookup above */
Expand Down Expand Up @@ -2002,7 +2001,7 @@
IVNS_DECREF(ivns_internal);
return;
exit:
output->rc = rc;
output->ivs_rc = rc;
crt_reply_send(rpc_req);

if (ivns_internal) {
Expand All @@ -2022,9 +2021,9 @@
output_result = crt_reply_get(result);

/* Only set new rc if so far rc is 0 */
if (output_result->rc == 0) {
if (output_source->rc != 0)
output_result->rc = output_source->rc;
if (output_result->ivs_rc == 0) {
if (output_source->ivs_rc != 0)
output_result->ivs_rc = output_source->ivs_rc;
}

return 0;
Expand Down Expand Up @@ -2163,14 +2162,16 @@
{
struct iv_sync_cb_info *iv_sync = cb_info->cci_arg;
struct crt_iv_ops *iv_ops;
crt_rpc_t *rpc = cb_info->cci_rpc;
struct crt_iv_sync_out *output = crt_reply_get(rpc);

if (iv_sync->isc_bulk_hdl != CRT_BULK_NULL)
crt_bulk_free(iv_sync->isc_bulk_hdl);

/* do_callback is set based on sync value specified */
if (iv_sync->isc_do_callback) {
if (cb_info->cci_rc != 0)
iv_sync->isc_update_rc = cb_info->cci_rc;
if (cb_info->cci_rc || output->ivs_rc)
iv_sync->isc_update_rc = cb_info->cci_rc ? cb_info->cci_rc : output->ivs_rc;

iv_sync->isc_update_comp_cb(iv_sync->isc_ivns_internal,
iv_sync->isc_class_id,
Expand Down Expand Up @@ -2412,7 +2413,7 @@
struct crt_iv_update_out *child_output;

child_output = crt_reply_get(cb_info->uci_child_rpc);
child_output->rc = rc;
child_output->ivo_rc = rc;

ivns = cb_info->uci_ivns_internal;
crt_reply_send(cb_info->uci_child_rpc);
Expand Down Expand Up @@ -2528,15 +2529,15 @@
if (iv_info->uci_bulk_hdl == CRT_BULK_NULL)
d_sgl_buf_copy(&iv_info->uci_iv_value, &output->ivo_iv_sgl);
iv_ops->ivo_on_refresh(iv_info->uci_ivns_internal, &input->ivu_key, 0,
&iv_info->uci_iv_value, false, cb_info->cci_rc ?: output->rc,
iv_info->uci_user_priv);
&iv_info->uci_iv_value, false,
cb_info->cci_rc ?: output->ivo_rc, iv_info->uci_user_priv);

if (input->ivu_iv_value_bulk == CRT_BULK_NULL &&
iv_info->uci_child_rpc != NULL) {
child_output = crt_reply_get(iv_info->uci_child_rpc);
child_output->ivo_iv_sgl = iv_info->uci_iv_value;
}
transfer_back_to_child(&input->ivu_key, iv_info, cb_info->cci_rc ?: output->rc);
transfer_back_to_child(&input->ivu_key, iv_info, cb_info->cci_rc ?: output->ivo_rc);
D_GOTO(exit, 0);
}

Expand All @@ -2549,10 +2550,10 @@

iv_ops->ivo_on_put(iv_info->uci_ivns_internal, &iv_info->uci_iv_value,
iv_info->uci_user_priv);
child_output->rc = output->rc;
child_output->ivo_rc = output->ivo_rc;

if (cb_info->cci_rc != 0)
child_output->rc = cb_info->cci_rc;
child_output->ivo_rc = cb_info->cci_rc;

/* Respond back to child; might fail if child is not alive */
if (crt_reply_send(iv_info->uci_child_rpc) != DER_SUCCESS)
Expand All @@ -2568,7 +2569,7 @@
else
tmp_iv_value = &iv_info->uci_iv_value;

rc = output->rc;
rc = output->ivo_rc;

if (cb_info->cci_rc != 0)
rc = cb_info->cci_rc;
Expand Down Expand Up @@ -2897,7 +2898,7 @@
D_GOTO(exit, rc);
}
rc = crt_bulk_free(cb_info->buc_bulk_hdl);
output->rc = rc;
output->ivo_rc = rc;
iv_ops->ivo_on_put(ivns_internal, &cb_info->buc_iv_value, cb_info->buc_user_priv);

crt_reply_send(info->bci_bulk_desc->bd_rpc);
Expand All @@ -2913,7 +2914,7 @@

send_error:
/* send back whatever error got us here */
output->rc = rc;
output->ivo_rc = rc;
rc = crt_bulk_free(cb_info->buc_bulk_hdl);
if (rc != 0)
DL_ERROR(rc, "crt_bulk_free() failed");
Expand Down Expand Up @@ -3016,7 +3017,7 @@
return rc;

send_error:
output->rc = rc;
output->ivo_rc = rc;
crt_reply_send(info->bci_bulk_desc->bd_rpc);

crt_bulk_free(cb_info->buc_bulk_hdl);
Expand Down Expand Up @@ -3121,7 +3122,7 @@
D_GOTO(exit, rc);
}
} else if (rc == 0) {
output->rc = rc;
output->ivo_rc = rc;
crt_reply_send(rpc);
iv_ops->ivo_on_put(ivns_internal, &iv_value, user_priv);
} else {
Expand All @@ -3136,7 +3137,7 @@
iv_ops->ivo_on_put(ivns_internal, &iv_value, user_priv);

send_error:
output->rc = rc;
output->ivo_rc = rc;
crt_reply_send(rpc);
if (update_cb_info)
D_FREE(update_cb_info);
Expand Down Expand Up @@ -3270,7 +3271,7 @@
}

} else if (rc == 0) {
output->rc = rc;
output->ivo_rc = rc;
rc = crt_reply_send(rpc_req);
} else {
D_GOTO(send_error, rc);
Expand Down Expand Up @@ -3340,7 +3341,7 @@
return;

send_error:
output->rc = rc;
output->ivo_rc = rc;
crt_reply_send(rpc_req);

if (put_needed)
Expand Down
4 changes: 2 additions & 2 deletions src/cart/crt_rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ CRT_RPC_DECLARE(crt_iv_fetch, CRT_ISEQ_IV_FETCH, CRT_OSEQ_IV_FETCH)
((uint32_t) (padding) CRT_VAR)

#define CRT_OSEQ_IV_UPDATE /* output fields */ \
((uint64_t) (rc) CRT_VAR) \
((uint64_t) (ivo_rc) CRT_VAR) \
((d_sg_list_t) (ivo_iv_sgl) CRT_VAR)

CRT_RPC_DECLARE(crt_iv_update, CRT_ISEQ_IV_UPDATE, CRT_OSEQ_IV_UPDATE)
Expand All @@ -532,7 +532,7 @@ CRT_RPC_DECLARE(crt_iv_update, CRT_ISEQ_IV_UPDATE, CRT_OSEQ_IV_UPDATE)
((uint32_t) (ivs_class_id) CRT_VAR) \

#define CRT_OSEQ_IV_SYNC /* output fields */ \
((int32_t) (rc) CRT_VAR)
((int32_t) (ivs_rc) CRT_VAR)

CRT_RPC_DECLARE(crt_iv_sync, CRT_ISEQ_IV_SYNC, CRT_OSEQ_IV_SYNC)

Expand Down
7 changes: 7 additions & 0 deletions src/client/dfuse/dfuse.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Google LLC
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -28,6 +29,12 @@ struct dfuse_info {
struct fuse_session *di_session;
char *di_group;
char *di_mountpoint;
char *di_handles_file;
bool di_dump_handles;
bool di_read_handles;
daos_handle_t di_poh;
daos_handle_t di_coh;
dfs_t *di_dfs;
int32_t di_thread_count;
uint32_t di_eq_count;
bool di_foreground;
Expand Down
58 changes: 39 additions & 19 deletions src/client/dfuse/dfuse_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,24 @@ dfuse_pool_connect(struct dfuse_info *dfuse_info, const char *label, struct dfus
if (label) {
daos_pool_info_t p_info = {};

rc = daos_pool_connect(label, dfuse_info->di_group, DAOS_PC_RO, &dfp->dfp_poh,
&p_info, NULL);
if (rc) {
if (rc == -DER_NO_PERM || rc == -DER_NONEXIST)
DHL_INFO(dfp, rc, "daos_pool_connect() failed");
else
DHL_ERROR(dfp, rc, "daos_pool_connect() failed");
D_GOTO(err_free, rc = daos_der2errno(rc));
/** if we read the pool handle, query for the info */
if (dfuse_info->di_read_handles) {
dfp->dfp_poh = dfuse_info->di_poh;
rc = daos_pool_query(dfp->dfp_poh, NULL, &p_info, NULL, NULL);
if (rc) {
DHL_ERROR(dfp, rc, "daos_pool_query() failed");
D_GOTO(err_free, rc = daos_der2errno(rc));
}
} else {
rc = daos_pool_connect(label, dfuse_info->di_group, DAOS_PC_RO,
&dfp->dfp_poh, &p_info, NULL);
if (rc) {
if (rc == -DER_NO_PERM || rc == -DER_NONEXIST)
DHL_INFO(dfp, rc, "daos_pool_connect() failed");
else
DHL_ERROR(dfp, rc, "daos_pool_connect() failed");
D_GOTO(err_free, rc = daos_der2errno(rc));
}
}

uuid_copy(dfp->dfp_uuid, p_info.pi_uuid);
Expand Down Expand Up @@ -848,17 +858,23 @@ dfuse_cont_open(struct dfuse_info *dfuse_info, struct dfuse_pool *dfp, const cha
int dfs_flags = O_RDWR;

dfc->dfs_ops = &dfuse_dfs_ops;
if (dfuse_info->di_read_only) {
dfs_flags = O_RDONLY;
rc = daos_cont_open(dfp->dfp_poh, label, DAOS_COO_RO, &dfc->dfs_coh,
&c_info, NULL);

if (dfuse_info->di_read_handles) {
dfc->dfs_coh = dfuse_info->di_coh;
rc = daos_cont_query(dfc->dfs_coh, &c_info, NULL, NULL);
} else {
rc = daos_cont_open(dfp->dfp_poh, label, DAOS_COO_RW, &dfc->dfs_coh,
&c_info, NULL);
if (rc == -DER_NO_PERM) {
if (dfuse_info->di_read_only) {
dfs_flags = O_RDONLY;
rc = daos_cont_open(dfp->dfp_poh, label, DAOS_COO_RO, &dfc->dfs_coh,
&c_info, NULL);
} else {
rc = daos_cont_open(dfp->dfp_poh, label, DAOS_COO_RW, &dfc->dfs_coh,
&c_info, NULL);
if (rc == -DER_NO_PERM) {
dfs_flags = O_RDONLY;
rc = daos_cont_open(dfp->dfp_poh, label, DAOS_COO_RO,
&dfc->dfs_coh, &c_info, NULL);
}
}
}
if (rc != -DER_SUCCESS) {
Expand All @@ -869,10 +885,14 @@ dfuse_cont_open(struct dfuse_info *dfuse_info, struct dfuse_pool *dfp, const cha
D_GOTO(err_free, rc = daos_der2errno(rc));
}

rc = dfs_mount(dfp->dfp_poh, dfc->dfs_coh, dfs_flags, &dfc->dfs_ns);
if (rc) {
DHS_ERROR(dfc, rc, "dfs mount() failed");
D_GOTO(err_close, rc);
if (dfuse_info->di_read_handles)
dfc->dfs_ns = dfuse_info->di_dfs;
else {
rc = dfs_mount(dfp->dfp_poh, dfc->dfs_coh, dfs_flags, &dfc->dfs_ns);
if (rc) {
DHS_ERROR(dfc, rc, "dfs mount() failed");
D_GOTO(err_close, rc);
}
}

uuid_copy(dfc->dfc_uuid, c_info.ci_uuid);
Expand Down
Loading
Loading