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

Add ARM support #683

Closed
dlanderson opened this issue Sep 24, 2021 · 4 comments · Fixed by #685
Closed

Add ARM support #683

dlanderson opened this issue Sep 24, 2021 · 4 comments · Fixed by #685

Comments

@dlanderson
Copy link
Contributor

We've added linux ARM support (aarch64) for the core agent binary in version 1.3.1. We need to add ARM architecture detection on linux for the Python agent.

On AWS graviton instance:

ubuntu@ip-172-31-58-208:~$ uname -a
Linux ip-172-31-58-208 5.4.0-1045-aws #47-Ubuntu SMP Tue Apr 13 07:04:23 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Note: I didn't try 3.9
Python 3.8

ubuntu@ip-172-31-58-208:~$ python3 --version
Python 3.8.10
ubuntu@ip-172-31-58-208:~$ python3
Python 3.8.10 (default, Jun  2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform;
>>> platform.machine()
'aarch64'
>>>

Python 2.7:

ubuntu@ip-172-31-58-208:~$ python --version
Python 2.7.18

ubuntu@ip-172-31-58-208:~$ python
Python 2.7.18 (default, Mar  8 2021, 13:02:45)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform;
>>> platform.machine()
'aarch64'
>>>

The core agent 1.3.1 builds available:

core-agent-v1.3.1-aarch64-unknown-linux-gnu
core-agent-v1.3.1-aarch64-unknown-linux-musl
core-agent-v1.3.1-i686-unknown-linux-gnu
core-agent-v1.3.1-i686-unknown-linux-musl
core-agent-v1.3.1-x86_64-apple-darwin
core-agent-v1.3.1-x86_64-unknown-linux-gnu
core-agent-v1.3.1-x86_64-unknown-linux-musl

@tim-schilling
Copy link
Collaborator

@dlanderson Sorry, I'm a bit confused on the details here. What's the functional change you're looking for?

@dlanderson
Copy link
Contributor Author

I think this needs:

  • aarch64 added as an option at https://github.com/scoutapp/scout_apm_python/blob/master/src/scout_apm/core/platform_detection.py#L21 and any associated tests.
  • Bump core-agent version default to 1.3.1
  • We don't build for darwin ARM (M1 Machines), so we should still use core-agent-v1.3.1-x86_64-apple-darwin even if we detect something other than x86_64 on macs (Rosetta will run x86 binaries on M1 macs just fine). From brief searching there are different archs returned for M1 on certain python versions.
  • Do any versions of python return anything other than aarch64?

@tim-schilling
Copy link
Collaborator

Thank you for the clarifications.

Do any versions of python return anything other than aarch64?

I imagine this depends on the machine that's being used. From what I can tell, python will try to make use of linux's uname command.

Can you share some of those searches with me that said different architectures are returned when using M1?

@tim-schilling
Copy link
Collaborator

Using Amazons ARM-64 image, I tested this with py2.7, 3.5-3.10. All returned aarch64.

tim-schilling added a commit that referenced this issue Sep 24, 2021
Default to latest v1.3.1 core agent version.
Closes #683
tim-schilling added a commit that referenced this issue Oct 4, 2021
Default to latest v1.3.1 core agent version.
Closes #683
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants