-
Notifications
You must be signed in to change notification settings - Fork 51
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
add resource journal #6586
base: master
Are you sure you want to change the base?
add resource journal #6586
Conversation
Problem: the reslog class has no way to access the resource inventory, but it will be useful to send journal consumers a copy of R when the resource-define event is emitted. Pass the resource_ctx to reslog_create() instead of just the flux_t handle. Adjust internal uses of the flux_t handle to get it via reslog->ctx->h instead of reslog->h.
Problem: the full resource eventlog, including online/offline events that are not committed to the KVS, may need to be monitored. Keep events in a json array in memory, including the events that were read from the KVS at startup, if any. Filter out any historical resource-define events. These are meant for synchronization on the availability of R and that only pertains to the current instance.
46bf4a3
to
5e12001
Compare
Problem: there is no way to observe the journal in real time, with non-persistent online/offline events included. Add a resource.journal RPC with protocol similar to the job manager journal.
Problem: a resource journal consumer will get online/offline events before knowing the size of the instance or the hostname mapping. Post a 'restart' event when the resource module is loaded with the following keys: ranks An idset containing all valid ranks: 0 to size-1 online An idset containing any ranks that are initially online. This is normally empty except when starting with monitor-force-up in test. nodelist Contents of the hostlist broker attribute This event is not made persistent in the KVS resource.eventlog.
5e12001
to
3ff612f
Compare
I added a quick |
Yeah, let me see if I can generalize the |
Problem: there is no convenient tool for accessing the resource journal. Add flux resource eventlog [--follow] [--wait=EVENT].
Problem: there are no tests for the resource journal or the flux resource eventlog command. Add a sharness test for this purpose.
Problem: flux resource eventlog has no documentation. Add an entry to the man page.
3ff612f
to
e047195
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6586 +/- ##
==========================================
- Coverage 79.47% 79.45% -0.02%
==========================================
Files 531 531
Lines 88433 88574 +141
==========================================
+ Hits 70282 70379 +97
- Misses 18151 18195 +44
|
This adds a resource journal streaming RPC similar the one offered by the job manager. Just a first cut at this point.
This doesn't change what's posted to the persistent
resource.eventlog
in the KVS but does add one new event calledrestart
that's only for journal consumption. It provides a baseline for mapping execution targets to hostnames in the current instance, and sets the initialonline
set after a restart.Unlike the job manager journal, this doesn't have as much volume to deal with so no options for event filtering or skipping historical data are provided as yet.
flux resource eventlog
can be used to dump and optionally follow this log. This is not currently polished at all - it just dumps the events in JSON form, one per line.For more detail on what's in this log and how the journal is formatted, see the proposed RFC: