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

Fix prometheus not restarting after config changes on systemd based systems #390

Merged
merged 2 commits into from
Nov 18, 2019

Commits on Nov 18, 2019

  1. Add failing acceptance test for service restart

    In systemd, the service is currently not being restarted after
    configuration changes.  See voxpupuliGH-382
    
    The acceptance test in this commit reconfigures prometheus with
    the admin API enabled and then attempts to access it.
    
    See https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis
    alexjfisher committed Nov 18, 2019
    Configuration menu
    Copy the full SHA
    20dc6a7 View commit details
    Browse the repository at this point in the history
  2. Fix systemd unit file not notifying the service

    The [unreliable](https://puppet.com/docs/puppet/5.5/lang_defaults.html#behavior) resource default
    ```
    File{
      notify => Class['prometheus::run_service']
    }
    ```
    is replaced by a `$notify` variable that is set on the relevant file
    resources *and* `systemd::unit_file`.  Some care was needed to make sure
    the reload behaviour wasn't broken.  ie If the configuration change is
    just a new scrape job that is collected, the service should only be
    reloaded, not restarted.
    
    Fixes voxpupuli#382
    alexjfisher committed Nov 18, 2019
    Configuration menu
    Copy the full SHA
    8588d88 View commit details
    Browse the repository at this point in the history