Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support disabling Elasticsearch compatibility check running under the agent #3701

Open
rdner opened this issue Jul 9, 2024 · 2 comments
Open
Labels
enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@rdner
Copy link
Member

rdner commented Jul 9, 2024

Describe the enhancement:

We should have a way of disabling the Elasticsearch compatibility check for testing purposes. There is a time period between minor releases when we need to run next minor version of the agent against a previous minor version of the stack.

Currently we have this error:

{
  "log.level": "info",
  "@timestamp": "2024-07-09T09:53:05.033Z",
  "log.origin": {
    "function": "github.com/elastic/elastic-agent/internal/pkg/agent/cmd.waitForFleetServer.func1",
    "file.name": "cmd/enroll_cmd.go",
    "file.line": 824
  },
  "message": "Fleet Server - Error - failed version compatibility check with elasticsearch (Agent: 8.16.0-SNAPSHOT, Elasticsearch: 8.15.0): unsupported version",
  "ecs.version": "1.6.0"
}

Which is coming from here

return fmt.Errorf("failed version compatibility check with elasticsearch (Agent: %s, Elasticsearch: %s): %w",

The compatibility check is enforced only when Fleet Server is NOT running in the standalone mode and that's exactly how it's running under the agent:

func NewFleet(bi build.Info, reporter state.Reporter, standAlone bool) (*Fleet, error) {

srv, err := NewFleet(a.bi, state.NewChained(state.NewLog(), a), false)

Describe a specific use case for the enhancement or feature:

Integration tests during the release cycle, when we still don't have a stack of the next minor but already have a snapshot of the agent in the next minor version.

Currently, we have to manually disable some tests for this period of time and then manually re-enable them.

@rdner rdner added enhancement New feature or request Team:Fleet Label for the Fleet team labels Jul 9, 2024
@rdner rdner changed the title Support disabling Elasticsearch compatibility check Support disabling Elasticsearch compatibility check running under the agent Jul 9, 2024
@jlind23 jlind23 added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team and removed Team:Fleet Label for the Fleet team labels Jul 9, 2024
@cmacknz
Copy link
Member

cmacknz commented Jul 9, 2024

This check was supposed to be unconditionally disabled between for snapshots, Fleet Server should tolerate an agent that is one minor version higher: #3039 and #2960

@cmacknz
Copy link
Member

cmacknz commented Jul 9, 2024

Ah this is for ES, we just need to do the same thing on that connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

3 participants