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

Register Cleanup of Files and Directories #27

Merged
merged 1 commit into from
Jan 11, 2018
Merged

Register Cleanup of Files and Directories #27

merged 1 commit into from
Jan 11, 2018

Conversation

rhc54
Copy link
Member

@rhc54 rhc54 commented Dec 9, 2017

Application processes frequently need to create temporary files and directories (e.g., for shared memory backing) that need to be cleaned up upon termination. This RFC provides a mechanism by which the process can register a file or directory for post-termination cleanup by the PMIx server.

Signed-off-by: Ralph Castain [email protected]

@rhc54
Copy link
Member Author

rhc54 commented Dec 9, 2017

@jsquyres @ggouaillardet What do you think?

@jsquyres
Copy link
Member

@rhc54 and I discussed and revised this a bunch today. 👍 from me.

@rhc54 rhc54 added the SECONDED label Dec 13, 2017
RFC0027.md Outdated
PMIX_INFO_LOAD(&info[0], PMIX_REGISTER_CLEANUP, "/mytmpdir", PMIX_STRING);
PMIX_INFO_LOAD(&info[1], PMIX_REGISTER_CLEANUP, "/tmp/dev_shm/mybackfile", PMIX_STRING);
/* recursively cleanup subdirectories */
PMIX_INFO_LOAD(&info[2], PMIX_CLEANUP_RECURSIVE, NULL, PMIX_BOOL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhc54 to which directory this recursive flag will be applied?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the ones contained in this particular registration - if you want one to be recursive and the other not, then they need to be registered separately.

@artpol84
Copy link
Member

I think this is a very convenient feature.
Some time ago I introduced rmclean flag:
https://github.com/pmix/pmix/blob/master/include/pmix_common.h.in#L194
It is related to the session directory and mean that resource manager will take care of the session directory. It is a convenient thing in general but may be a problem if the app is storing some debugging files there.
So it might be interesting to provide an additional hints to PMIx server saying that following files if found should be moved to a specified directory so RM will be safe to cleanup the session dir. And it will be useful for users so they won't need to go to each node and collect the debug files, they will just specify a shared FS location and will find them there after the app is done.

@rhc54
Copy link
Member Author

rhc54 commented Dec 22, 2017

Sounds reasonable - please feel free to provide a PR with such an extension against this RFC.

@artpol84
Copy link
Member

@rhc54 I like this proposal too.
As for my suggestion - I will work on the separate RFC since it has to be accompanied by a code IIRC.

@rhc54
Copy link
Member Author

rhc54 commented Jan 11, 2018

Kewl - thanks!

@rhc54 rhc54 added the APPROVED label Jan 11, 2018
Application processes frequently need to create temporary files and directories (e.g., for shared memory backing) that need to be cleaned up upon termination. This RFC provides a mechanism by which the process can register a file or directory for post-termination cleanup by the PMIx server.

Final adjustment to identify directories vs files with a dedicated
attribute.

Signed-off-by: Ralph Castain <[email protected]>
@rhc54 rhc54 merged commit 40c41fd into pmix:master Jan 11, 2018
@rhc54 rhc54 deleted the rfc/cleanup branch January 11, 2018 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants