Skip to content

fix(multitenancy): CU-86akb83pw: Reduce agent distributed_interval from 60 to 10 sec - #137

Merged
oleksandrd-flamingo merged 1 commit into
mainfrom
fix/openframe-agent-options
Sep 3, 2026
Merged

fix(multitenancy): CU-86akb83pw: Reduce agent distributed_interval from 60 to 10 sec#137
oleksandrd-flamingo merged 1 commit into
mainfrom
fix/openframe-agent-options

Conversation

@oleksandrd-flamingo

Copy link
Copy Markdown

CU-86akb83pw

Under multitenancy tenants served no agent options, so hosts fell back to osquery's defaults — distributed_interval 60s instead of 10s, making live queries and refetch slow. Two causes: upstream auto-applies its GitOps starter library after POST /setup and its template declares no agent_options, so the declarative apply nulls what setup just wrote; and OpenframeDefaultAppConfig() dropped agent options entirely after CU-86ah5x16c (a served logger_tls_endpoint broke log delivery, so the whole block was nulled).

Changes

  • Skip the starter library application (same shape as upstream's Primo skip).
  • Seed upstream's new-install agent options, trimmed of endpoint/plugin keys (logger_tls_endpoint, *_plugin, *_tls_*_endpoint) — those only override orbit's command-line wiring; intervals, attempts, pack_delimiter and decorators are kept. Trimming at the source covers all consumers of the defaults: tenant seeding in EnsureOpenframeTeamID, the missing-row read fallback, and the instance-row migration.

Both gated on FLEET_OPENFRAME_MULTI_TENANCY_ENABLED, so non-multitenant deployments keep upstream behavior byte for byte. Agent config reads are team-pinned, so a host is served its tenant's (trimmed) row; POST /setup still writes upstream's untrimmed defaults to the unpinned instance row (id = 1), read only by crons and boot.

Existing instances are deliberately left untouched: rows wiped before this change keep serving no agent options until re-applied per tenant.

Tests: trim + defaults unit tests, MySQL-backed tenant-seeding assertions (MYSQL_TEST=1, green).

No API changes

Backward compatible in both rollout directions

🤖 Generated with Claude Code

…om 60 to 10 sec

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oleksandrd-flamingo
oleksandrd-flamingo force-pushed the fix/openframe-agent-options branch from 7806aad to 45946f1 Compare September 3, 2026 15:04
@oleksandrd-flamingo
oleksandrd-flamingo enabled auto-merge (squash) September 3, 2026 15:07
@oleksandrd-flamingo
oleksandrd-flamingo merged commit 98c4393 into main Sep 3, 2026
5 checks passed
@oleksandrd-flamingo
oleksandrd-flamingo deleted the fix/openframe-agent-options branch September 3, 2026 15:19
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.

2 participants