Jackhammer agent - #1092
Conversation
New agent wrapping sodetlib's jackhammer hammer() function, exposing it as an OCS task with the same options (slots, no_reboot, no_dump, skip_setup, dump_rogue). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Store the traceback in session.data['error'] on failure so clients can inspect what went wrong. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use the new hammer() return value to populate session.data with succeeded_slots and failed_slots. Distinguish full success, partial success, and total failure in the task return message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
actually, if it's possible for an OCS panel to display data from an ocs feed, we wouldn't need another monitor process and could get this info from the det-controller agents (with a config change for the streamers). |
…tatus Poll SystemConfigured and ConfiguringInProgress EPICS registers per slot every 10s via epics.caget. Publishes to a system_configured OCS feed and populates session.data for ocs-web display. Auto-starts on agent launch; suppress with --no-processes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8b26187 to
47c0adb
Compare
|
@BrianJKoopman How do you usually proceed for testing new agents? Can I run this on a LAT smurf server in parallel to the production OCS and try hammering slots? |
mhasself
left a comment
There was a problem hiding this comment.
Non-exhaustive review -- looks good for the most part but:
- You'll need to add a page to the docs, especially including configuration information.
- Consider starting agent name with Smurf or Pysmurf so that it sorts better in agent lists (e.g. in ocs sidebar; hostmanager lists). E.g.
SmurfHammerAgent - It's nice to require privs=2, but functionally that will make this inert right now because we don't run access control at the site! Can be changed later.
I don't think we want to release this to the world without access control. What's the timescale for that? |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for taking a look! I renamed the agent and added to the docs, but holding off on changing the permissions until we decide on the path forward. If escalating permissions is not supported right now, I don't feel like it's very risky to deploy this without locking it down. I seems to me like anyone with access to ocs-web can already do a lot of damage (potentially a lot worse than hammering SMuRF). btw I'll be out on vacation next week, so if this converges on that timescale and someone wants to push it through, don't wait on me! |
Fair point @tristpinsm! |
Here is a first draft for a
jackhammeragent. It should allow individual slots to fail and track the results.Currently, I think you could set up an OCS-web panel that would display the result for each slot. This would only update to display the last jackhammer run however (and I guess only show the slots that were requested in that run).
If we wanted to have a continuously updating panel, we could add a monitor process to the agent that queries the
SmurfApplication.SystemConfiguredregister, modeled on the ACU agent. I'm not super familiar with OCS, so let me know if that is a good idea.Requires simonsobs/sodetlib#514