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

bareos::director tries to collect all exported File resources #30

Closed
selverob opened this issue Mar 19, 2019 · 3 comments · Fixed by #35
Closed

bareos::director tries to collect all exported File resources #30

selverob opened this issue Mar 19, 2019 · 3 comments · Fixed by #35

Comments

@selverob
Copy link

Here:

https://github.com/Project0/puppet-bareos/blob/979d73480325bdf68d496b4913eedc7c9bfd64f0/manifests/director.pp#L63

bareos::director class tries to collect all the exported file resources in the catalog. When we try to apply it, Puppet attempts to create unrelated files (for example Prometheus collector config files) which should be collected on another server. This makes the Puppet run fail.

The file collection should be scoped by tag. We also tried fixing it by just removing the File <| |> -> statement and it doesn't seem to have broken anything.

@project0
Copy link
Collaborator

project0 commented Mar 19, 2019

interesting, actually it should not affect other modules. The File resource collector is required to ensure consistent behaviour after file changes, so it does not restart the bareos services while its still changing its config files (which can happen).
Anyway, adding a tag to the files should be doable.

@selverob
Copy link
Author

Well, the collector doesn't break anything in Bareos, it's our other modules that are affected. Our situation is like this:

  • We use Prometheus node_exporter to get server metrics. To configure it, we need to run a Docker container on the server bareos director is on and we need to add some configuration files to the Prometheus server. We achieve that by exporting a file resource (@@file {'...), which we tag with tag => 'prometheus'
  • On the same server, we add ::bareos::profile::director class.
  • Since File <| |> resource collector in bareos::director doesn't filter the collected files by anything, it tries to create the Prometheus config files which were exported (and were supposed to be created on a completely different server). That obviously fails, because there is no directory structure for those configs on the machine used for bareos director.

@project0 project0 mentioned this issue May 4, 2019
@project0
Copy link
Collaborator

project0 commented May 4, 2019

should be fixed with #35

@project0 project0 closed this as completed May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants