-
Notifications
You must be signed in to change notification settings - Fork 92
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
BUG: Download grafana agent archive to local folder in case of different arch #166
Comments
did you find any workaround for the same, getting same issue while running it on bunch of hosts having both arm64 and amd64 type archs |
Hey @devmittal02, Haven't checked it out as we are building a new role for Grafana Agent which is for flow mode (recommended way now) so probably can test this out on that. If you wanna double check, we have a PR open so I can get any changes you want in that right now. |
My "workaround" is to group arm and amd VM in different groups and run 2 pipelines with interntory limit (-l) |
This seems a very weird issue, @davordbetter any thoughts on why this is specially failing on GitLab? @devmittal02 What platform are you running the playbook on? |
Hey i think the issue is because of this run once, i am running on AWX to the entire fleet of ec2 machines, it spins up a on demand container and triggeres the playbook across the machines using SSM, What's happening is lets say for 1st machine when it ran lets say that was AMD, so it downloaded the binary for that only and store in local, next time when ARM machine comes , it skips download step because of "run once" and copies only the previous AMD variant of binary, hence the issue of file doesn't exists, as it is a wrong binary
|
@ishanjainn can't figure it out, why same docker image with roles runs on my pc with both binaries, on gitlab pipeline only one (which is correct acorting to role run_once). But only difference is that my pc is M2 macbook (emulated amd64 docker image) while gitlab runner runs on amd64 linux ubuntu vm. |
The issue is indeed that the task has "run_once" Until this gets fixed the simplest workaround would be to separate the hosts based on cpu architecture in the playbook that executes the role. Something like this: inventory/hosts[amd64_hosts]
example.host.tld
[arm64_hosts]
arm.host.tld playbook.grafana_agent.yml---
- name: Grafana agent on amd64 hosts
hosts: amd64_hosts
roles:
- role: grafana.grafana.grafana_agent
- name: Grafana agent on amd64 hosts
hosts: arm64_hosts
roles:
- role: grafana.grafana.grafana_agent |
Based on the message in the Grafana Agent documentation:
I believe this can be closed, and migration to Alloy is required. @ishanjainn, what are your thoughts? |
Need to reopen again, but this would be really nice to be solved and I don't see that it should be a big issue to solve. |
I have two hosts in inventory.
One machine is amd64 and another is arm64.
While running ansible-playbook on my pc, it works fine.
While same playbook on gitlab ci/cd pipeline does not repeat download archive and downloads only amd64 binary
Looking at role task
it has option "run_once: true".
Now I'm confused why did repeat download on local env, while pipeline did honor run_once parameter.
Anyway, I think run_once should not be here or it should be solved in some different way.
On other hand, this run_once is handy when I run script over high amount of VMs.
The text was updated successfully, but these errors were encountered: