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

[Fleet]: Unable to Uninstall Agent After Upgrade from 8.13.4 to 8.15.0 BC2 #5137

Closed
harshitgupta-qasource opened this issue Jul 16, 2024 · 11 comments
Labels
bug Something isn't working impact:high Short-term priority; add to current release, or definitely next. QA:Validated Validated by the QA Team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@harshitgupta-qasource
Copy link

Kibana Build details:

VERSION: 8.15.0 BC2
BUILD: 76111
COMMIT: 8d6510f30e7a52246ccebbf7d913a59b498c3bc2

Host OS and Browser version: All, All

Preconditions:

  1. 8.15.0 BC2 Kibana Cloud environment should be available.
  2. 8.13.4 agent should be deployed
  3. Elastic Defend should be added to policy.

Steps to reproduce:

  1. Navigate to Agents Tab

  2. Upgrade the agent from 8.13.4 to 8.15.0.

  3. Wait for the agent to upgrade and then uninstall Agent After Upgrade from 8.13.4 to 8.15.0 BC2.

  4. Observe agent upgrade gets failed.

Expected:

  • User should be able to Uninstall Agent After Upgrade from 8.13.4 to 8.15.0.

Screenshot:

  • Windows
    image (7)

  • Ubuntu
    image

Agents Logs:

@harshitgupta-qasource harshitgupta-qasource added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team impact:high Short-term priority; add to current release, or definitely next. labels Jul 16, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@harshitgupta-qasource
Copy link
Author

@amolnater-qasource Kindly review

@amolnater-qasource
Copy link

Secondary Review for this ticket is Done.

@jlind23
Copy link
Contributor

jlind23 commented Jul 16, 2024

Hey @harshitgupta-qasource what was the system integration version you were using?

@jlind23
Copy link
Contributor

jlind23 commented Jul 16, 2024

This looks related to a change that @pierrehilbert recently introduced in elastic/integrations#10471 so if you are able to downgrade the system integration to the previous version 1.59.0 this would allow us to rule this out.

@kpollich
Copy link
Member

@jsoriano - Does anything about the implementation of this condition for the processors in the above look off to you?

https://github.com/elastic/integrations/blob/b9a416c667a13e732c1a1f15eb722476c38b4ea5/packages/system/data_stream/auth/agent/stream/log.yml.hbs#L27-L39

Looking at other examples, I think this usage should be okay, but the errors above seem to indicate some kind of parsing error.

@pierrehilbert
Copy link
Contributor

We already got this issue in the past, I'm investigating: elastic/go-ucfg#196

@pierrehilbert
Copy link
Contributor

pierrehilbert commented Jul 16, 2024

I think the error is coming from here:

} else if subCfg.IsArray() {
var subArr []interface{}
err = subCfg.Unpack(&subArr, ucfg.ResolveNOOP)
if err != nil {
return nil, fmt.Errorf("error unpacking subarray in config for skip key %s: %w ", skip, err)
}
subUnpacked = subArr
} else {

We are not using ucfgOpts and therefore we are not using IgnoreCommas

cc @fearful-symmetry as you spent time on the initial fix.

@fearful-symmetry
Copy link
Contributor

yup, looks like we're missing the IgnoreCommas option from a few of the Unpack statements. Changing the statements to err = subCfg.Unpack(&subArr, ucfg.ResolveNOOP, ucfg.IgnoreCommas) should fix it.

@pierrehilbert
Copy link
Contributor

@harshitgupta-qasource could you please test with the new System Integration package and confirm this is fixed?

@harshitgupta-qasource
Copy link
Author

Hi @pierrehilbert

Thanks for the looking into this issue.

We have re-validated this issue on the latest 8.15.0 BC4 Kibana cloud environment and found it fixed now.

Observations:

  • User is able to Uninstall Agent After Upgrade from 8.13.4 to 8.15.0.
  • Available system version integration is 1.60.0

Build details:
VERSION: 8.15.0
BUILD: 76261
COMMIT: 9d62937675e62265342e86d8f0db601dc75498b8

Screen-shot
image

Hence, we are closing this issue and marking as QA: Validated.

Thanks

@harshitgupta-qasource harshitgupta-qasource added the QA:Validated Validated by the QA Team label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working impact:high Short-term priority; add to current release, or definitely next. QA:Validated Validated by the QA Team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

7 participants