zkfan / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

tungsten-installer fails on Ubuntu 9.10 #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Tungsten installation fails on Ubuntu using Tungsten 2.0.4 (dev build).  It 
looks as if there may be a platform problem, e.g., bad compatibility with Ruby 
and/or the distribution. 

To reproduce, deploy the latest Tungsten nightly build onto a test host as 
described by Giuseppe's blog article 
(http://datacharmer.blogspot.com/2011/06/getting-started-with-tungsten.html).  

1.) Untar release in /opt/tungsten. 
2.) Issue tungsten-install command as shown below. 

$ tools/tungsten-installer  --master-slave  --master-host=logos1  
--datasource-user=tungsten  --datasource-password=secret  --service-name=dragon 
--home-directory=/opt/tungsten --cluster-hosts=logos1,logos2 --start 
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
sh: -a: not found
./ruby/lib/json/common.rb:266:in `pretty_generate': undefined method `generate' 
for #<JSON::Ext::Generator::State:0x7fa608093e30> (NoMethodError)
    from ./ruby/properties.rb:110:in `store'
    from ./ruby/properties.rb:101:in `open'
    from ./ruby/properties.rb:101:in `store'
    from ./ruby/configure/configure_deployment_handler.rb:40:in `prepare_config'
    from ./ruby/configure/configure_deployment_handler.rb:15:in `prepare'
    from ./ruby/configure/configure_deployment_handler.rb:12:in `each'
    from ./ruby/configure/configure_deployment_handler.rb:12:in `prepare'
    from ./ruby/configure/configure_deployment.rb:107:in `prepare'
    from ./ruby/configurator.rb:218:in `run'
    from ruby/configure.rb:51

The Linux distribution is Ubuntu with ruby 1.8.7: 

$ more /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"
$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]

Original issue reported on code.google.com by berkeley...@gmail.com on 18 Jun 2011 at 12:10

GoogleCodeExporter commented 9 years ago
It also fails on later versions of ubuntu.
The reason is due to the behavior of the "which" command: it returns a bare 
string on CentOS, while on Ubuntu it adds a newline.

Going to fix the code in
tungsten-replicator/builder/extra/tools/ruby/lib/ifconfig/linux/ifconfig.rb

Original comment by g.maxia on 19 Jun 2011 at 12:50

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r228.

Original comment by g.maxia on 19 Jun 2011 at 12:51

GoogleCodeExporter commented 9 years ago
The newline problem is fixed, but I am re-opening this bug as the Ruby stack 
trace problem is still occurring:  

$ tools/tungsten-installer  --master-slave  --master-host=logos1  
--datasource-user=tungsten  --datasource-password=secret  --service-name=dragon 
--home-directory=/opt/rhodges4 --cluster-hosts=logos1,logos2 --start 
./ruby/lib/json/common.rb:266:in `pretty_generate': undefined method `generate' 
for #<JSON::Ext::Generator::State:0x7f503e20fdb0> (NoMethodError)
    from ./ruby/properties.rb:110:in `store'
    from ./ruby/properties.rb:101:in `open'
    from ./ruby/properties.rb:101:in `store'
    from ./ruby/configure/configure_deployment_handler.rb:40:in `prepare_config'
    from ./ruby/configure/configure_deployment_handler.rb:15:in `prepare'
    from ./ruby/configure/configure_deployment_handler.rb:12:in `each'
    from ./ruby/configure/configure_deployment_handler.rb:12:in `prepare'
    from ./ruby/configure/configure_deployment.rb:107:in `prepare'
    from ./ruby/configurator.rb:218:in `run'
    from ruby/configure.rb:51

This seems to be a ruby version problem.  As noted above I am using ruby 1.8.7. 
 It seemed that my distro did not have JSON available, so I installed the Gem 
as follows: 

$ sudo apt-get install ruby1.8-dev
$ ruby gem install json

This installed JSON 1.5.3. However, this version still lacks the method 
required.  It is unclear from searching the net how to get a compatible 
version.  

NOTE:  It seems we are including some JSON library files directly in the 
release, which is perhaps not a good idea, as it exposes us to Ruby version 
incompatibilities.  

Original comment by berkeley...@gmail.com on 27 Jun 2011 at 3:28

GoogleCodeExporter commented 9 years ago
Two more notes: 

1.) The require path json/ext/1.8/parser does not exist in my ruby 
implementation.  The default ruby gem installation appears to be pure ruby 
only. 

2.) I raised this issue to Critical as it is blocking completion of parallel 
replication testing.  

Original comment by berkeley...@gmail.com on 27 Jun 2011 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by g.maxia on 27 Jun 2011 at 7:13

GoogleCodeExporter commented 9 years ago
On a clean Ubuntu box, installation does not fail.
However, if you install the JSON library for ruby, the installation fails :

sudo apt-get install libjson-ruby

Original comment by g.maxia on 27 Jun 2011 at 3:46

GoogleCodeExporter commented 9 years ago

Original comment by jeffm...@gmail.com on 27 Jun 2011 at 4:00