Prevent mysql operation errors from rolling up to client

Bug #874472 reported by Antony Messerli
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Johannes Erdfelt
Diablo
Fix Released
Undecided
Unassigned

Bug Description

Currently mysql operational errors roll up to the client. This should be obscured from the client as it typically will dump out the query or identify a migration needs to be ran.

chainreaction:~ ant$ nova boot --image 2 --flavor 2 testing
(OperationalError) (2006, 'MySQL server has gone away') 'SELECT anon_1.instance_types_created_at AS anon_1_instance_types_created_at, anon_1.instance_types_updated_at AS anon_1_instance_types_updated_at, anon_1.instance_types_deleted_at AS anon_1_instance_types_deleted_at, anon_1.instance_types_deleted AS anon_1_instance_types_deleted, anon_1.instance_types_id AS anon_1_instance_types_id, anon_1.instance_types_name AS anon_1_instance_types_name, anon_1.instance_types_memory_mb AS anon_1_instance_types_memory_mb, anon_1.instance_types_vcpus AS anon_1_instance_types_vcpus, anon_1.instance_types_local_gb AS anon_1_instance_types_local_gb, anon_1.instance_types_flavorid AS anon_1_instance_types_flavorid, anon_1.instance_types_swap AS anon_1_instance_types_swap, anon_1.instance_types_rxtx_quota AS anon_1_instance_types_rxtx_quota, anon_1.instance_types_rxtx_cap AS anon_1_instance_types_rxtx_cap, instance_type_extra_specs_1.created_at AS instance_type_extra_specs_1_created_at, instance_type_extra_specs_1.updated_at AS instance_type_extra_specs_1_updated_at, instance_type_extra_specs_1.deleted_at AS instance_type_extra_specs_1_deleted_at, instance_type_extra_specs_1.deleted AS instance_type_extra_specs_1_deleted, instance_type_extra_specs_1.id AS instance_type_extra_specs_1_id, instance_type_extra_specs_1.`key` AS instance_type_extra_specs_1_key, instance_type_extra_specs_1.value AS instance_type_extra_specs_1_value, instance_type_extra_specs_1.instance_type_id AS instance_type_extra_specs_1_instance_type_id \nFROM (SELECT instance_types.created_at AS instance_types_created_at, instance_types.updated_at AS instance_types_updated_at, instance_types.deleted_at AS instance_types_deleted_at, instance_types.deleted AS instance_types_deleted, instance_types.id AS instance_types_id, instance_types.name AS instance_types_name, instance_types.memory_mb AS instance_types_memory_mb, instance_types.vcpus AS instance_types_vcpus, instance_types.local_gb AS instance_types_local_gb, instance_types.flavorid AS instance_types_flavorid, instance_types.swap AS instance_types_swap, instance_types.rxtx_quota AS instance_types_rxtx_quota, instance_types.rxtx_cap AS instance_types_rxtx_cap \nFROM instance_types \nWHERE instance_types.flavorid = %s \n LIMIT 0, 1) AS anon_1 LEFT OUTER JOIN instance_type_extra_specs AS instance_type_extra_specs_1 ON instance_type_extra_specs_1.instance_type_id = anon_1.instance_types_id AND instance_type_extra_specs_1.deleted = %s' (2, False) (HTTP 500)

Changed in nova:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
Changed in nova:
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : A change has been merged to openstack/nova

Reviewed: https://review.openstack.org/940
Committed: http://github.com/openstack/nova/commit/2431b7848d633dc67ad684b4d1cc79468df24568
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 2431b7848d633dc67ad684b4d1cc79468df24568
Author: Johannes Erdfelt <email address hidden>
Date: Tue Oct 18 22:08:49 2011 +0000

    Don't leak exceptions out to users

    Fixed bug 874472

    Exceptions can contain all kinds of sensitive information, including
    SQL queries (and arguments), configuration information and in some
    cases the correct password (bug 868360). The information isn't useful
    to users, so don't return potentially sensitive information. The
    exceptions still get logged for debugging and troubleshooting purposes.

    Change-Id: I97cc72aec4e83ce866169ed94146d911aa8f6a6a

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (stable/diablo)

Reviewed: https://review.openstack.org/993
Committed: http://github.com/openstack/nova/commit/03c9f40f1d7be54e62b129edf41a3c729049ce0c
Submitter: Jenkins
Branch: stable/diablo

 status fixcommitted
 done

commit 03c9f40f1d7be54e62b129edf41a3c729049ce0c
Author: Johannes Erdfelt <email address hidden>
Date: Tue Oct 18 22:08:49 2011 +0000

    Don't leak exceptions out to users

    Fixed bug 874472

    Exceptions can contain all kinds of sensitive information, including
    SQL queries (and arguments), configuration information and in some
    cases the correct password (bug 868360). The information isn't useful
    to users, so don't return potentially sensitive information. The
    exceptions still get logged for debugging and troubleshooting purposes.

    (cherry picked from commit 2431b7848d633dc67ad684b4d1cc79468df24568)

    Change-Id: I45af83ee5276b92259522a4761137d7339d2b77d

Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Antony, or anyone else affected,

Accepted nova into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-1 → 2012.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.