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

Allow some bacula::params::validate parameter values to be undef(ined) #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mjhennig
Copy link

Use undef as default value for bacula::params::validate parameters that are allowed to be (and even checked for being) undefined - rather than using an empty string (''), which seems to override any undefined parameters and thus causes validation to fail.

@rharrison10
Copy link
Owner

The main reason these were left as '' by default is the class that feeds the bacula::params::validate class already uses undef as the default. Basically the only way to actually have '' be the actual value to this class is only to call the class directly.

That said, you are right. If the calling class uses undef as the default its only reasonable that the child class use the same as a default. Give me a bit to look closer but I'm already inclined to accept this because, well, logical... :-)

@mjhennig
Copy link
Author

mjhennig commented Sep 3, 2014

Thank you! Note, however, that one may also consider leaving the empty string defaults but changing the conditional statements later on - as an alternative to this approach. Though I am not sure which way might be better.

@jyaworski
Copy link

I'm running into this now, with puppet 4.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, "" is not an absolute path. at /etc/puppet/environments/production/modules/bacula/manifests/params/validate.pp:183:5 on node puppet1

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 this pull request may close these issues.

3 participants