mysql_database resource does not create database ... and chef-client -ldebug not showing any log output from database cookbook

Hi Chefs,

I am trying to debug a seemingly normal and correct call to create a new
database and db user:

mysql_database “install reviewdb” do
connection mysql_info
database_name db_name
action :create
end

mysql_database_user db_username do
connection mysql_info
password db_password
database_name db_name
host db_address
action [:create, :grant]
end

I’ve validated all of the mysql_info credentials are correct, but this
code never seems to get run. Or at least, I can see no record of it
running. The database and the user never get created, and when I run
chef-client -ldebug, I see no log output at all from the database cookbook.

Can someone tell me if I’m doing something wrong or how I can see what
the database cookbook LWRPs are actually doing in the chef-client log
output?

Thanks much!
-jay

Can you paste the output of the run (with debugging turned on) somewhere?

  • Julian

On Thu, Jun 13, 2013 at 12:04 AM, Jay Pipes jaypipes@gmail.com wrote:

Hi Chefs,

I am trying to debug a seemingly normal and correct call to create a new
database and db user:

mysql_database "install reviewdb" do
connection mysql_info
database_name db_name
action :create
end

mysql_database_user db_username do
connection mysql_info
password db_password
database_name db_name
host db_address
action [:create, :grant]
end

I've validated all of the mysql_info credentials are correct, but this
code never seems to get run. Or at least, I can see no record of it
running. The database and the user never get created, and when I run
chef-client -ldebug, I see no log output at all from the database cookbook.

Can someone tell me if I'm doing something wrong or how I can see what the
database cookbook LWRPs are actually doing in the chef-client log output?

Thanks much!
-jay

--
[ Julian C. Dunn jdunn@aquezada.com * Sorry, I'm ]
[ WWW: Julian Dunn's Blog - Commentary on media, technology, and everything in between. * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]

Using mysql 3.0.2 and database 1.4.0 I’m able to use those commands with the following recipe:

recipe[testing::mysql_testing] is the only thing in my run list, the table is created and I’m able to connect as the created user.

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscodehttp://opscode.com
512.731.2218 :: matt@opscode.com
mattray :: GitHubhttp://github.com/mattray/ :: IRC :: Twitterhttp://twitter.com/mattray


From: Julian C. Dunn
Sent: Thursday, June 13, 2013 12:32 PM
To: chef@lists.opscode.com
Subject: [chef] Re: mysql_database resource does not create database … and chef-client -ldebug not showing any log output from database cookbook

Can you paste the output of the run (with debugging turned on) somewhere?

  • Julian

On Thu, Jun 13, 2013 at 12:04 AM, Jay Pipes <jaypipes@gmail.commailto:jaypipes@gmail.com> wrote:
Hi Chefs,

I am trying to debug a seemingly normal and correct call to create a new database and db user:

mysql_database “install reviewdb” do
connection mysql_info
database_name db_name
action :create
end

mysql_database_user db_username do
connection mysql_info
password db_password
database_name db_name
host db_address
action [:create, :grant]
end

I’ve validated all of the mysql_info credentials are correct, but this code never seems to get run. Or at least, I can see no record of it running. The database and the user never get created, and when I run chef-client -ldebug, I see no log output at all from the database cookbook.

Can someone tell me if I’m doing something wrong or how I can see what the database cookbook LWRPs are actually doing in the chef-client log output?

Thanks much!
-jay


[ Julian C. Dunn <jdunn@aquezada.commailto:jdunn@aquezada.com> * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/http://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]