Skip to content

RivetMSP 26.10.17: RivetCore 1.0.0-rc.14 (Alerting thresholds fix)

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 11 Oct 23:13
· 7 commits to master since this release

Small patch release. Adopts RivetCore 1.0.0-rc.14, which fixes Cannot use object of type stdClass as array from AlertingActions::getThresholds: on an install that never edited its global checks (the built-in list, where pending_reboot has empty params) the thresholds part of the Alerting tab of an agent-linked device failed, was logged, and showed the "declares no thresholds" note for every check. Inside Core a check definition's params is now always an array; \stdClass exists only on the wire (ChecksValidator::toWire()), so the stored checks_json, the signed check messages and the policy version hashes are byte for byte unchanged (the golden transcripts still replay identically, 10 files). No migration: DB stays 2.6.89.

Deploy notes: back up the database, pull this tag, composer install --no-dev --no-plugins --no-scripts. No update_db step, no new cron line, no nginx change, no agent change (an agent built from rc.13 keeps working; the fix is server side).

  • Edition code audited, no change needed. Nothing in includes/rmm_*.php, agent/rmm_*.php, agent/post/rmm_*.php, js/ or src/Core/Adapter/Endpoint/ checks instanceof \stdClass, json-encodes a check list or reads params as an object; the thresholds editor and the policy viewer already treat params as an array, and the administration checks editor prints Core's wire-shaped settings summary ({}, asserted below).
  • Pin: rivet/rivet-core ^1.0.0-rc.14 (lock reference fae6d98e63669294ed1bbf6719d082b1bedeb600), vendored copy identical to git archive of the tag. tests/wave1_integration.php follows the pin (79 checks).
  • Regression test in tests/rmm_ui_p23_c_alerting.php: with no checks_json stored, a device that reports disk_c, pending_reboot, svc_eventlog and agent_update loads the asset page Alerting tab; the technician thresholds route answers for each defined check, every default check lists in the thresholds part, the server log holds no stdClass / Cannot use object / fatal line, and the administration checks editor still shows "params": {}. Run against the rc.13 vendored Core the same checks fail (pending_reboot params is an object, thresholds answer 500, the error is logged), so the test is not vacuous.
  • Tests: tests/rmm_ui.php 1617 checks (18 new), nine browser smokes, the RMM, golden (replay identical, strict identical), real agent and phpunit (229 tests) suites and the regression list all as on 26.10.16. Known failures, identical on 26.10.16 (rc.13 Core): sla_pause 2, recovery_integration 3 (the 600000-iteration drill archive), browser rmm_p68_admin_smoke check 14 (queue-worker guidance text, environment dependent); rmm_smoke check 25 (tag removal after reload) is intermittent. Nothing was deployed.