-
Notifications
You must be signed in to change notification settings - Fork 301
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-14698 crtl: Create container with attributes #15300
base: master
Are you sure you want to change the base?
Conversation
Ticket title is 'Creating daos container with dfuse cache settings.' |
3a1167a
to
7d8cdd0
Compare
Add new option set-attr to daos cont create allowing to define container user attributes. Features: control dfuse Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
7d8cdd0
to
77f33b2
Compare
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15300/4/testReport/ |
77f33b2
to
8421816
Compare
Update and add new functional tests. Features: control dfuse container Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
8421816
to
315f440
Compare
# Start the servers and agents | ||
super().setUp() | ||
|
||
def check_attrs(self, dfuse, container_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a helper function so should be "private" to the class.
def check_attrs(self, dfuse, container_name): | |
def _check_attrs(self, dfuse, container_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Move check_attrs() to private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Move check_attrs() to private.
Fixed with commit 865f2e5
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15300/6/testReport/ |
Integrate reviewers comments: - Move check_attrs() to private Features: control dfuse container Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15300/7/testReport/ |
src/include/daos_uns.h
Outdated
duns_create_path_attr(daos_handle_t poh, const char *path, int count, char const *const names[], | ||
void const *const values[], size_t const sizes[], struct duns_attr_t *attrp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im not a fan of this new API. it might be useful to have something for the command line.
but for the API, it's not a big deal to do
daos_cont_create()
daos_cont_set_attr()
I would suggest to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure to fully understand your comments.
Are you suggesting to remove duns_create_path_attr()
and duns_create_path()
functions or just the first one.
If we are just removing duns_create_path_attr()
, then we will have two solutions from my understanding:
- Change the dfuse code to poll the attributes of its mounted containers.
- split the function
duns_create_path_attr()
to not create and bind the container in the same function. By this way, we will be able to use the functiondaos_cont_set_attr()
between the two function calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no you cannot remove duns_create_path()!
my question is why you are adding this new API (duns_crreate_path_attr()) ?
what is the challenge of doing:
duns_create_path()
daos_cont_set_attr()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding, doing this will not work as the attributes are cached inside DFuse after the binding.
Thus, when we will get back from duns_create_path()
, the call to daos_cont_set_attr()
will not be taken into account by DFuse.
@ashleypittman could you confirm this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken a closer look and think you're both right, having a new API doesn't seem like the right solution here, however I hadn't realised it was the same C function that both created the container and inserted it into the POSIX namespace.
The best path might be:
daos_cont_create()
daos_cont_set_attr()
duns_link_cont()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not aware of the duns_link_cont() function, which for sure is a better solution.
Thanks @ashleypittman for the hints and @mchaarawi for the relevant remark :-)
- Remove useless new function
duns_create_path_attr()
- Split sub container creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not aware of the duns_link_cont() function, which for sure is a better solution. Thanks @ashleypittman for the hints and @mchaarawi for the relevant remark :-)
- Remove useless new function
duns_create_path_attr()
- Split sub container creation
Fixed with commit 819b856
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the Go side, the approach looks fine to me. Will wait for the other requested changes to come through before approving.
Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15300/7/execution/node/1217/log |
…/daos-14698 Required-githooks: true
…/daos-14698 Required-githooks: true
Integrate reviewers comments: - Change tags from pr to daily_regression - Add container type in the log message - Add daos_cmd feature tag Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
…/daos-14698 Skip-func-hw-test-medium-md-on-ssd: false Skip-nlt: true Test-tag: DfuseContainerAttrs Required-githooks: true
Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15300/15/execution/node/1120/log |
Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15300/16/execution/node/491/log |
…/daos-14698 Required-githooks: true
Fix NLT uns_link test Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
…/daos-14698 Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go changes LGTM.
Fix NLT fault injection issue Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15300/21/execution/node/1210/log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add some attributes to the new container in the test_alloc_fail_cont_create
function in NLT, this would check the unwinding code is correct in case of failure partway through.
src/client/dfs/duns.c
Outdated
rc = stat(path, &finfo); | ||
if (rc) { | ||
rc = errno; | ||
D_ERROR("Failed to access new container: %d (%s)\n", rc, strerror(rc)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is moved, not new code but it would be good to use the correct macros here. The S
here stands for system, that is it's a errno.
D_ERROR("Failed to access new container: %d (%s)\n", rc, strerror(rc)); | |
DS_ERROR(rc, "Failed to access new container"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Use up to date logging macros
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Use up to date logging macros
Fixed with commit 0561a5b
if (rc2 != -DER_SUCCESS) { | ||
DL_ERROR(rc2, "failed to close container"); | ||
if (rc2 == -DER_NOMEM) | ||
// Second close to properly handle fault injection | ||
daos_cont_close(coh, NULL); | ||
else if (rc == -DER_SUCCESS) | ||
rc = daos_der2errno(rc2); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we'd designed out these hacks by now but perhaps there's still a few there. Container close would be a tricky one to re-try at a higher level.
…/daos-14698 Required-githooks: true
Fix functional tests: ACL not properly set with dfs_link_cont() function. Integrate reviewers comments: - Use up to date logging macros Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
Improve deployment setting of the DfuseContainerAttrs functional test. Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
Improve deployment setting of the DfuseContainerAttrs functional test. Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15300/24/execution/node/1211/log |
…/daos-14698 Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
Test stage Functional on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15300/25/testReport/ |
Fix functional test test_dfuse_subcontainer_attrs. Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
Fix pylint errors. Features: control dfuse container daos_cmd Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
Description
Add new option
attr
todaos cont create
allowing to define container user attributes.Before requesting gatekeeper:
Features:
(orTest-tag*
) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.Gatekeeper: