canonical / cos-proxy-operator

https://charmhub.io/cos-proxy
Apache License 2.0
2 stars 12 forks source link

wrong nrpe exporter binary gets downloaded #124

Closed nishant-dash closed 7 months ago

nishant-dash commented 7 months ago

Enhancement Proposal

I deployed cos proxy from edge

cos-proxy-monitors  n/a      error       1  cos-proxy  edge      70  no       hook failed: "monitors-relation-joined"

and its in error on

FileNotFoundError: [Errno 2] No such file or directory: 'nrpe_exporter-amd64'

As a result of https://github.com/canonical/cos-proxy-operator/commit/883ede25462d96ac042f802f8daf1285ca68eacb the only binary that gets downloaded is named nrpe_exporter-aarch64

# ls /var/lib/juju/agents/unit-cos-proxy-monitors-0/charm
LICENSE  README.md  dispatch  hooks  icon.svg  lib  manifest.yaml  metadata.yaml  nrpe_exporter-aarch64  revision  src  templates  vector  venv

Im not sure what the cleanest fix is given that https://github.com/canonical/nrpe_exporter/releases/tag/0.2.6 only has releases for arm64 and amd64 but not aarch64.

Perhaps you could release a binary for aarch64 and simplify the curl logic in charmcraft.yaml? https://github.com/canonical/cos-proxy-operator/blob/4e65ee92d8dd729cecbd1a76ea11d2b7d633898e/charmcraft.yaml#L29