voxpupuli / puppet-prometheus

Puppet module for prometheus
https://forge.puppet.com/puppet/prometheus
Apache License 2.0
60 stars 241 forks source link

Old URL releases are not removed #625

Open SaschaDoering opened 2 years ago

SaschaDoering commented 2 years ago

How to reproduce (e.g Puppet code you use)

Use $install_method = 'url' and update $version in any exporter.

What are you seeing

If you do this a few times, it can lead to the following:

  177.5 MiB [##########] /prometheus-2.28.1.linux-amd64
  162.0 MiB [######### ] /prometheus-2.24.1.linux-amd64
  159.9 MiB [######### ] /puppetlabs
  158.7 MiB [########  ] /prometheus-2.23.0.linux-amd64
  157.9 MiB [########  ] /prometheus-2.22.0.linux-amd64
  157.4 MiB [########  ] /prometheus-2.21.0.linux-amd64
  150.0 MiB [########  ] /prometheus-2.20.0.linux-amd64
  147.1 MiB [########  ] /prometheus-2.19.0.linux-amd64
  145.1 MiB [########  ] /prometheus-2.18.1.linux-amd64
  139.6 MiB [#######   ] /prometheus-2.17.2.linux-amd64
  137.7 MiB [#######   ] /prometheus-2.16.0.linux-amd64
   50.4 MiB [##        ] /alertmanager-0.21.0.linux-amd64
   18.8 MiB [#         ] /node_exporter-1.0.1.linux-amd64
   17.7 MiB [          ] /node_exporter-1.2.0.linux-amd64
   17.4 MiB [          ] /blackbox_exporter-0.19.0.linux-amd64
   16.3 MiB [          ] /blackbox_exporter-0.16.0.linux-amd64
   16.1 MiB [          ] /node_exporter-0.18.1.linux-amd64

What behaviour did you expect instead

I would expect the old no longer used releases to be removed in order not to consume unnecessary resources.

Any additional information you'd like to impart

To achieve this I have created a directory under /opt which can be purged. There are other ways, but I found this the cleanest.

Ph0B1uS commented 2 years ago

seems like tarballs in /tmp are not removed either after installation, perhaps a cleanup boolean defaulting to true to control this behaviour would be in order too

TheMeier commented 6 months ago

Is it possible this was due https://github.com/voxpupuli/puppet-archive/issues/328 and is gone now?

TheMeier commented 6 months ago

I just checked tarballs in /tmp are removed after installation.