MySQL cookbook fails on Ubuntu Lucid 10.04


#1

The mysql::server recipe doesn’t work on 10.04. I cloned from the
cookbook repository and encountered errors.

WARN: Missing gem ‘mysql’
INFO: Installing gem_package[mysql] version 2.8.1 ruby x86-mingw32
x86-mswin32
/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/mixin/command.rb:181:in
`handle_command_failures’: gem install mysql -q --no-rdoc --no-ri -v
"2.8.1 ruby x86-mingw32 x86-mswin32" returned 1, expected 0
(Chef::Exceptions::Exec)

$ sudo gem install mysql -q --no-rdoc --no-ri -v "2.8.1 ruby x86-mingw32
x86-mswin32"
ERROR: While executing gem … (ArgumentError)
Illformed requirement [“2.8.1 ruby x86-mingw32 x86-mswin32”]

Manually installing the mysql gem uncovers another error.
$ sudo gem install mysql

INFO: Backing up template[/etc/mysql/grants.sql] to
/etc/mysql/grants.sql.chef-20100515233421
[Sat, 15 May 2010 23:34:21 -0600] ERROR: ruby_block[save node data]
(/home/vbox/share_vbox/chef-solo/cookbooks/mysql/recipes/server.rb line
88) had an error:
undefined method closed?' for nil:NilClass /usr/local/lib/ruby/1.8/net/http.rb:1060:inrequest’
/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/rest/rest_request.rb:58:in
`call’

Is the MySQL cookbook working on 10.04 for anyone?


#2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is actually an issue with RubyGems 1.3.7. They changed the output
formatting of gem list, which Chef uses to determine what Gem versions
are available from the remote server to install.

I have tested that the mysql cookbook works on Ubuntu 10.04 with:

    • Ruby and Ruby1.8 from Ubuntu packages
    • RubygGems:
    • 1.3.6 installed from source
    • 1.3.5 installed from package
    • Chef 0.8.16 installed from RubyGems or Packages

On May 16, 2010, at 12:13 AM, consiliens wrote:

The mysql::server recipe doesn’t work on 10.04. I cloned from the
cookbook repository and encountered errors.

WARN: Missing gem ‘mysql’
INFO: Installing gem_package[mysql] version 2.8.1 ruby x86-mingw32
x86-mswin32
/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/mixin/
command.rb:181:in `handle_command_failures’: gem install mysql -q –
no-rdoc --no-ri -v “2.8.1 ruby x86-mingw32 x86-mswin32” returned 1,
expected 0 (Chef::Exceptions::Exec)

$ sudo gem install mysql -q --no-rdoc --no-ri -v "2.8.1 ruby x86-
mingw32 x86-mswin32"
ERROR: While executing gem … (ArgumentError)
Illformed requirement [“2.8.1 ruby x86-mingw32 x86-mswin32”]

Manually installing the mysql gem uncovers another error.
$ sudo gem install mysql

INFO: Backing up template[/etc/mysql/grants.sql] to /etc/mysql/
grants.sql.chef-20100515233421
[Sat, 15 May 2010 23:34:21 -0600] ERROR: ruby_block[save node data]
(/home/vbox/share_vbox/chef-solo/cookbooks/mysql/recipes/server.rb
line 88) had an error:
undefined method closed?' for nil:NilClass /usr/local/lib/ruby/1.8/net/http.rb:1060:inrequest’
/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/rest/
rest_request.rb:58:in `call’

Is the MySQL cookbook working on 10.04 for anyone?


Opscode, Inc
Joshua Timberman, Senior Solutions Engineer
C: 720.334.RUBY E: joshua@opscode.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkvvki4ACgkQO97WSdVpzT0MlwCeOKsCFhKdkMtXqD48biPZsb+t
dJwAmgLWHn35F9BIlTIGJ+GZTgXKNylM
=gYYF
-----END PGP SIGNATURE-----


#3

Is there a ticket tracking this issue? I found CHEF-1168 but it’s
marked as fixed in Chef 0.8.12.
http://tickets.opscode.com/browse/CHEF-1168

Thanks.

On 05/16/2010 12:35 AM, Joshua Timberman wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is actually an issue with RubyGems 1.3.7. They changed the output
formatting of gem list, which Chef uses to determine what Gem versions
are available from the remote server to install.

I have tested that the mysql cookbook works on Ubuntu 10.04 with:

    • Ruby and Ruby1.8 from Ubuntu packages
    • RubygGems:
  • 1.3.6 installed from source
  • 1.3.5 installed from package
    • Chef 0.8.16 installed from RubyGems or Packages

On May 16, 2010, at 12:13 AM, consiliens wrote:

The mysql::server recipe doesn’t work on 10.04. I cloned from the
cookbook repository and encountered errors.

WARN: Missing gem ‘mysql’
INFO: Installing gem_package[mysql] version 2.8.1 ruby x86-mingw32
x86-mswin32
/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/mixin/command.rb:181:in
`handle_command_failures’: gem install mysql -q --no-rdoc --no-ri -v
"2.8.1 ruby x86-mingw32 x86-mswin32" returned 1, expected 0
(Chef::Exceptions::Exec)

$ sudo gem install mysql -q --no-rdoc --no-ri -v "2.8.1 ruby
x86-mingw32 x86-mswin32"
ERROR: While executing gem … (ArgumentError)
Illformed requirement [“2.8.1 ruby x86-mingw32 x86-mswin32”]

Manually installing the mysql gem uncovers another error.
$ sudo gem install mysql

INFO: Backing up template[/etc/mysql/grants.sql] to
/etc/mysql/grants.sql.chef-20100515233421
[Sat, 15 May 2010 23:34:21 -0600] ERROR: ruby_block[save node data]
(/home/vbox/share_vbox/chef-solo/cookbooks/mysql/recipes/server.rb
line 88) had an error:
undefined method closed?' for nil:NilClass /usr/local/lib/ruby/1.8/net/http.rb:1060:inrequest’
/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/rest/rest_request.rb:58:in
`call’

Is the MySQL cookbook working on 10.04 for anyone?


Opscode, Inc
Joshua Timberman, Senior Solutions Engineer
C: 720.334.RUBY E: joshua@opscode.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkvvki4ACgkQO97WSdVpzT0MlwCeOKsCFhKdkMtXqD48biPZsb+t
dJwAmgLWHn35F9BIlTIGJ+GZTgXKNylM
=gYYF
-----END PGP SIGNATURE-----


#4

Hi there,
I reopened CHEF-1168. The problem is that MySQL has different versions
available for different architectures:

mysql (2.8.1 ruby x86-mingw32 x86-mswin32, 2.7.3 mswin32)

The gems I looked at when originally solving this issue only have one
version for all architectures, for example:

nokogiri (1.4.1 ruby java x86-mingw32 x86-mswin32)

We’ll have to redo the fix to take the multiple version by
architecture case into account.

Dan DeLeo

On Sun, May 16, 2010 at 7:38 AM, consiliens consiliens@gmail.com wrote:

Is there a ticket tracking this issue? I found CHEF-1168 but it’s marked as
fixed in Chef 0.8.12.
http://tickets.opscode.com/browse/CHEF-1168

Thanks.

On 05/16/2010 12:35 AM, Joshua Timberman wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is actually an issue with RubyGems 1.3.7. They changed the output
formatting of gem list, which Chef uses to determine what Gem versions
are available from the remote server to install.

I have tested that the mysql cookbook works on Ubuntu 10.04 with:

    • Ruby and Ruby1.8 from Ubuntu packages
    • RubygGems:
  • 1.3.6 installed from source
  • 1.3.5 installed from package
    • Chef 0.8.16 installed from RubyGems or Packages

On May 16, 2010, at 12:13 AM, consiliens wrote:

The mysql::server recipe doesn’t work on 10.04. I cloned from the
cookbook repository and encountered errors.

WARN: Missing gem 'mysql’
INFO: Installing gem_package[mysql] version 2.8.1 ruby x86-mingw32
x86-mswin32

/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/mixin/command.rb:181:in
`handle_command_failures’: gem install mysql -q --no-rdoc --no-ri -v
"2.8.1 ruby x86-mingw32 x86-mswin32" returned 1, expected 0
(Chef::Exceptions::Exec)

$ sudo gem install mysql -q --no-rdoc --no-ri -v "2.8.1 ruby
x86-mingw32 x86-mswin32"
ERROR: While executing gem … (ArgumentError)
Illformed requirement [“2.8.1 ruby x86-mingw32 x86-mswin32”]

Manually installing the mysql gem uncovers another error.
$ sudo gem install mysql

INFO: Backing up template[/etc/mysql/grants.sql] to
/etc/mysql/grants.sql.chef-20100515233421
[Sat, 15 May 2010 23:34:21 -0600] ERROR: ruby_block[save node data]
(/home/vbox/share_vbox/chef-solo/cookbooks/mysql/recipes/server.rb
line 88) had an error:
undefined method closed?' for nil:NilClass /usr/local/lib/ruby/1.8/net/http.rb:1060:inrequest’

/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/rest/rest_request.rb:58:in
`call’

Is the MySQL cookbook working on 10.04 for anyone?


Opscode, Inc
Joshua Timberman, Senior Solutions Engineer
C: 720.334.RUBY E: joshua@opscode.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkvvki4ACgkQO97WSdVpzT0MlwCeOKsCFhKdkMtXqD48biPZsb+t
dJwAmgLWHn35F9BIlTIGJ+GZTgXKNylM
=gYYF
-----END PGP SIGNATURE-----


#5

I could have sworn I reported a bug for this last August, but
apparently all I did was post to the mailing list.
http://lists.opscode.com/sympa/arc/chef/2009-08/msg00084.html

On Sun, May 16, 2010 at 10:47 AM, Daniel DeLeo dan@kallistec.com wrote:

Hi there,
I reopened CHEF-1168. The problem is that MySQL has different versions
available for different architectures:

mysql (2.8.1 ruby x86-mingw32 x86-mswin32, 2.7.3 mswin32)

The gems I looked at when originally solving this issue only have one
version for all architectures, for example:

nokogiri (1.4.1 ruby java x86-mingw32 x86-mswin32)

We’ll have to redo the fix to take the multiple version by
architecture case into account.

Dan DeLeo

On Sun, May 16, 2010 at 7:38 AM, consiliens consiliens@gmail.com wrote:

Is there a ticket tracking this issue? I found CHEF-1168 but it’s marked as
fixed in Chef 0.8.12.
http://tickets.opscode.com/browse/CHEF-1168

Thanks.

On 05/16/2010 12:35 AM, Joshua Timberman wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is actually an issue with RubyGems 1.3.7. They changed the output
formatting of gem list, which Chef uses to determine what Gem versions
are available from the remote server to install.

I have tested that the mysql cookbook works on Ubuntu 10.04 with:

    • Ruby and Ruby1.8 from Ubuntu packages
    • RubygGems:
  • 1.3.6 installed from source
  • 1.3.5 installed from package
    • Chef 0.8.16 installed from RubyGems or Packages

On May 16, 2010, at 12:13 AM, consiliens wrote:

The mysql::server recipe doesn’t work on 10.04. I cloned from the
cookbook repository and encountered errors.

WARN: Missing gem 'mysql’
INFO: Installing gem_package[mysql] version 2.8.1 ruby x86-mingw32
x86-mswin32

/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/mixin/command.rb:181:in
`handle_command_failures’: gem install mysql -q --no-rdoc --no-ri -v
"2.8.1 ruby x86-mingw32 x86-mswin32" returned 1, expected 0
(Chef::Exceptions::Exec)

$ sudo gem install mysql -q --no-rdoc --no-ri -v "2.8.1 ruby
x86-mingw32 x86-mswin32"
ERROR: While executing gem … (ArgumentError)
Illformed requirement [“2.8.1 ruby x86-mingw32 x86-mswin32”]

Manually installing the mysql gem uncovers another error.
$ sudo gem install mysql

INFO: Backing up template[/etc/mysql/grants.sql] to
/etc/mysql/grants.sql.chef-20100515233421
[Sat, 15 May 2010 23:34:21 -0600] ERROR: ruby_block[save node data]
(/home/vbox/share_vbox/chef-solo/cookbooks/mysql/recipes/server.rb
line 88) had an error:
undefined method closed?' for nil:NilClass /usr/local/lib/ruby/1.8/net/http.rb:1060:inrequest’

/usr/local/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/…/lib/chef/rest/rest_request.rb:58:in
`call’

Is the MySQL cookbook working on 10.04 for anyone?


Opscode, Inc
Joshua Timberman, Senior Solutions Engineer
C: 720.334.RUBY E: joshua@opscode.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkvvki4ACgkQO97WSdVpzT0MlwCeOKsCFhKdkMtXqD48biPZsb+t
dJwAmgLWHn35F9BIlTIGJ+GZTgXKNylM
=gYYF
-----END PGP SIGNATURE-----


Joe Van Dyk
http://fixieconsulting.com