-
Notifications
You must be signed in to change notification settings - Fork 148
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
[MAC 12]: Agent failed to upgrade from 8.4.2 to 8.5.0 BC1 for MAC 12 agent using agent binary. #1298
Comments
@manishgupta-qasource Please review. |
Secondary review for this ticket is Done |
I don't actually see anything related to upgrades in the agent logs. In {"log.level":"error","@timestamp":"2022-09-26T07:00:46.309Z","log.origin":{"file.name":"log/reporter.go","file.line":36},"message":"2022-09-26T03:00:46-04:00 - message: Application: filebeat--8.4.2[90e2a6ea-436c-405a-96f4-ea7eb7e6a69a]: State changed to FAILED: 2 errors occurred:\n\t* package '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz' not found: open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz: no such file or directory\n\t* call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz' returned unsuccessful status code: 404\n\n - type: 'ERROR' - sub_type: 'FAILED'","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-09-26T07:00:46.309Z","log.origin":{"file.name":"operation/operation_retryable.go","file.line":85},"message":"operation operation-fetch failed, err: 2 errors occurred:\n\t* package '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz' not found: open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz: no such file or directory\n\t* call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz' returned unsuccessful status code: 404\n\n","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-09-26T07:00:46.309Z","log.origin":{"file.name":"application/managed_mode.go","file.line":274},"message":"could not recover state, error operator: failed to execute step sc-run, error: 2 errors occurred:\n\t* package '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz' not found: open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz: no such file or directory\n\t* call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz' returned unsuccessful status code: 404\n\n: 2 errors occurred:\n\t* package '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz' not found: open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz: no such file or directory\n\t* call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz' returned unsuccessful status code: 404\n\n, skipping...","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:46.312Z","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":68},"message":"Starting stats endpoint","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:46.313Z","log.origin":{"file.name":"application/managed_mode.go","file.line":316},"message":"Agent is starting","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:46.313Z","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":70},"message":"Metrics endpoint listening on: /Library/Elastic/Agent/data/tmp/elastic-agent.sock (configured: unix:///Library/Elastic/Agent/data/tmp/elastic-agent.sock)","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:46.321Z","log.origin":{"file.name":"artifact/config.go","file.line":138},"message":"Source URI changed from \"https://artifacts.elastic.co/downloads/\" to \"https://staging.elastic.co/8.5.0-77585599/downloads/\"","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:46.322Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":48},"message":"New State ID is Zgj9TE4s","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:46.322Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":49},"message":"Converging state requires execution of 3 step(s)","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:47.425Z","log.origin":{"file.name":"http/downloader.go","file.line":307},"message":"download from https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz completed in Less than a second @ +InfYBps","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:47.516Z","log.origin":{"file.name":"http/downloader.go","file.line":307},"message":"download from https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.sha512 completed in Less than a second @ +InfYBps","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:47.516Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":75},"message":"downloaded binary 'filebeat.8.4.2' into '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz' as part of operation 'operation-fetch'","ecs.version":"1.6.0"} Similarly in {"log.level":"info","@timestamp":"2022-09-26T07:00:48.937Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":49},"message":"Converging state requires execution of 3 step(s)","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-09-26T07:00:49.310Z","log.origin":{"file.name":"status/reporter.go","file.line":260},"message":"Elastic Agent status changed to \"error\": \"app filebeat--8.4.2-0a6d0f0c: operation 'operation-verify' failed to verify filebeat.8.4.2: 2 errors occurred:\\n\\t* fetching asc file from '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc': open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: no such file or directory\\n\\t* fetching asc file from https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc' returned unsuccessful status code: 404\\n\\n\"","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-09-26T07:00:49.310Z","log.origin":{"file.name":"log/reporter.go","file.line":36},"message":"2022-09-26T03:00:49-04:00 - message: Application: filebeat--8.4.2[90e2a6ea-436c-405a-96f4-ea7eb7e6a69a]: State changed to FAILED: operation 'operation-verify' failed to verify filebeat.8.4.2: 2 errors occurred:\n\t* fetching asc file from '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc': open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: no such file or directory\n\t* fetching asc file from https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc' returned unsuccessful status code: 404\n\n - type: 'ERROR' - sub_type: 'FAILED'","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-09-26T07:00:49.311Z","log.origin":{"file.name":"operation/operation_retryable.go","file.line":85},"message":"operation operation-verify failed, err: operation 'operation-verify' failed to verify filebeat.8.4.2: 2 errors occurred:\n\t* fetching asc file from '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc': open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: no such file or directory\n\t* fetching asc file from https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc' returned unsuccessful status code: 404\n\n","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-09-26T07:00:49.312Z","log.origin":{"file.name":"application/managed_mode.go","file.line":274},"message":"could not recover state, error operator: failed to execute step sc-run, error: operation 'operation-verify' failed to verify filebeat.8.4.2: 2 errors occurred:\n\t* fetching asc file from '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc': open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: no such file or directory\n\t* fetching asc file from https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc' returned unsuccessful status code: 404\n\n: operation 'operation-verify' failed to verify filebeat.8.4.2: 2 errors occurred:\n\t* fetching asc file from '/Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc': open /Library/Elastic/Agent/data/elastic-agent-d3eb3e/downloads/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: no such file or directory\n\t* fetching asc file from https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc: call to 'https://staging.elastic.co/8.5.0-77585599/downloads/beats/filebeat/filebeat-8.4.2-darwin-x86_64.tar.gz.asc' returned unsuccessful status code: 404\n\n, skipping...","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:49.317Z","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":68},"message":"Starting stats endpoint","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-09-26T07:00:49.317Z","log.origin":{"file.name":"application/managed_mode.go","file.line":316},"message":"Agent is starting","ecs.version":"1.6.0"} In {"log.level":"error","@timestamp":"2022-09-26T06:55:32.057Z","log.origin":{"file.name":"emitter/controller.go","file.line":123},"message":"Failed to render configuration with latest context from composable controller: operator: failed to execute step sc-run, error: context canceled: context canceled","ecs.version":"1.6.0"} |
@amolnater-qasource Is this reproducible, or did it only happen once? |
Hi @cmacknz We have revalidated this issue on latest 8.5.0 BC1 Kibana cloud environment with 02 different mac agents and found this issue still reproducible:
Build details: Logs: Please let us know if anything else is required from our end. |
Pulling into the current sprint and assigning to @michalpristas to investigate. |
the error messages you have found are funny in a sense that they are after upgrade and still pointing to 8.4.2 something went wrong and was not reported or symlink change was performed incorrectly. looking at it |
found the root cause , the archive content structure is different and breaking as PR does not touch ChangeSymlinks I don't expect Upgrade to work in 8.5 as well meaning going from 8.5 up (havent tested) Fixing this is not that easy. With change in structure we need to
|
Can we consider not reverting the changes and making the necessary changes for 8.5? We have strategic customers waiting on this capability today. |
@bradenlpreston if we do not revert it, upgrading from any version to 8.5 would be failing due to this change. But even if we do an 8.4.X, it means that we will have to recommend our users to do the following: |
@jlind23 If customers stay on 8.4 then want to jump to 8.6/8.7 they'd still get into a broken state is that correct? |
@james-elastic - I was thinking the same. In every scenario it seems there will be a required upgrade path. Which I think would mean a full stack upgrade and agent upgrade (twice.) Is that correct @jlind23 Also cc: @aleksmaus , @ferullo , and @crowens |
just wanted to add the note about another possible workaround as we discussed:
where the data/elastic-agent-2f286f/elastic-agent could be the script/binary that fixes up the symlink and restarts the service all versions upgrade handles after 8.5 will already use the new app bundle path so the symlink will always point to the correct binary inside of the bundle and we can remove this temporary script from the distribution in the next versions |
@bradenlpreston yes that is correct. |
To what @aleksmaus suggested, 8.5 will stay be a mandatory release for all users before upgrading to a later one. |
@jlind23 What options exist in fixing this in 8.5 (per Michal's recommendations above)? Is it time? I appreciate that it may be risky but seems very reproducible. |
There is another possible solution to fix it for 8.5, talked to @jlind23 about this on Slack, will work on PR |
Hi Team Observations:
Build details: Hence, marking this issue as QA:Validated. |
|
Kibana version: 8.5 BC1 Kibana cloud environment
Host OS: MAC12
Build details:
VERSION: 8.5 BC1
BUILD: 56595
COMMIT: 0d8de4df69f8084a94cdd9638d7de510813cb5ce
Artifact link: https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.4.2-darwin-x86_64.tar.gz
Preconditions:
Steps to reproduce:
https://staging.elastic.co/8.5.0-77585599/downloads/
.Screenshot:
Logs:
elastic-agent-diagnostics-2022-09-26T07-02-28Z-00.zip
Expected Result:
Agent should upgrade from 8.4.2 to 8.5.0 for MAC 12 agent using agent binary.
The text was updated successfully, but these errors were encountered: