elastic / elastic/fleet-server

[OpAMP] Support `AcceptsRestartCommand`

Open
#6,818 0 comments 0 reactions 0 assignees View on GitHub
enhancement Team:Elastic-Agent-Control-Plane
Dominant language
Go
Stars
113
Forks
117
Avg merge
1d 16h
Merged PRs (30d)
112

Description

**Describe the enhancement:**

Add support to Fleet Server for sending restart commands to OpAMP clients that advertise `AcceptsRestartCommand`. This allows Fleet to trigger a managed agent restart on demand.

**Capability advertisement vs. offering:**

`AcceptsRestartCommand` has no corresponding `Offers*` bit on the server side — the server does not advertise a matching capability. However, Fleet Server MUST NOT send a restart command unless the client has advertised [`AcceptsRestartCommand`](https://opentelemetry.io/docs/specs/opamp/#agenttoservercapabilities) in its most recent `AgentToServer` message. See the [ServerToAgentCommand message section](https://opentelemetry.io/docs/specs/opamp/#servertoagentcommand-message) of the spec.

**Testing:**

This feature should be tested against an upstream OTel Collector (contrib distribution) managed by the OpAMP Supervisor. The supervisor does NOT advertise `AcceptsRestartCommand` by default — the supervisor config must set `capabilities.accepts_restart_command: true`. See the [OpAMP Supervisor README](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor) for instructions on running the supervisor, and the [OTel Collector contrib releases](https://github.com/open-telemetry/opentelemetry-collector-releases/releases) page for the collector binary.

**Describe a specific use case for the enhancement or feature:**

Fleet operators need to trigger a restart of a managed agent on demand — for example, to recover from a transient failure or to force a reload after a configuration change that requires a full restart.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.