[Openstack] [Nova] MySQL drivers in DB

Pitucha, Stanislaw Izaak stanislaw.pitucha at hp.com
Wed Oct 12 12:16:46 UTC 2011


I'm not that interested in engines - this does look out of scope, since forcing something here might prevent people from running mysql cluster (ndb engine is required then).

I was wondering about indexes though - I was going to submit a patch for it in the future actually. Since big, db-stopping changes are made anyways, is there any good reason for not having indexes included? And alternative which doesn't require to do this together with schema migration would be to have a separate migration for indexes which is completely optional. Not a real migration of course, but just a set of predefined indexes for each migration stage, so at each stage you could do `nova-manage db reindex` and get the "official" set of indexes applied automatically. Those should effectively ensure that you get no queries without an index.

Regards,
Stanisław Pitucha
Cloud Services 
Hewlett Packard


-----Original Message-----
From: openstack-bounces+stanislaw.pitucha=hp.com at lists.launchpad.net [mailto:openstack-bounces+stanislaw.pitucha=hp.com at lists.launchpad.net] On Behalf Of Gabe Westmaas
Sent: Wednesday, October 12, 2011 12:55 PM
To: Vishvananda Ishaya; Nick Sokolov
Cc: openstack at lists.launchpad.net
Subject: Re: [Openstack] [Nova] MySQL drivers in DB

+1 on modifying it in your environment,  this seems outside the scope of
migrations, though perhaps listed as a "best practice" for the deployment
process.

Similarly, I have been trying to decide what makes sense for indexes.
Right now it would be a bad idea to run nova without adding some indexes,
but I'm also not sure if this belongs in migrations, I was also thinking
this belonged in a "best practices" document.  I'm concerned about that
being a part of an upgrade and negatively affecting a deployment that
might have millions of rows in a table that to which a migration adds an
index.  At the same time we have to deal with this when we do other
operations on large tables (adding or removing columns, for example), so
maybe I shouldn't be so concerned about it.  Any thoughts?

Gabe

On 10/11/11 5:15 PM, "Vishvananda Ishaya" <vishvananda at gmail.com> wrote:

>For some reason tables are getting created as default type.  There is a
>migration in the history to convert tables to InnoDB, but anything
>created after that migration will go in as the default type.  We can add
>another migration to convert all of the other tables, but I think the
>right method here might be to set the default table type in mysql to
>innodb before running nova-manage db sync.
>
>Vish
>
>On Oct 11, 2011, at 1:55 PM, Nick Sokolov wrote:
>
>> Hi stackers!
>> 
>> I noticed, that tables in database use two database engines instead of
>>two, but model descriptions does not override __table_args__ =
>>{'mysql_engine': 'InnoDB'}.
>> This is design decision or migration_repo bug, or something else?
>> 
>> mysql> select table_name, table_type, engine FROM
>>information_schema.tables;
>> +---------------------------------------+-------------+--------+
>> | table_name                            | table_type  | engine |
>> +---------------------------------------+-------------+--------+
>>    .... system tables here ....
>> | agent_builds                          | BASE TABLE  | MyISAM |
>> | auth_tokens                           | BASE TABLE  | InnoDB |
>> | block_device_mapping                  | BASE TABLE  | MyISAM |
>> | certificates                          | BASE TABLE  | InnoDB |
>> | compute_nodes                         | BASE TABLE  | InnoDB |
>> | console_pools                         | BASE TABLE  | InnoDB |
>> | consoles                              | BASE TABLE  | InnoDB |
>> | export_devices                        | BASE TABLE  | InnoDB |
>> | fixed_ips                             | BASE TABLE  | InnoDB |
>> | floating_ips                          | BASE TABLE  | InnoDB |
>> | instance_actions                      | BASE TABLE  | InnoDB |
>> | instance_metadata                     | BASE TABLE  | InnoDB |
>> | instance_type_extra_specs             | BASE TABLE  | MyISAM |
>> | instance_types                        | BASE TABLE  | InnoDB |
>> | instances                             | BASE TABLE  | InnoDB |
>> | iscsi_targets                         | BASE TABLE  | InnoDB |
>> | key_pairs                             | BASE TABLE  | InnoDB |
>> | migrate_version                       | BASE TABLE  | InnoDB |
>> | migrations                            | BASE TABLE  | InnoDB |
>> | networks                              | BASE TABLE  | InnoDB |
>> | projects                              | BASE TABLE  | InnoDB |
>> | provider_fw_rules                     | BASE TABLE  | MyISAM |
>> | quotas                                | BASE TABLE  | InnoDB |
>> | security_group_instance_association   | BASE TABLE  | InnoDB |
>> | security_group_rules                  | BASE TABLE  | InnoDB |
>> | security_groups                       | BASE TABLE  | InnoDB |
>> | services                              | BASE TABLE  | InnoDB |
>> | snapshots                             | BASE TABLE  | InnoDB |
>> | user_project_association              | BASE TABLE  | InnoDB |
>> | user_project_role_association         | BASE TABLE  | InnoDB |
>> | user_role_association                 | BASE TABLE  | InnoDB |
>> | users                                 | BASE TABLE  | InnoDB |
>> | virtual_interfaces                    | BASE TABLE  | InnoDB |
>> | virtual_storage_arrays                | BASE TABLE  | MyISAM |
>> | volume_metadata                       | BASE TABLE  | MyISAM |
>> | volume_type_extra_specs               | BASE TABLE  | MyISAM |
>> | volume_types                          | BASE TABLE  | MyISAM |
>> | volumes                               | BASE TABLE  | InnoDB |
>> | zones                                 | BASE TABLE  | InnoDB |
>> +---------------------------------------+-------------+--------+
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack at lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>
>
>_______________________________________________
>Mailing list: https://launchpad.net/~openstack
>Post to     : openstack at lists.launchpad.net
>Unsubscribe : https://launchpad.net/~openstack
>More help   : https://help.launchpad.net/ListHelp

This email may include confidential information. If you received it in error, please delete it.


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack at lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6216 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20111012/45c22d62/attachment.bin>


More information about the Openstack mailing list