Skip to content

Conversation

@rgmiller
Copy link
Contributor

Implements a new broadcast RPC that commands servers to reply with the file attribute data for all the files

Description

The new RPC is named UNIFYFS_SERVER_BCAST_RPC_METAGET. As stated above, this sends a broadcast to all servers to reply with the file attribute structs for all files they manage.

Note that this is the first (and so far, only) broadcast RPC that requires the recipients to return a significant amount of data. (Prior to this, they only data returned from a broadcast RPC was an error code if something went wrong.) This has required a fair amount of new code for gathering the results from individual children, merging them with those from the parent and propagating all of that back up the broadcast tree. See merge_metaget_all_bcast_outputs in unifyfs_group_rpc.c

Motivation and Context

This is needed to implement 'ls' like functionality. The current unifyfs-ls tool can only list files known by the server handling the ls request. With this change in place, the tool can now list files from all the server processes.

How Has This Been Tested?

Existing unit tests work (srun -N1 -n1 make check)
Further testing was done with a handful of utilities to write files and then trigger the RPC.

Test environment: one Ubuntu 20.04 workstation with 3 VM's also running Ubuntu 20.04. Slurm and OpenMPI are configured on the host and VM's.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Testing (addition of new tests or update to current tests)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • [x ] My code follows the UnifyFS code style requirements.
  • I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • [x ] All new and existing tests passed.
  • [x ] All commit messages are properly formatted.

Add a new broadcast RPC that requests all servers to return metadata for
the files they own.

This is just the initial commit and RPC is not fully functional yet.
Continuing the work on the metaget_all broadcast RPC.  It's now
functional, but there's still a handful of "ToDo" comments that need to
be addressed.
Fix up the error handling and remove TODO comments from
process_metaget_bcast_rpc().
Implement proper error handling for some of the functions related to the
metaget_all_bcast RPC.  Also fix a few bugs found during testing.
We weren't deleting the child_attr_list array after we were done with
it.
@rgmiller rgmiller marked this pull request as draft April 13, 2023 20:13
@rgmiller
Copy link
Contributor Author

As is typical of my pull requests, there are a handful of comments marked as "TODO" that describe questions I have about the proper way to accomplish something. In particular, I'd like some input regarding the comments on lines 182 and 262 of unifyfs_group_rpc.c.

rgmiller added 6 commits May 5, 2023 13:51
Move the tree-walk code out of the process_metaget_bcast_rpc function
and into its own function in unifyfs_inode.c  Two reasons: 1) we want to
keep all the inode manipulation code in one place for convenience and 2)
it'll make it easier to re-use that code.
We decided "Exit" was too generic for a label, so now it's called
"Exit_Invoke_BMA".
Change unifyfs_invoke_broadcast_metaget_all() to also walk the local
tree and include file metadata with the results returned from the RPC
call.
Fix a case where we could incorrectly return ENOMEM even though the
malloc() succeeded.  Also cleaned up several comments.
@rgmiller rgmiller marked this pull request as ready for review May 19, 2023 20:14
@adammoody adammoody merged commit 2e60634 into llnl:dev Jun 5, 2023
@rgmiller rgmiller deleted the improved_ls branch July 12, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants