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-14698 crtl: Create container with attributes #15300

Merged
merged 41 commits into from
Dec 12, 2024

Conversation

knard38
Copy link
Contributor

@knard38 knard38 commented Oct 11, 2024

Description

Add new option attr to daos cont create allowing to define container user attributes.

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate owners.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

Copy link

github-actions bot commented Oct 11, 2024

Ticket title is 'Creating daos container with dfuse cache settings.'
Status is 'In Review'
Labels: 'triaged,usability'
Errors are Unknown component
https://daosio.atlassian.net/browse/DAOS-14698

@knard38 knard38 force-pushed the ckochhof/dev/master/daos-14698 branch 2 times, most recently from 3a1167a to 7d8cdd0 Compare October 16, 2024 09:58
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]>
@knard38 knard38 force-pushed the ckochhof/dev/master/daos-14698 branch from 7d8cdd0 to 77f33b2 Compare October 18, 2024 15:13
@daosbuild1
Copy link
Collaborator

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/

@knard38 knard38 force-pushed the ckochhof/dev/master/daos-14698 branch from 77f33b2 to 8421816 Compare October 21, 2024 10:01
Update and add new functional tests.

Features: control dfuse container
Required-githooks: true

Signed-off-by: Cedric Koch-Hofer <[email protected]>
@knard38 knard38 force-pushed the ckochhof/dev/master/daos-14698 branch from 8421816 to 315f440 Compare October 21, 2024 10:05
@knard38 knard38 marked this pull request as ready for review October 21, 2024 10:27
@knard38 knard38 requested review from a team as code owners October 21, 2024 10:27
@daosbuild1
Copy link
Collaborator

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/

@knard38 knard38 requested a review from ashleypittman October 21, 2024 12:10
Integrate reviewers comments:
- Move check_attrs() to private

Features: control dfuse container
Required-githooks: true

Signed-off-by: Cedric Koch-Hofer <[email protected]>
@daosbuild1
Copy link
Collaborator

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/

Comment on lines 189 to 190
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);
Copy link
Contributor

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.

Copy link
Contributor Author

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:

  1. Change the dfuse code to poll the attributes of its mounted containers.
  2. 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 function daos_cont_set_attr() between the two function calls.

Copy link
Contributor

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()
?

Copy link
Contributor Author

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.

Copy link
Contributor

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()

Copy link
Contributor Author

@knard38 knard38 Oct 21, 2024

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

Copy link
Contributor Author

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

Copy link
Contributor

@kjacque kjacque left a 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.

src/control/cmd/daos/container.go Show resolved Hide resolved
@daosbuild1
Copy link
Collaborator

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

@daosbuild1
Copy link
Collaborator

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/35/execution/node/1210/log

@knard38
Copy link
Contributor Author

knard38 commented Nov 25, 2024

The failing test pool/query_attribute.py is a regression recently introduced on master.
I am going to open JIRA ticket to solved

…/daos-14698

Restart CI with excluding unealthy test

Features: control dfuse container daos_cmd
Skip-list: QueryAttributeTest,test_query_attr:16829

Required-githooks: true
@daosbuild1
Copy link
Collaborator

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/36/testReport/

@daosbuild1
Copy link
Collaborator

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/37/testReport/

@knard38
Copy link
Contributor Author

knard38 commented Nov 28, 2024

Increase maximal log size of NLT size as last test failed with the following message:

Max log size exceeded, 1.7GiB > 1.7GiB

@knard38 knard38 force-pushed the ckochhof/dev/master/daos-14698 branch from f6e3058 to 1078650 Compare November 28, 2024 17:15
@knard38
Copy link
Contributor Author

knard38 commented Nov 28, 2024

Force push was just for updating the commit message to skip known functional test failure.

Fix NLT max log size.

Features: control dfuse container daos_cmd
Required-githooks: true

Signed-off-by: Cedric Koch-Hofer <[email protected]>
@knard38 knard38 force-pushed the ckochhof/dev/master/daos-14698 branch from 1078650 to d5a474a Compare November 29, 2024 07:47
@knard38
Copy link
Contributor Author

knard38 commented Nov 29, 2024

Force push again as the skip-test macros is not working as expected.

@daosbuild1
Copy link
Collaborator

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/40/execution/node/1210/log

…/daos-14698

Restart CI with excluding unealthy test

Features: control dfuse container daos_cmd
Skip-list: QueryAttributeTest,test_query_attr:16829 DfuseMUPerms,test_dfuse_mu_perms:16695

Required-githooks: true
…/daos-14698

Restart CI without excluding unealthy test

Features: control dfuse container daos_cmd
…/daos-14698

Restart CI without excluding unealthy test

Features: control dfuse container daos_cmd
@daosbuild1
Copy link
Collaborator

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/45/execution/node/1211/log

…/daos-14698

Allow-unstable-test: true
Features: control dfuse container daos_cmd
Required-githooks: true

Signed-off-by: Cedric Koch-Hofer <[email protected]>
@daosbuild1
Copy link
Collaborator

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/48/execution/node/1210/log

@knard38 knard38 requested review from phender and kjacque December 11, 2024 06:57
@knard38
Copy link
Contributor Author

knard38 commented Dec 11, 2024

Hello reviewers,

Hopefully, I should have integrated all your comments :-)

  • @mchaarawi could you have a look at the C code and NLT test to check if the modifications are OK for you.
  • @mjmac and/or @kjacque could you have a look at the GO code to check if the modifications are OK for you.
  • @daltonbohning and/or @phender could you have a look at the functional test parts to check if the modifications are OK for you.

The two errors of the functional tests are known issues:

Thanks in advance,
Cedric.

@knard38
Copy link
Contributor Author

knard38 commented Dec 12, 2024

@daos-stack/daos-gatekeeper please could you land this PR with the following message:

  • title: DAOS-14698 crtl: Create container with attributes
  • body:
Add new option attr to daos cont create allowing to define container user attributes.

@knard38 knard38 requested review from a team and removed request for ashleypittman December 12, 2024 08:37
@daltonbohning
Copy link
Contributor

Looks like no more changes to GO code after go-owners last reviewed, so not requiring re-review.

@daltonbohning daltonbohning merged commit c931b5f into master Dec 12, 2024
72 of 80 checks passed
@daltonbohning daltonbohning deleted the ckochhof/dev/master/daos-14698 branch December 12, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

9 participants