Comments (10)
Try alphabetizing your keys.
from puppet-wildfly.
It makes no difference.
My ruby skills is very limited,but in wildfly/lib/puppet/type/wildfly_resource.rb there is a to_s method which would "" quote numbers.
Could this be why the state changes?
from puppet-wildfly.
Here is some debug info:
Debug: /Stage[main]/Profile::Wildfly/Wildfly::Datasources::Datasource[dupDS]/Wildfly::Util::Resource[/subsystem=datasources/data-source=dupDS]/Wildfly_resource[/subsystem=datasources/data-source=dupDS]/state: Should: {"connection-url"=>"jdbc:oracle:thin:@ks-oracle02:1521:PREPR", "min-pool-size"=>"1", "driver-name"=>"oracle", "password"=>"pwd", "max-pool-size"=>"10", "jndi-name"=>"java:/jdbc/dupDS", "user-name"=>"DUP"} Is: {"connection-url"=>"jdbc:oracle:thin:@ks-oracle02:1521:PREPR", "driver-name"=>"oracle", "jndi-name"=>"java:/jdbc/dupDS", "max-pool-size"=>10, "min-pool-size"=>1, "password"=>"pwd", "user-name"=>"DUP"}
I have currently "fixed" this by adding this, to the "insync?" method.
is.each do |k,v|
if ( v.is_a? Integer )
is[k]=v.to_s
end
end
from puppet-wildfly.
I have encountered the same problem, INT/LONG values in "should" are quoted but the "is" values are not, resulting in insync always returning false.
This is not a datasource only problem, it happens on any resource where you try to and enforce state that includes INT/LONG values using the wildfly_resource type.
from puppet-wildfly.
I'll investigate this tonight. Could you (@icetrain @lasse-kristensen) provide more information about your environment? (Ruby version, Puppet version, module version and etc)
from puppet-wildfly.
Hey
ruby --version: ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
puppet --version: 3.8.4
The module version is: 0.4.0
Running on: CentOS Linux release 7.1.1503 (Core)
from puppet-wildfly.
ruby --version: ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
puppet --version: 3.7.5
The module version is: 0.5.1
Running on: Red Hat Enterprise Linux Server release 7.1 (Maipo)
WildFly: 9.0.1
from puppet-wildfly.
Fact: Puppet custom types checks current state (Is) against desirable state (Should).
Wildfly HTTP API returns a JSON representation of a resource (Is) and if one its properties is a number, a number is returned.
User provides a Hash representation (Should) of a resource in any form, but generally a string representation.
If the user provided a string representation of a number property, this issue will happen.
e.g.
wildfly::datasources::datasource { 'DemoDS':
config => {
'driver-name' => 'postgresql',
'connection-url' => 'jdbc:postgresql://localhost/postgres',
'jndi-name' => 'java:jboss/datasources/DemoDS',
'user-name' => 'postgres',
'password' => 'postgres',
'min-pool-size' => "10",
'max-pool-size' => "30",
}
}
instead of:
wildfly::datasources::datasource { 'DemoDS':
config => {
'driver-name' => 'postgresql',
'connection-url' => 'jdbc:postgresql://localhost/postgres',
'jndi-name' => 'java:jboss/datasources/DemoDS',
'user-name' => 'postgres',
'password' => 'postgres',
'min-pool-size' => 10,
'max-pool-size' => 30,
}
}
I changed custom type to ignore types (convert everything to strings), but if you change number properties to number literals you'll might get the same outcome.
from puppet-wildfly.
Please re-open this issue. This 'fix' breaks recursive resources!!!
I will provide an alternative pull-request, that combines this issue with #108
from puppet-wildfly.
It's back, at least for booleans: state changed '{"value"=>"false"}' to '{"value"=>false}'
from puppet-wildfly.
Related Issues (20)
- Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir HOT 2
- JBOSS-EAP with **systemctl start jboss-eap** don't works from another machine just locally HOT 1
- where the log file is stored on Puppet Agent by this module HOT 1
- on SUSE Linux /etc/init.d/jboss-eap: line 13: /etc/init.d/functions: No such file or directory HOT 1
- wildfly_restart functionality issues
- how to install und build multiple standalone instances in the same machine
- Need a way to install module with multiple jar files as source HOT 1
- Transfer this module to voxpupuli HOT 22
- wildfly::jgroups::stack::tcpping fails with "No resource definition" HOT 1
- Update test environment for Ruby 3, Puppet 7, and related Gems HOT 1
- Add parameters to domain.conf variables PROCESS_CONTROLLER_JAVA_OPTS and HOST_CONTROLLER_JAVA_OPTS
- Replace MaxPermSize with MaxMetaspaceSize in domain.conf template HOT 1
- `wildfly::host::server_config` with `ensure => absent` in already absent server tries to stop it and fails with timeout
- Include support for CLI API for actions currently performed via HTTP API HOT 2
- Multiple calls to defined type wildfly::host::server_config cause "Duplicate resource" error HOT 3
- class wildfly::setup hardcodes subsystem when setting up remote user HOT 2
- Installer download fails because install_cache_dir doesn't exist
- Module configures service only as sysvinit, regardless of actual init system, when $version < 10 HOT 1
- Update Wildfly download URL for version >= 25
- Support for Wildfly 31.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-wildfly.