Skip to content

Commit

Permalink
fixed postgresql flavor-create
Browse files Browse the repository at this point in the history
fixes bug 968190
nova flavor-create failed on postgresql DB
because sqlalchemy tried to write an integer into a varchar field

Change-Id: Ib47d8d10e96fedb2158f454503fe1ca3493c16bb
Signed-Off-By: Bernhard M. Wiedemann <bwiedemann suse.com>
  • Loading branch information
jdsn authored and bmwiedemann committed Apr 1, 2012
1 parent 37dad35 commit 6ec0ac3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Authors
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Hisaki Ohara <hisaki.ohara@intel.com>
Ilya Alekseyev <ilyaalekseyev@acm.org>
Isaku Yamahata <yamahata@valinux.co.jp>
Ivan Kolodyazhny <e0ne@e0ne.info>
J. Daniel Schmidt <jdsn@suse.de>
Jake Dahn <jake@ansolabs.com>
James E. Blair <jeblair@hp.com>
Jason Cannavale <jason.cannavale@rackspace.com>
Expand Down
4 changes: 3 additions & 1 deletion nova/compute/instance_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def create(name, memory, vcpus, root_gb, ephemeral_gb, flavorid, swap=None,
raise exception.InvalidInput(reason=msg)

kwargs['name'] = name
kwargs['flavorid'] = flavorid
# NOTE(vish): Internally, flavorid is stored as a string but it comes
# in through json as an integer, so we convert it here.
kwargs['flavorid'] = unicode(flavorid)

try:
return db.instance_type_create(context.get_admin_context(), kwargs)
Expand Down

0 comments on commit 6ec0ac3

Please sign in to comment.