-
Notifications
You must be signed in to change notification settings - Fork 12
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
sometimes numbers need to be quoted and sometimes they do not, causes puppet to always run #30
Comments
If i comment out the convert_ints_to_strings then I end up with this: Notice: /Stage[main]/Jboss::Config::Datasources/Jboss::Config::Datasourceadd[ifw]/Jboss_admin::Resource::Data_source[/subsystem=datasources/data-source=ifwPOOL]/Jboss_resource[/subsystem=datasources/data-source=ifwPOOL]/options: options changed '{"blocking-timeout-wait-millis"=>50000, "use-try-lock"=>60000, "prepared-statements-cache-size"=>0, "min-pool-size"=>10, "query-timeout"=>0, "max-pool-size"=>75, "allocation-retry"=>0, "allocation-retry-wait-millis"=>5000}' to '{"blocking-timeout-wait-millis"=>"50000", "use-try-lock"=>"60000", "prepared-statements-cache-size"=>"0", "min-pool-size"=>"10", "query-timeout"=>"0", "allocation-retry"=>"0", "max-pool-size"=>"75", "allocation-retry-wait-millis"=>"5000"}' What this is telling me is that for some reason the idle-timeout-minutes "should" value should be a string, but is a number, and not sure why yet. |
This is just weird, going to do my best to try and describe what is going on. I have a hash that I use to call create_resource to create a custome datasource add type (which then calls the jboss_admin data_source type) with the information for defining a data source. I do not have problems if I pass:
But I do have problems if I pass:
In both cases the values of is_numeric, is_string, and is_integer are all the same:
As weird as this maybe, in either case the jboss_admin module i think should be handling these numeric oddities, and essentially if number just ignore whether or not it is quoted as a string or not. |
@cpitman i have fought with this one for a while and can't figure it out. I am guessing there is some function in newparam that can be overriden that will help here. for now my workaround is to make sure all my intiger values are wrapped in quotes. |
I've been solving this by using the bool2str function from puppet-stdlib. This at least let's me pass puppet-lint, as well as use the correct types for the passed in parameters.
|
Every time I run puppet it thinks my idle-timeout-minutes is changing:
Notice: /Stage[main]/Jboss::Config::Datasources/Jboss::Config::Datasourceadd[ifw]/Jboss_admin::Resource::Data_source[/subsystem=datasources/data-source=ifwPOOL]/Jboss_resource[/subsystem=datasources/data-source=ifwPOOL]/options: options changed '{"idle-timeout-minutes"=>"5"}' to '{"idle-timeout-minutes"=>5}'
I found the convert_ints_to_strings function in jboss_admin/lib/puppet/util/cli_execution.rb but have not yet figured out why it does not seem to be working in this case.
The text was updated successfully, but these errors were encountered: