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

allow to run on macOS M2 arm architecture #681

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@
'x86_64', 'amd64': { $real_arch = 'amd64' }
'i386': { $real_arch = '386' }
'aarch64': { $real_arch = 'arm64' }
'arm64': { $real_arch = 'amd64' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks wrong. If facter reports arm64 you want to have amd64? Isn't arm64 the equivalent to aarch64?

Copy link
Author

@ni-jdyffort ni-jdyffort Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello and thanks for the input!
Initially I tried 'arm64': { $real_arch = 'arm64' } which didn't work back then (node_exporter failed to start or something like that). But it seems to work now. Let me do some more tests ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just checked it again, but the node_exporter compiled for arm is still failing to start:

ci-macos-build-10:bin developer$ file node_exporter
node_exporter: Mach-O 64-bit executable arm64
ci-macos-build-10:bin developer$ ./node_exporter -h
Killed: 9

(I also tried to run the [node_exporter-1.6.1.darwin-arm64.tar.gz](node_exporter-1.6.1.darwin-arm64.tar.gz directly with the same result).

So the only way for us to run it is to install/start it in Rosetta mode, therefor we need to stay with amd64

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case we should investigate why it fails. Pulling amd64 for all arm64 boxes isn't a correct solution, it's just a workaround for Apple devices. And it will break support for all actual arm64 devices.

'armv7l': { $real_arch = 'armv7' }
'armv6l': { $real_arch = 'armv6' }
'armv5l': { $real_arch = 'armv5' }
Expand Down
Loading