nova.sh doesn't install python-migrate

Bug #707607 reported by Kost
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Unassigned

Bug Description

kost@island106:~/openstack/nova/trunk$ bzr revno
611

kost@island106:~/openstack/nova$ sudo ./trunk/bin/nova-manage db sync
Traceback (most recent call last):
  File "./trunk/bin/nova-manage", line 675, in <module>
    main()
  File "./trunk/bin/nova-manage", line 667, in main
    fn(*argv)
  File "./trunk/bin/nova-manage", line 546, in sync
    return migration.db_sync(version)
  File "/home/kost/openstack/nova/trunk/nova/db/migration.py", line 33, in db_sync
    return IMPL.db_sync(version=version)
  File "/home/kost/openstack/nova/trunk/nova/utils.py", line 335, in __getattr__
    backend = self.__get_backend()
  File "/home/kost/openstack/nova/trunk/nova/utils.py", line 330, in __get_backend
    self.__backend = __import__(name, None, None, fromlist)
  File "/home/kost/openstack/nova/trunk/nova/db/sqlalchemy/migration.py", line 24, in <module>
    from migrate.versioning import api as versioning_api
ImportError: No module named migrate.versioning
kost@island106:~/openstack/nova$ vim nova.sh.trunk
kost@island106:~/openstack/nova$ sudo apt-get install python-migrate
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  python-decorator python-tempita
The following NEW packages will be installed:
  python-decorator python-migrate python-tempita
0 upgraded, 3 newly installed, 0 to remove and 22 not upgraded.
Need to get 345kB of archives.
After this operation, 1,884kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ppa.launchpad.net/nova-core/trunk/ubuntu/ lucid/main python-migrate 0.6-4~lucid1 [162kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid/universe python-decorator 3.1.2-1 [131kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ lucid/universe python-tempita 0.4-1 [52.0kB]
Fetched 345kB in 1s (270kB/s)
Selecting previously deselected package python-decorator.
(Reading database ... 93903 files and directories currently installed.)
Unpacking python-decorator (from .../python-decorator_3.1.2-1_all.deb) ...
Selecting previously deselected package python-tempita.
Unpacking python-tempita (from .../python-tempita_0.4-1_all.deb) ...
Selecting previously deselected package python-migrate.
Unpacking python-migrate (from .../python-migrate_0.6-4~lucid1_all.deb) ...
Processing triggers for man-db ...
Setting up python-decorator (3.1.2-1) ...

Setting up python-tempita (0.4-1) ...

Setting up python-migrate (0.6-4~lucid1) ...

Processing triggers for python-support ...
kost@island106:~/openstack/nova$ sudo ./trunk/bin/nova-manage db sync
2011-01-25 15:03:40,793 INFO migrate.versioning.api [-] 0 -> 1...
2011-01-25 15:03:41,238 INFO migrate.versioning.api [-] done
2011-01-25 15:03:41,238 INFO migrate.versioning.api [-] 1 -> 2...
2011-01-25 15:03:41,500 INFO migrate.versioning.api [-] done

---

bug fix submitted @
lp:~usc-isi/nova/kost-bugfix-migrate-nova.sh

Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 707607] [NEW] nova.sh doesn't install python-migrate
Download full text (6.6 KiB)

This is fixed in lp:~vishvananda/nova/friendly-db if it ever merges

Vish

On Jan 25, 2011, at 12:13 PM, Kost wrote:

> Public bug reported:
>
> kost@island106:~/openstack/nova/trunk$ bzr revno
> 611
>
> kost@island106:~/openstack/nova$ sudo ./trunk/bin/nova-manage db sync
> Traceback (most recent call last):
> File "./trunk/bin/nova-manage", line 675, in <module>
> main()
> File "./trunk/bin/nova-manage", line 667, in main
> fn(*argv)
> File "./trunk/bin/nova-manage", line 546, in sync
> return migration.db_sync(version)
> File "/home/kost/openstack/nova/trunk/nova/db/migration.py", line 33, in db_sync
> return IMPL.db_sync(version=version)
> File "/home/kost/openstack/nova/trunk/nova/utils.py", line 335, in __getattr__
> backend = self.__get_backend()
> File "/home/kost/openstack/nova/trunk/nova/utils.py", line 330, in __get_backend
> self.__backend = __import__(name, None, None, fromlist)
> File "/home/kost/openstack/nova/trunk/nova/db/sqlalchemy/migration.py", line 24, in <module>
> from migrate.versioning import api as versioning_api
> ImportError: No module named migrate.versioning
> kost@island106:~/openstack/nova$ vim nova.sh.trunk
> kost@island106:~/openstack/nova$ sudo apt-get install python-migrate
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following extra packages will be installed:
> python-decorator python-tempita
> The following NEW packages will be installed:
> python-decorator python-migrate python-tempita
> 0 upgraded, 3 newly installed, 0 to remove and 22 not upgraded.
> Need to get 345kB of archives.
> After this operation, 1,884kB of additional disk space will be used.
> Do you want to continue [Y/n]? y
> Get:1 http://ppa.launchpad.net/nova-core/trunk/ubuntu/ lucid/main python-migrate 0.6-4~lucid1 [162kB]
> Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid/universe python-decorator 3.1.2-1 [131kB]
> Get:3 http://us.archive.ubuntu.com/ubuntu/ lucid/universe python-tempita 0.4-1 [52.0kB]
> Fetched 345kB in 1s (270kB/s)
> Selecting previously deselected package python-decorator.
> (Reading database ... 93903 files and directories currently installed.)
> Unpacking python-decorator (from .../python-decorator_3.1.2-1_all.deb) ...
> Selecting previously deselected package python-tempita.
> Unpacking python-tempita (from .../python-tempita_0.4-1_all.deb) ...
> Selecting previously deselected package python-migrate.
> Unpacking python-migrate (from .../python-migrate_0.6-4~lucid1_all.deb) ...
> Processing triggers for man-db ...
> Setting up python-decorator (3.1.2-1) ...
>
> Setting up python-tempita (0.4-1) ...
>
> Setting up python-migrate (0.6-4~lucid1) ...
>
> Processing triggers for python-support ...
> kost@island106:~/openstack/nova$ sudo ./trunk/bin/nova-manage db sync
> 2011-01-25 15:03:40,793 INFO migrate.versioning.api [-] 0 -> 1...
> 2011-01-25 15:03:41,238 INFO migrate.versioning.api [-] done
> 2011-01-25 15:03:41,238 INFO migrate.versioning.api [-] 1 -> 2...
> 2011-01-25 15:03:41,500 INFO migrate.versioning.api [-] done
>
> ---
>
> bug fix submitted @
> lp:~usc-isi/nova/ko...

Read more...

Revision history for this message
Kost (kost-isi) wrote :

Found two more missing components of nova.sh.

Since these bugs are similar I'll add them here:

1.
2011-01-25 15:31:33,288 DEBUG nova.root [-] Inner Exception: No module named glance.client from MainProcess (pid=30268) import_class /home/kost/openstack/nova/trunk/nova/utils.py:56
Traceback (most recent call last):
  File "/home/kost/openstack/nova/trunk/bin/nova-compute", line 44, in <module>
    service.serve()
  File "/home/kost/openstack/nova/trunk/nova/service.py", line 230, in serve
    x.start()
  File "/home/kost/openstack/nova/trunk/nova/service.py", line 80, in start
    **self.saved_kwargs)
  File "/home/kost/openstack/nova/trunk/nova/compute/manager.py", line 112, in __init__
    self.driver = utils.import_object(compute_driver)
  File "/home/kost/openstack/nova/trunk/nova/utils.py", line 66, in import_object
    cls = import_class(import_str)
  File "/home/kost/openstack/nova/trunk/nova/utils.py", line 57, in import_class
    raise exception.NotFound(_('Class %s cannot be found') % class_str)
nova.exception.NotFound: Class get_connection cannot be found

---
FIX: nova.sh needs to install python-glance
---

2.
http://paste.org/pastebin/view/27925
tables aren't updated when using nova.sh with a mysql db. This is b/c the database is deleted, then created.

FIX: add line #126...

123 if [ "$USE_MYSQL" == 1 ]; then
124 mysql -p$MYSQL_PASS -e 'DROP DATABASE nova;'
125 mysql -p$MYSQL_PASS -e 'CREATE DATABASE nova;'
126 $NOVA_DIR/bin/nova-manage --flagfile $NOVA_DIR/bin/nova.conf db sync
127 else

bug fix submitted @
lp:~usc-isi/nova/kost-bugfix-migrate-nova.sh

Thierry Carrez (ttx)
Changed in nova:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.1
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.