-
Notifications
You must be signed in to change notification settings - Fork 42
[Elastic Agent] Agent Upgrade feature test #341
Comments
UPDATED 10/14, by Eric Davis: Thanks Michal! Allow me to take a first stab at the feature file, content posted below will be updated as we learn how we can test the feature. Manu and I are happy to review. The syntax below will be dependent on the stack-branch being new enough that the prior version Agent code is 'upgradeable'. For now we can merge this to 8.0 and 7.11 lines. The steps below have some steps added back for the filebeat, metricbeat, and endpoint about 'sending new data' to ES. Now is a good time to add those back. file: @agent_and_endpoint_upgrades @deploy-agent-and-upgrade @deploy-endpoint-with-agent-and-upgrade |
@EricDavisX Just to make sure I understand who will do what on this issue. You wrote the feature file, @michalpristas will write the hooks in the cuccumber framework with the help of @mdelapenya? |
that's a good plan as I see it. |
Note - we should we able to edit the comment above and capture all of the feature file spacing requirements to paste into the real file. I have been manually testing the feature and we can cite the following tech details to implementing this: Using the API, you can initiate the upgrade as follows...
the requirement for the API to pass in the source_uri is potentially not needed for all builds, but that is tbd as to when it isn't needed so lets plan to always send it for now. The challenge may be for us to capture the dynamic 'current' Agent build, but I think we have that code or at least can use jk / grep to parse it out from the general snapshot build likes like: https://artifacts-api.elastic.co/v1/search/7.11-SNAPSHOT
I think that is all that is new for this feature, if we need to discuss more API usage please don't hesitate to reach out |
Further on this, @michalpristas and @mdelapenya and @neptunian ...me and Michal had a quick chat. The above is doable with current architecture, but it doesn't actually cover the code that is executed in the Agent fully. So we're considering how to account further. I think if we had a -force flag in the API that would remove the Kibana restriction on upgrading version x.y.z to version x.y.z that could suffice. In that case, we could test the current PR agent in the current version of Kibana master could ‘force’ an upgrade to basically the same version, but it will be trying out the code in the Agent PR, that we want. I think that makes sense, thoughts? I don’t think we can test this without more code change to remove the (intentional) restriction. To re-use the phrasing Michal had started with me earlier, we'll have:
|
@EricDavisX If I understand correctly you need to be able to test to upgrading to the same version in order to test new builds. Does this have to be accessible through the UI (via a button) or would making a call to the API suffice? |
@neptunian we could survive with just API usage, as the test here will consume it as such. |
@EricDavisX Could this be something we do for 7.11 or is there a reason we'd need it in 7.10? |
The additional API support is preferred for 7.11, not needed or wanted for 7.10. @neptunian we're in good shape for 7.10. :) |
we are fully unblocked to implement this now. all feature tests are done and 7.10 is working well. |
this is done and can be closed, it was only ever targeted towards 'Agent' upgrade not Fleet, just fyi (hence why I updated the description) |
Scenario should be as follow:
2 versions of agent are available (must differ in last commit)
{uri}:{port}/beats/elastic-agent/{tar_name}
First agent is installed and is
ONLINE
in fleet.Second agent artifacts is made available
for local test i'm using fileserver with artifacts at
~/server/beats/elastic-agent/*
then from
~/server
i runpython3 -m http.server
Update is initiated either using UI (manual tests) or using API (manual/automated tests)
API for initiating upgrade using fileserver serving at localhost
If fleet does not send SourceURI it is good to configure
agent.download.sourceURI
tohttp://localhost:8000
inelastic-agent.yml
Agent is listed as
UPDATING
in fleetUpdate action is
ACK
ed in fleetAgent version is changed and agent is listed as
ONLINE
in fleetNo ERROR should be reported during this procedure.
Prerequisites
elastic/kibana#78810
elastic/beats#21461
The text was updated successfully, but these errors were encountered: