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

[MAC]: Unable to install agents on MAC hardware. #2487

Closed
amolnater-qasource opened this issue Apr 12, 2023 · 9 comments · Fixed by #2490
Closed

[MAC]: Unable to install agents on MAC hardware. #2487

amolnater-qasource opened this issue Apr 12, 2023 · 9 comments · Fixed by #2490
Assignees
Labels
bug Something isn't working impact:medium Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@amolnater-qasource
Copy link

amolnater-qasource commented Apr 12, 2023

Kibana version: 8.7.1 Snapshot Kibana cloud environment

Host OS: MAC studio with M1 chip and MAC Mini with Intel chip.

OS version: MAC 13.3.1

Build details:
8.7.1 SNAPSHOT
BUILD: 61162
COMMIT: 9c2031b89f9c0cea77e58638d8a43593b3e84cf7

Preconditions:

  1. 8.7.1 Snapshot Kibana cloud environment should be available.
  2. Agent Policy should be available with System integration.

Steps to reproduce:

  1. Run install command for MAC using Agent policy.
  2. Observe agent installation failed with error: failed to create elastic-agent symlink.

Screenshots:
image

NOTE:
Issue is reproducible with both:

Expected Result:
User should be able to install agents on MAC hardware.

@amolnater-qasource amolnater-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 Apr 12, 2023
@amolnater-qasource
Copy link
Author

@manishgupta-qasource Please review.

@manishgupta-qasource
Copy link

Secondary review for this ticket is Done

@amolnater-qasource
Copy link
Author

FYI @jlind23 @cmacknz

@jlind23 jlind23 added the Team:Elastic-Agent Label for the Agent team label Apr 12, 2023
@pierrehilbert pierrehilbert self-assigned this Apr 12, 2023
@pierrehilbert
Copy link
Contributor

Just try to reproduce and my Agent successfully unrolled.
Could we please have more details on the policy you are using?
sudo ./elastic-agent install --url=<url> --enrollment-token=<token> Elastic Agent will be installed at /Library/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:Y Successfully enrolled the Elastic Agent. Elastic Agent has been successfully installed.

@joshdover
Copy link
Member

@pierrehilbert can we have a few other devs on the team test this? We'll need to communicate a blocker quickly given the 8.7.1 release is scheduled for next week.

@joshdover
Copy link
Member

Looking at the error again - I think the problem is that the /usr/local/bin directory does not exist. This is likely never something we hit in development because we all have this directory on our local machines.

Probably the fix is to create that directory before creating the symlink. However, I'm not sure why this broke now.

@blakerouse
Copy link
Contributor

Do we have access or can we get access to Orka and we can do to an install on a clean Mac to test on a fresh Mac installation if the directory /usr/local/bin not exist.

@joshdover
Copy link
Member

@blakerouse You can spin up mac VMs on the elastic AWS account, available via Orka. I'm not sure if these VMs have this directory or not (my guess is not since we've never reproduced this before and QAS uses AWS VMs regularly).

Btw Amol did confirm that creating the directory fixes the problem and also repro'd on 8.5, so it's not a new issue. He'll be sharing more details soon.

@amolnater-qasource
Copy link
Author

Hi Team,

We have observed that on our MAC Studio with M1 chip, the bin folder didn't exist under usr/local/ location.
On creating the bin directory, the agent gets installed on latest 8.7.1 SNAPSHOT.

Further we have also validated this issue on 8.5.0 Kibana and found it reproducible there too when bin folder didn't exist.
On creating the bin folder, agent successfully installed on 8.5.0 production kibana cloud environment too.

Screenshots:
8.7.1:
Screenshot 2023-04-12 at 7 52 12 PM

8.5.0:
Screenshot 2023-04-12 at 7 56 44 PM
Screenshot 2023-04-12 at 7 59 09 PM

Build details:
8.5.0:
BUILD: 57058
COMMIT: 3db77af5d7066697635ad3e1eeeae81a92ae9711
Aritfact: https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.5.0-darwin-x86_64.tar.gz

8.7.1:
BUILD: 61162
COMMIT: 9c2031b89f9c0cea77e58638d8a43593b3e84cf7
Artifact: https://snapshots.elastic.co/8.7.1-eb00a600/downloads/beats/elastic-agent/elastic-agent-8.7.1-SNAPSHOT-darwin-x86_64.tar.gz

Please let us know if anything else is required from our end.
Thanks!

@joshdover joshdover added impact:medium and removed impact:high Short-term priority; add to current release, or definitely next. labels Apr 12, 2023
@amolnater-qasource amolnater-qasource added the QA:Ready For Testing Code is merged and ready for QA to validate label Apr 13, 2023
@amolnater-qasource amolnater-qasource removed the QA:Ready For Testing Code is merged and ready for QA to validate label May 25, 2023
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:medium Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants