Skip to content

Build not working if missing a git config #33

@afalzonelab

Description

@afalzonelab

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions