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

Build not working if missing a git config #33

Open
afalzonelab opened this issue Mar 28, 2024 · 2 comments
Open

Build not working if missing a git config #33

afalzonelab opened this issue Mar 28, 2024 · 2 comments

Comments

@afalzonelab
Copy link
Collaborator

Hi,
building prometheus-slurm-exporter binary I found this error at head node post-install:

 cd /home/ec2-user/aws-parallelcluster-monitoring/prometheus-slurm-exporter; git status --porcelain
fatal: detected dubious ownership in repository at '/home/ec2-user/aws-parallelcluster-monitoring/prometheus-slurm-exporter'
To add an exception for this directory, call:

        git config --global --add safe.directory /home/ec2-user/aws-parallelcluster-monitoring/prometheus-slurm-exporter
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.
make: *** [bin/prometheus-slurm-exporter] Error 1

Testing manually, I solved with the fix following:

--- install-monitoring.sh.orig  2024-03-28 11:51:28.513604048 +0000
+++ install-monitoring.sh       2024-03-28 11:39:43.415747930 +0000
@@ -89,6 +89,7 @@
                # More info here: https://github.com/vpenso/prometheus-slurm-exporter/blob/master/LICENSE
                cd ${monitoring_home}
                git clone https://github.com/vpenso/prometheus-slurm-exporter.git
+                git config --global --add safe.directory ${monitoring_home}/prometheus-slurm-exporter
                sed -i 's/NodeList,AllocMem,Memory,CPUsState,StateLong/NodeList: ,AllocMem: ,Memory: ,CPUsState: ,StateLong:/' prometheus-slurm-exporter/node.go
                cd prometheus-slurm-exporter
                GOPATH=/root/go-modules-cache HOME=/root go mod download

Please, could you fix the on repo?

Thanks,
Alberto

@nicolaven
Copy link
Contributor

Hi @afalzonelab , can you please send a pull request?
Thanks

@zhaohaom-aws
Copy link

Hi, I am seeing the same issue when installing in AL2. Could you release the fix with a newer version?

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

No branches or pull requests

3 participants