Skip to content

fix(mm): add stability for minimega commands across hosts#110

Merged
cmulk merged 2 commits into
sandialabs:mainfrom
nblair2:fix/mm2
Jun 6, 2026
Merged

fix(mm): add stability for minimega commands across hosts#110
cmulk merged 2 commits into
sandialabs:mainfrom
nblair2:fix/mm2

Conversation

@nblair2

@nblair2 nblair2 commented May 31, 2026

Copy link
Copy Markdown
Contributor

fix(mm): add stability for minimega commands across hosts

Description

Address stability across multi-host uses. Add a timeout/retry for getting responses from the mesh.

Add a deprecation notice to mm_last_command, and remove any calls here. This function isn't race-safe. I left in because I am not sure if any custom apps are using it.

Note

I have 2 commits here, intentionally not squashed. The second is to fix an unrelated issue from #105 to make the format checks happy.

Related Issue

Type of Change

Please select the type of change your pull request introduces:

  • Bugfix
  • New feature
  • Documentation update
  • Other (please describe):

Checklist

  • This PR conforms to the process detailed in the Contributing Guide.
  • I have included no proprietary/sensitive information in my code.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have tested my code.

Additional Notes

N/A

@nblair2 nblair2 marked this pull request as ready for review May 31, 2026 21:18
@nblair2 nblair2 marked this pull request as draft June 1, 2026 16:27
@nblair2 nblair2 force-pushed the fix/mm2 branch 3 times, most recently from f4b696d to f3cbb03 Compare June 1, 2026 21:13
@nblair2 nblair2 marked this pull request as ready for review June 1, 2026 21:31
Comment thread src/python/phenix_apps/common/utils.py
Comment thread src/python/phenix_apps/common/utils.py
@cmulk

cmulk commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

looks good to me, no other comments other than the couple minor things above

* Client Active - wait for up to 5 minutes for a client to be active
before throwing an error (mirrors the core phenix Go code behavior)
* Command IDs - read the ID from the cc response Data (mm_command_id)
deprecate the racy mm_last_command
* Multi-host scans - mm_cc_all_hosts reads every host's response
instead of failing on a sibling's "no client" error
* Exit-code wait - mm_cc_exitcode_wait bounded-polls to ride out
the gap between a response being counted and the exit code being
written

Add some tests for mm cc
Comment thread src/python/phenix_apps/common/utils.py
Comment thread src/python/phenix_apps/common/utils.py
Comment thread src/python/phenix_apps/common/utils.py
@cmulk cmulk merged commit 7b9036d into sandialabs:main Jun 6, 2026
3 checks passed
@GhostofGoes

Copy link
Copy Markdown
Contributor

Are the phenix environment variables documented anywhere? If not, I can make an issue and take a task to document those.

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