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

Exporters: Reload service if user has changed attributes #474

Merged
merged 1 commit into from
Jul 21, 2020
Merged

Exporters: Reload service if user has changed attributes #474

merged 1 commit into from
Jul 21, 2020

Conversation

bastelfreak
Copy link
Member

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@bastelfreak bastelfreak added the bug Something isn't working label Jul 10, 2020
@bastelfreak bastelfreak self-assigned this Jul 10, 2020
@bastelfreak
Copy link
Member Author

verified that it works:

Info: Applying configuration version '1594364693'
Notice: /Stage[main]/Prometheus::Bird_exporter/Prometheus::Daemon[bird_exporter]/User[bird-exporter]/groups: groups changed bird-exporter to ['bird', 'bird-exporter', 'bird6'] (corrective)
Info: /Stage[main]/Prometheus::Bird_exporter/Prometheus::Daemon[bird_exporter]/User[bird-exporter]: Scheduling refresh of Service[bird_exporter]
Notice: /Stage[main]/Prometheus::Bird_exporter/Prometheus::Daemon[bird_exporter]/Service[bird_exporter]: Triggered 'refresh' from 1 event
Notice: Applied catalog in 43.25 seconds

@bastelfreak bastelfreak merged commit 915f589 into voxpupuli:master Jul 21, 2020
@bastelfreak bastelfreak deleted the user branch July 21, 2020 10:26
Comment on lines +140 to +144
if $manage_service {
$notify = $notify_service
} else {
$notify = undef
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested, but wouldn't it be better to use:

if $manage_service {
  User[$user] ~> $notify_service
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhm, that could work as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# lid  bird-exporter
 bird(gid=484)
 bird6(gid=483)
 bird-exporter(gid=482)
# usermod -G bird-exporter bird-exporter
# lid  bird-exporter
 bird-exporter(gid=482)
# puppet agent -t --environment testenv
Info: Using configured environment 'testenv'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for testnode
Info: Applying configuration version '1595330160'
Notice: /Stage[main]/Prometheus::Bird_exporter/Prometheus::Daemon[bird_exporter]/User[bird-exporter]/groups: groups changed bird-exporter to ['bird', 'bird-exporter', 'bird6'] (corrective)
Info: /Stage[main]/Prometheus::Bird_exporter/Prometheus::Daemon[bird_exporter]/User[bird-exporter]: Scheduling refresh of Service[bird_exporter]
Notice: /Stage[main]/Prometheus::Bird_exporter/Prometheus::Daemon[bird_exporter]/Service[bird_exporter]: Triggered 'refresh' from 1 event
Notice: Applied catalog in 42.21 seconds
#

I will create a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants