nova baremetal node create error:column deleted is of type boolean but expression is integer

Bug #1140294 reported by jsb
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Boris Pavlovic

Bug Description

nova --baremetal-node-create command returns programming error: olumn "deleted" is of type boolean but expression is of type integer
(using postgres db)

2012-10-01 03:44:04.563 5070 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.g3-py2.7.egg/nova/openstack/common/db/sqlalchemy/session.py", line 424, in _wrap
2012-10-01 03:44:04.563 5070 TRACE nova.api.openstack raise DBError(e)
2012-10-01 03:44:04.563 5070 TRACE nova.api.openstack DBError: (ProgrammingError) column "deleted" is of type boolean but expression is of type integer
2012-10-01 03:44:04.563 5070 TRACE nova.api.openstack LINE 1: ...12-10-01T10:44:04.558009'::timestamp, NULL, NULL, 0, '110d95...
2012-10-01 03:44:04.563 5070 TRACE nova.api.openstack ^
2012-10-01 03:44:04.563 5070 TRACE nova.api.openstack HINT: You will need to rewrite or cast the expression.
2012-10-01 03:44:04.563 5070 TRACE nova.api.openstack 'INSERT INTO bm_nodes (created_at, updated_at, deleted_at, deleted, uuid, service_host, instance_uuid, instance_name, cpus, memory_mb, local_gb, pm_address, pm_user, pm_password, prov_mac_address, registration_status, task_state, prov_vlan_id, terminal_port, image_path, pxe_config_path, deploy_key, root_mb, swap_mb) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(uuid)s, %(service_host)s, %(instance_uuid)s, %(instance_name)s, %(cpus)s, %(memory_mb)s, %(local_gb)s, %(pm_address)s, %(pm_user)s, %(pm_password)s, %(prov_mac_address)s, %(registration_status)s, %(task_state)s, %(prov_vlan_id)s, %(terminal_port)s, %(image_path)s, %(pxe_config_path)s, %(deploy_key)s, %(root_mb)s, %(swap_mb)s)

Tags: db baremetal
tags: added: baremetal
tags: added: db
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → grizzly-rc1
assignee: nobody → Boris Pavlovic (boris-42)
Changed in nova:
status: Confirmed → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23859

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/23859
Committed: http://github.com/openstack/nova/commit/47c7454d1b8926040577f77822729463d42ed635
Submitter: Jenkins
Branch: master

commit 47c7454d1b8926040577f77822729463d42ed635
Author: Boris Pavlovic <email address hidden>
Date: Fri Mar 8 02:12:22 2013 +0400

    Make bm model's deleted column match database

    In Models by default type of deleted column is Integer, but bm tabels
    use Boolean type for deleted columns.This produce bug in postgresql
    (type mismatch).

    At this moment we are not able to do any db migrations, so there is
    only one way to fix this bug. Change type of deleted columns in Models
    from Integer to Boolean.

    In Havana we will be able to change deleted columns types to type of id
    for bm tables and use soft_delete and UC as in rest of nova.

    Fixes bug 1140294

    Change-Id: Id56c4bbff7048ed5c746dc995380be9ba0a12c39

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.