fatmcgav / fatmcgav-glassfish

Rewritten Glassfish module to improve functionality and support.
http://github.com/fatmcgav/fatmcgav-glassfish
GNU General Public License v3.0
6 stars 31 forks source link

Jdbcconnectionpool provider fail for subsequent puppet run #31

Closed slamont closed 9 years ago

slamont commented 9 years ago

When a first puppet run is done and have configured a jdbcconnectionpool, the second puppet run will fail saying that the jdbcconnectionpool already exist.

First puppet run:

==> asci-sa-test.localdomain: Notice: /Stage[main]/Serverappliance::Glassfish::Config/Notify[Configure Glassfish]/message: defined 'message' as 'Configure Glassfish'
==> asci-sa-test.localdomain: Debug: /Stage[main]/Serverappliance::Glassfish::Config/Notify[Configure Glassfish]: The container Class[Serverappliance::Glassfish::Config] will propagate my refresh event
==> asci-sa-test.localdomain: Debug: asadmin command = asadmin --port 4848 --user asci list-jdbc-connection-pools
==> asci-sa-test.localdomain: Debug: exec command = su - glassfish -c "asadmin --port 4848 --user asci list-jdbc-connection-pools"
==> asci-sa-test.localdomain: Debug: result =
==> asci-sa-test.localdomain: ["__TimerPool", "DerbyPool", "Command list-jdbc-connection-pools executed successfully."]
==> asci-sa-test.localdomain: Debug: asadmin command = asadmin --port 4848 --user asci create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype javax.sql.DataSource --property 'user=root:password=admin11780:url=jdbc\:mysql\://localhost\:3306/recording:createDatabaseIfNotExist=true' RecordingPool
==> asci-sa-test.localdomain: Debug: exec command = su - glassfish -c "asadmin --port 4848 --user asci create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype javax.sql.DataSource --property 'user=root:password=admin11780:url=jdbc\:mysql\://localhost\:3306/recording:createDatabaseIfNotExist=true' RecordingPool"
==> asci-sa-test.localdomain: Debug: result =
==> asci-sa-test.localdomain: ["JDBC connection pool RecordingPool created successfully.", "Command create-jdbc-connection-pool executed successfully."]
==> asci-sa-test.localdomain: Notice: /Stage[main]/Serverappliance::Glassfish::Connectionpool/Jdbcconnectionpool[RecordingPool]/ensure: created

Second Puppet run:

remote failure: A resource named RecordingPool already exists.
Error: Command create-jdbc-connection-pool failed.

Error: /Stage[main]/Profiles::Webcontainer::Glassfish/Jdbcconnectionpool[RecordingPool]/ensure: change from absent to present failed: Command create-jdbc-connection-pool failed.

Debug: asadmin command = asadmin --port 4848 --user asci list-jdbc-connection-pools
Debug: exec command = su - glassfish -c "asadmin --port 4848 --user asci list-jdbc-connection-pools"
Debug: result =
["__TimerPool", "DerbyPool", "RecordingPool", "Command list-jdbc-connection-pools executed successfully."]
Debug: asadmin command = asadmin --port 4848 --user asci create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype javax.sql.DataSource --property 'user=root:password=admin11780:url=jdbc\:mysql\://localhost\:3306/recording:createDatabaseIfNotExist=true' RecordingPool
Debug: exec command = su - glassfish -c "asadmin --port 4848 --user asci create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype javax.sql.DataSource --property 'user=root:password=admin11780:url=jdbc\:mysql\://localhost\:3306/recording:createDatabaseIfNotExist=true' RecordingPool"

It seems that the execution of "asadmin --port 4848 --user asci list-jdbc-connection-pools" returned correctly the pool that was created in the first run, but it still try to create it.

I'm running un Ubuntu 14.04, if you need anything else let me know.

fatmcgav commented 9 years ago

Hey, cheers for reporting...

Are you using forge release, or from GH?

Will take a look tomorrow and let you know what I find..

Cheers Gav

fatmcgav commented 9 years ago

Ah, looks like I fixed it in https://github.com/fatmcgav/fatmcgav-glassfish/commit/b39403471fd600a0758c0c3509eeecf5bfcc5d5d Can you try using the develop branch from Git?

Cheers Gav

slamont commented 9 years ago

I am using the forge release. Will try with the latest code tomorrow and comment back :-)

slamont commented 9 years ago

I've tried with bd85e2f485b85c75620c78f27ad8147bdff8445f (latest master) and I got the same error

slamont commented 9 years ago

Ok I've just see that you have a Develop branch ! Sorry I was slow to realize thats what you were saying. I'll try with the tip of this branch.

fatmcgav commented 9 years ago

Yeh, give develop a spin and see if that works :)

slamont commented 9 years ago

I've tried develop and it worked perfectly ! Thank You ! Do you think about reintegrating develop in master and release to the forge soon ?

fatmcgav commented 9 years ago

Yeh, I'm planning on getting a new release out soon.. Keep an eye on the forge/twitter... :-) On 1 Aug 2014 18:57, "slamont" notifications@github.com wrote:

I've tried develop and it worked perfectly ! Thank You ! Do you think about reintegrating develop in master and release to the forge soon ?

— Reply to this email directly or view it on GitHub https://github.com/fatmcgav/fatmcgav-glassfish/issues/31#issuecomment-50915062 .

fatmcgav commented 9 years ago

@slamont Have just pushed v0.3.0 to the forge.