You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.
All of the above code is terrible and should be deleted.
This function takes an argument as args but that in handled in the second block below... What is this block doing then? It calls to_hash seemingly out of no where, and that takes the catalog's scope and turns it into a hash, supposedly to look for variables "at top scope" that come from some data source (like the old puppet enterprise console) but it has no safety and will pick up ANY variables in the namespace, including facts. This is a terrible design and seriously bad side-effects.
I mean, this function says "okay, I was called with args but before using that I'm just going to see if I can find anything else that could possibly have been passed to me but wasn't" and then tries to execute it.
Also, the raises in the begin just get captured by the rescue block that then raises again with the same message. Wat.
The function generate_clients does not use the parameter clients from manifests/director.pp. Somehow it uses the fact bacula_client_package from spec/classes/bacula_spec.rb.
I have no idea why the Rspec tests contain these facts, since the module does not provide any of them. Maybe it is time to ask @ccaum how this worked in the first place.
Even if I exclude backup_client_package at lib/puppet/parser/functions/generate_clients.rb and configure a hash of clients, there are several errors regarding db_backend at manifests/director.pp.
I think this module need to be rewritten completely.
quote from @hunner:
All of the above code is terrible and should be deleted.
This function takes an argument as args but that in handled in the second block below... What is this block doing then? It calls to_hash seemingly out of no where, and that takes the catalog's scope and turns it into a hash, supposedly to look for variables "at top scope" that come from some data source (like the old puppet enterprise console) but it has no safety and will pick up ANY variables in the namespace, including facts. This is a terrible design and seriously bad side-effects.
I mean, this function says "okay, I was called with args but before using that I'm just going to see if I can find anything else that could possibly have been passed to me but wasn't" and then tries to execute it.
Also, the raises in the begin just get captured by the rescue block that then raises again with the same message. Wat.
based on a discussion in voxpupuli/puppet-bacula#37 (comment)
The text was updated successfully, but these errors were encountered: