yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07302
[Bug 1192327] Re: mysqld not being started in stable/grizzly
** Changed in: anvil
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to anvil.
https://bugs.launchpad.net/bugs/1192327
Title:
mysqld not being started in stable/grizzly
Status in ANVIL for forging OpenStack.:
Fix Released
Bug description:
Using anvil, stable/grizzly branch.
When I run 'sudo ./smithy -a install --no-prompt-passwords -v', I get
an error. Turns out mysqld was never started. The fix (from Josh) was
to modify anvil/component/db.py as follows:
[rloo@csp0091 components]$ diff db.py.orig db.py
137c137
< class DBRuntime(bruntime.ProgramRuntime):
---
> class DBRuntime(bruntime.ServiceRuntime):
DEBUG: @anvil.shell : Applying chmod: '/etc/my.cnf' to 644
INFO: @anvil.components.db : Attempting to set your db password just incase it wasn't set previously.
INFO: @anvil.components.db : Ensuring your database is started before we operate on it.
DEBUG: @anvil.shell : Running cmd: ['mysql', '--user=root', '--password=', '-e', "USE mysql; UPDATE user SET password=PASSWORD('0d999e26efabdfb097aa') WHERE User='root'; FLUSH PRIVILEGES;"]
WARNING: @anvil.components.db : Couldn't set your db password. It might have already been set by a previous process.
INFO: @anvil.components.helpers.db : Ensuring the database is started.
INFO: @anvil.components.helpers.db : Giving user root full control of all databases.
DEBUG: @anvil.shell : Running cmd: ['mysql', '--user=root', '--password=0d999e26efabdfb097aa', '-e', "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '0d999e26efabdfb097aa'; FLUSH PRIVILEGES;"]
_______________
/ She turned me \
\ into a newt! /
---------------
\ || ||
\ __ ||-----mm||
\ ( )/_________)//
(oo)/
v--v
Traceback (most recent call last):
File "/home/rloo/anvil/anvil/__main__.py", line 217, in main
run(args)
File "/home/rloo/anvil/anvil/__main__.py", line 121, in run
runner.run(persona_obj)
File "/home/rloo/anvil/anvil/actions/base.py", line 341, in run
self._run(persona, component_order, instances)
File "/home/rloo/anvil/anvil/actions/install.py", line 132, in _run
*removals
File "/home/rloo/anvil/anvil/actions/base.py", line 323, in _run_phase
result = functors.run(instance)
File "/home/rloo/anvil/anvil/actions/install.py", line 126, in <lambda>
run=lambda i: i.post_install(),
File "/home/rloo/anvil/anvil/components/db.py", line 134, in post_install
**dbhelper.get_shared_passwords(self))
File "/home/rloo/anvil/anvil/components/helpers/db.py", line 93, in grant_permissions
utils.execute_template(*cmds, params=params)
File "/home/rloo/anvil/anvil/utils.py", line 293, in execute_template
**kargs)
File "/home/rloo/anvil/anvil/shell.py", line 164, in execute
stderr=stderr, cmd=str_cmd)
ProcessExecutionError: Unexpected error while running command.
Command: mysql '--user=root' '--password=0d999e26efabdfb097aa' '-e' 'GRANT ALL PRIVILEGES ON *.* TO '\''root'\''@'\''%'\'' IDENTIFIED BY '\''0d999e26efabdfb097aa'\''; FLUSH PRIVILEGES;'
Exit code: 1
Stdout: ''
Stderr: "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)\n"
To manage notifications about this bug go to:
https://bugs.launchpad.net/anvil/+bug/1192327/+subscriptions