From f4b6a49b527509dfe4286f6c34012418bd526558 Mon Sep 17 00:00:00 2001 From: Michal Pristas Date: Tue, 2 Mar 2021 16:25:44 +0100 Subject: [PATCH] [Ingest Manager] Uninstall do not fail on state not present (#24290) [Ingest Manager] Uninstall do not fail on state not present (#24290) --- x-pack/elastic-agent/pkg/config/operations/inspector.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/elastic-agent/pkg/config/operations/inspector.go b/x-pack/elastic-agent/pkg/config/operations/inspector.go index 6a0697e06846..35164ba649ee 100644 --- a/x-pack/elastic-agent/pkg/config/operations/inspector.go +++ b/x-pack/elastic-agent/pkg/config/operations/inspector.go @@ -39,7 +39,8 @@ func LoadFullAgentConfig(cfgPath string) (*config.Config, error) { if err != nil { return nil, err } else if fleetConfig == nil { - return nil, fmt.Errorf("no fleet config retrieved yet") + // resolving fleet config but not fleet config retrieved yet, returning last applied config + return rawConfig, nil } return config.NewConfigFrom(fleetConfig)