shared-db-relation-changed fails with no install recommends

Bug #1255503 reported by Liam Young
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nova-cloud-controller (Juju Charms Collection)
Fix Released
Undecided
Unassigned

Bug Description

shared-db-relation-changed fails when apt no install recommends is set

It looks like python-mysqldb is missing:

$ dpkg -l | grep mysql
$

Error from /var/log/juju/unit-nova-cloud-controller-0.log:

2013-11-27 11:21:40 INFO juju juju-log.go:66 nova-cloud-controller/0 shared-db:23: Migrating the nova database.
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 CRITICAL nova [-] No module named MySQLdb
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova Traceback (most recent call last):
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/bin/nova-manage", line 10, in <module>
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova sys.exit(main())
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/cmd/manage.py", line 1377, in main
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova ret = fn(*fn_args, **fn_kwargs)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/cmd/manage.py", line 885, in sync
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova return migration.db_sync(version)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/db/migration.py", line 33, in db_sync
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova return IMPL.db_sync(version=version)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/migration.py", line 72, in db_sync
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova current_version = db_version()
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/migration.py", line 84, in db_version
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova return versioning_api.db_version(get_engine(), repository)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/openstack/common/db/sqlalchemy/session.py", line 561, in get_engine
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova sqlite_fk=sqlite_fk)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/openstack/common/db/sqlalchemy/session.py", line 658, in create_engine
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova engine = sqlalchemy.create_engine(sql_connection, **engine_args)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", line 332, in create_engine
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova return strategy.create(*args, **kwargs)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 64, in create
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova dbapi = dialect_cls.dbapi(**dbapi_args)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/connectors/mysqldb.py", line 57, in dbapi
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova return __import__('MySQLdb')
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova ImportError: No module named MySQLdb
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK 2013-11-27 11:21:40.614 10468 TRACE nova
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK Traceback (most recent call last):
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 444, in <module>
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK main()
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 438, in main
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK hooks.execute(sys.argv)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/charmhelpers/core/hookenv.py", line 375, in execute
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK self._hooks[hook_name]()
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/charmhelpers/core/host.py", line 217, in wrapped_f
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK f(*args)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 151, in db_changed
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK migrate_database()
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/nova_cc_utils.py", line 310, in migrate_database
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK subprocess.check_output(cmd)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK raise CalledProcessError(retcode, cmd, output=output)
2013-11-27 11:21:40 INFO juju.worker.uniter context.go:255 HOOK subprocess.CalledProcessError: Command '['nova-manage', 'db', 'sync']' returned non-zero exit status 1
2013-11-27 11:21:40 ERROR juju.worker.uniter uniter.go:350 hook failed: exit status 1

Changed in nova-cloud-controller (Juju Charms Collection):
status: New → Fix Committed
James Page (james-page)
Changed in nova-cloud-controller (Juju Charms Collection):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.