[chef] Re: Re: mysql-server fails on first restart within install


Chronological Thread 
  • From: Matthew Todd < >
  • To:
  • Subject: [chef] Re: Re: mysql-server fails on first restart within install
  • Date: Sat, 8 Aug 2009 12:25:29 +0300
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=Z6I4Z9Fc2MlC43AXzDMSEil8DbHfwy6wUEefoVDlfHfBJr3axtfFZBW1ApoW7ZRHYR CXIAjx5MyEwTQeV16TB+QBWhmLlnTTJVdMcpT2wRy1kyV1KBBPaTBJAefPdrm1PZ0i3v 24DTJBxC+lowGvQPQTAMcazuuUWQ1dylLUCV0=

Thanks again for your help, Bryan --

On Aug 7, 2009, at 8:26 PM, Bryan McLellan wrote:

My first thought is the /etc/mysql/debian.cnf file that contains a
username/password that debian uses in it's init scripts. I'd look at
that and try to connect with that user,  then chec to see if there are
values for this in your debconf database, compare to the preseed
values.

Yup, once the restart fails on install, I can /etc/init.d/mysql start, then mysql -u debian-sys-maint -p<the password from /etc/mysql/ debian.cnf> just fine.

also, try 'dpkg -P --force-depends mysql-common' before the chef run.

Yes, I've been rolling back to a clean VMware snapshot each time.


But!

I may have had a breakthrough:

Continuing with the resource limits theory, I've been poking around with chpst in the shell.

Running the following command, which has the same chpst memory limit as the chef-client runit service, MySQL server FAILS to create the initial InnoDB tables:

chpst -m 262144000 sh -c '/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -q -y install mysql-server'

If I remove the "-m 262144000", however, it SUCCEEDS.

Strangely, though, doubling the memory limit to 524288000 (512M), 1048576000 (1G), and 2097152000 (2G) doesn't help: MySQL server still FAILS to restart.

(And when I use "chpst -d ..." rather than "-m" (just limiting the data segment), it SUCCEEDS.)


So, for now, I've draconically removed the chpst -m memory limit from chef-client's runit script -- and mysql-server installs just fine. Long-term, though, I feel a little uneasy, since I'm sure that limit was there for a reason.


Could someone out there confirm that the initial chpst command, above, also fails for you?

And would anyone be able to provide more chpst insight, either a more elegant solution than wholesale removing the -m, or a theory as to why 2G of memory weren't enough for MySQL to create a database?


Cheers!  -- Matthew



Archive powered by MHonArc 2.6.16.

§