elastic / elastic/fleet-server

Unpleasent behavior when enrolling to non existing policy

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

Description

When agent we try to add fleet-server agent specifying `-fleet-server-policy` with an incorrect value (e.g typo) agent misbehaves.

It spins up fleet server, fleet server tries to read policy index with a specified policy which is empty, and retries and retries

behavior is not well defined:

```go
m.reporter.UpdateState(client.UnitStateStarting, fmt.Sprintf("Waiting on policy with Fleet Server integration: %s", m.policyID), nil) //nolint:errcheck // not clear what to do in failure cases
```

there may be a memory leak involved

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.