Warbler 0.9.11 Accesses DB?

One of our build environments failed when I upgraded Warbler to 0.9.11.

When it the task initializes, its apparently trying to access the
database (it doesn’t have access):

/usr/bin/ruby18 -S warble war:clean
(in /var/lib/hudson/homedir/jobs/TriSano-UAT/workspace/trisano/webapp)
running warble clean
rake aborted!
/usr/lib64/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:55:in
initialize': FATAL C28000 Mno pg_hba.conf entry for host "222.444.167.203", user "trisano_x", database "trisano_xyz", SSL off Fauth.c L414 RClientAuthentication /usr/lib64/ruby/gems/1.8/gems/warbler-0.9.11/lib/warbler/task.rb:37:in initialize’
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/bin/ruby18 -S warble war:clean…]

I recreated this locally and show that it doesn’t happen in 0.9.9.

Is their a switch I can turn off to prevent this?

I took a look at the difference between 0.9.11 and 0.9.9 init code and
saw no obvious difference.

Background: for our distribution we ship a .tar.gz that has everything
in it. The deployer edits a config.yml that includes all config
attributes. From that we generate the database.yml and put it in the
right spot. It appears that Warbler is loading the config which is
attempting to connect to the database. Here is the rake file in question
if it matters:
https://trisano.csinitiative.net/source/browse/trisano/top-level/trunk/trisano/webapp/lib/tasks/distro.rake?view=markup

Mike

mike@mike-laptop:~/trisano-dist/10-27-2008-0853PM/distro$
./package_app.sh --trace
(in /home/mike/trisano-dist/10-27-2008-0853PM/distro)
creating database.yml based on contents of config.yml in
…/webapp/config/
creating .war deployment archive
/home/mike/opt/jruby-1.1.3/bin/jruby -S rake trisano:deploy:buildwar
RAILS_ENV=production basicauth=false min_runtimes=5 max_runtimes=10
(in /home/mike/trisano-dist/10-27-2008-0853PM/webapp)
/home/mike/opt/jruby-1.1.3/bin/jruby -S warble war:clean
running warble clean
rake aborted!
initialize: name or service not known
/home/mike/opt/jruby-1.1.3/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:138:in
`new’
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/home/mike/opt/jruby-1.1.3/bin/jruby -S
wa…]

(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/home/mike/opt/jruby-1.1.3/bin/jruby -S
ra…]

(See full trace by running task with --trace)
mike@mike-laptop:~/trisano-dist/10-27-2008-0853PM/distro$ jruby -S gem
list

*** LOCAL GEMS ***

actionmailer (2.0.2)
actionpack (2.0.2)
activerecord (2.0.2)
activerecord-jdbc-adapter (0.8.2)
activerecord-jdbcpostgresql-adapter (0.8.2)
activeresource (2.0.2)
activesupport (2.0.2)
builder (2.1.2)
ci_reporter (1.5.1)
flexmock (0.8.3)
hoe (1.7.0)
hpricot (0.6.161, 0.6)
jdbc-postgres (8.2)
jruby-openssl (0.2.3)
json-jruby (1.1.2)
lockfile (1.4.3)
logging (0.9.4)
mechanize (0.7.6)
postgres-pr (0.4.0)
rails (2.0.2)
rake (0.8.1)
rest-open-uri (1.0.0)
rspec (1.1.4)
rubyforge (1.0.0)
rubyzip (0.9.1)
sources (0.0.1)
warbler (0.9.11, 0.9.9)
mike@mike-laptop:~/trisano-dist/10-27-2008-0853PM/distro$ jruby -S gem
uninstall warbler

Select gem to uninstall:

  1. warbler-0.9.9
  2. warbler-0.9.11
  3. All versions

2
Successfully uninstalled warbler-0.9.11
mike@mike-laptop:~/trisano-dist/10-27-2008-0853PM/distro$
./package_app.sh --trace
(in /home/mike/trisano-dist/10-27-2008-0853PM/distro)
creating database.yml based on contents of config.yml in
…/webapp/config/
creating .war deployment archive
/home/mike/opt/jruby-1.1.3/bin/jruby -S rake trisano:deploy:buildwar
RAILS_ENV=production basicauth=false min_runtimes=5 max_runtimes=10
(in /home/mike/trisano-dist/10-27-2008-0853PM/webapp)
running warble clean
/home/mike/opt/jruby-1.1.3/bin/jruby -S warble war:clean
running warble war
/home/mike/opt/jruby-1.1.3/bin/jruby -S warble war
jar cf trisano.war -C tmp/war .
mike@mike-laptop:~/trisano-dist/10-27-2008-0853PM/distro$


Mike H.
Program Manager, Collaborative Software Initiative
[email protected]
M: +1 971.340.0302
O: +1 503.295.7970 Extension: 104
F: +1 503.295.7789
1 SW Columbia Street, Suite 640
Portland, Or 97258
http://www.csinitiative.com


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Oct 27, 2008 at 11:14 PM, Mike H. [email protected]
wrote:

One of our build environments failed when I upgraded Warbler to 0.9.11.

When it the task initializes, its apparently trying to access the database
(it doesn’t have access):

See this post to the list from a while back:

http://www.nabble.com/Re%3A-Why-does-Warbler-requires-a-db-to-build--p19504132.html

I’ll have a better, configurable workaround for the next release.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Somehow I missed that in my search - sorry Nick & thanks for the fix.

Mike

Nick S. wrote:

I’ll have a better, configurable workaround for the next release.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email