Mailing List Archive

[DB] Create Quantum DB
Hi all,

I somehow messed-up my quantum DB and I got no table left in the DB. I
try launching several times quantum-server, quantum-agent, even
quantum-dhcp, but still nothing :( .
I look several times in the code of quantum (and also in devstack) and
found nothing similar to "db sync" or "db upgrade".

So : how to recreate the tables ?

Thanks for the help.

--- Nicolas


--
Mailing list: https://launchpad.net/~netstack
Post to : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help : https://help.launchpad.net/ListHelp
Re: [DB] Create Quantum DB [ In reply to ]
Nicolas,

Quantum and its plugins do not have yet schema versioning.
If you've messed up the DB and dropped it, just create the schema in mysql.
Quantum (or to be more precise sqlAlchemy) will recreate the tables for you.
The name of the db for the OVS plugin is ovs_quantum. DB name can differ
from plugin to plugin, please check the plugin README for more information.

Hope it helps,
Salvatore

On 25 July 2012 15:16, Nicolas de Bonfils <openstack@nicolas2bonfils.com>wrote:

> Hi all,
>
> I somehow messed-up my quantum DB and I got no table left in the DB. I try
> launching several times quantum-server, quantum-agent, even quantum-dhcp,
> but still nothing :( .
> I look several times in the code of quantum (and also in devstack) and
> found nothing similar to "db sync" or "db upgrade".
>
> So : how to recreate the tables ?
>
> Thanks for the help.
>
> --- Nicolas
>
>
> --
> Mailing list: https://launchpad.net/~**netstack<https://launchpad.net/~netstack>
> Post to : netstack@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~**netstack<https://launchpad.net/~netstack>
> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>
Re: [DB] Create Quantum DB [ In reply to ]
Hi Salvatore,

What do you mean by "creating the schema" ? I got the db "ovs_quantum"
empty and the good mysql connection url in configuration file. But I'm
stuck after that :/

Thanks

--- Nicolas

Le Wed Jul 25 15:23:28 2012, Salvatore Orlando a écrit :
> Nicolas,
>
> Quantum and its plugins do not have yet schema versioning.
> If you've messed up the DB and dropped it, just create the schema in
> mysql. Quantum (or to be more precise sqlAlchemy) will recreate the
> tables for you.
> The name of the db for the OVS plugin is ovs_quantum. DB name can
> differ from plugin to plugin, please check the plugin README for more
> information.
>
> Hope it helps,
> Salvatore
>
> On 25 July 2012 15:16, Nicolas de Bonfils
> <openstack@nicolas2bonfils.com <mailto:openstack@nicolas2bonfils.com>>
> wrote:
>
> Hi all,
>
> I somehow messed-up my quantum DB and I got no table left in the
> DB. I try launching several times quantum-server, quantum-agent,
> even quantum-dhcp, but still nothing :( .
> I look several times in the code of quantum (and also in devstack)
> and found nothing similar to "db sync" or "db upgrade".
>
> So : how to recreate the tables ?
>
> Thanks for the help.
>
> --- Nicolas
>
>
> --
> Mailing list: https://launchpad.net/~__netstack
> <https://launchpad.net/~netstack>
> Post to : netstack@lists.launchpad.net
> <mailto:netstack@lists.launchpad.net>
> Unsubscribe : https://launchpad.net/~__netstack
> <https://launchpad.net/~netstack>
> More help : https://help.launchpad.net/__ListHelp
> <https://help.launchpad.net/ListHelp>
>
>



--
Mailing list: https://launchpad.net/~netstack
Post to : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help : https://help.launchpad.net/ListHelp
Re: [DB] Create Quantum DB [ In reply to ]
It seems you are already in a situation where you have an empty db ("show
databases" returns ovs_quantum, but "show tables" returns an empty list).
Quantum-server should recreate the tables for you. If this is not
happening, you should have an error during Quantum startup. Can you post
the traceback?

Salvatore

On 25 July 2012 15:27, Nicolas de Bonfils <openstack@nicolas2bonfils.com>wrote:

> Hi Salvatore,
>
> What do you mean by "creating the schema" ? I got the db "ovs_quantum"
> empty and the good mysql connection url in configuration file. But I'm
> stuck after that :/
>
> Thanks
>
> --- Nicolas
>
> Le Wed Jul 25 15:23:28 2012, Salvatore Orlando a écrit :
>
>> Nicolas,
>>
>> Quantum and its plugins do not have yet schema versioning.
>> If you've messed up the DB and dropped it, just create the schema in
>> mysql. Quantum (or to be more precise sqlAlchemy) will recreate the
>> tables for you.
>> The name of the db for the OVS plugin is ovs_quantum. DB name can
>> differ from plugin to plugin, please check the plugin README for more
>> information.
>>
>> Hope it helps,
>> Salvatore
>>
>> On 25 July 2012 15:16, Nicolas de Bonfils
>> <openstack@nicolas2bonfils.com <mailto:openstack@**nicolas2bonfils.com<openstack@nicolas2bonfils.com>
>> >>
>>
>> wrote:
>>
>> Hi all,
>>
>> I somehow messed-up my quantum DB and I got no table left in the
>> DB. I try launching several times quantum-server, quantum-agent,
>> even quantum-dhcp, but still nothing :( .
>> I look several times in the code of quantum (and also in devstack)
>> and found nothing similar to "db sync" or "db upgrade".
>>
>> So : how to recreate the tables ?
>>
>> Thanks for the help.
>>
>> --- Nicolas
>>
>>
>> --
>> Mailing list: https://launchpad.net/~__**netstack<https://launchpad.net/~__netstack>
>>
>> <https://launchpad.net/~**netstack <https://launchpad.net/~netstack>>
>> Post to : netstack@lists.launchpad.net
>> <mailto:netstack@lists.**launchpad.net <netstack@lists.launchpad.net>
>> >
>> Unsubscribe : https://launchpad.net/~__**netstack<https://launchpad.net/~__netstack>
>> <https://launchpad.net/~**netstack <https://launchpad.net/~netstack>>
>> More help : https://help.launchpad.net/__**ListHelp<https://help.launchpad.net/__ListHelp>
>> <https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>> >
>>
>>
>>
>
>
Re: [DB] Create Quantum DB [ In reply to ]
> It seems you are already in a situation where you have an empty db
> ("show databases" returns ovs_quantum, but "show tables" returns an
> empty list).
That's it.

> Quantum-server should recreate the tables for you. If this is not
> happening, you should have an error during Quantum startup. Can you
> post the traceback?
I got no error :/
I recheck the sql connection url, it's ok (other services connects
without error)
You can read the startup log below :
2012-07-25 16:22:03 DEBUG [quantum.service]
********************************************************************************
2012-07-25 16:22:03 DEBUG [quantum.service] Configuration options
gathered from config file:
2012-07-25 16:22:03 DEBUG [quantum.service]
================================================
2012-07-25 16:22:03 DEBUG [quantum.service] api_extensions_path
2012-07-25 16:22:03 DEBUG [quantum.service] api_paste_config
api-paste.ini
2012-07-25 16:22:03 DEBUG [quantum.service] base_mac
fa:16:3e:00:00:00
2012-07-25 16:22:03 DEBUG [quantum.service] bind_host
192.168.23.5
2012-07-25 16:22:03 DEBUG [quantum.service] bind_port
12060
2012-07-25 16:22:03 DEBUG [quantum.service] config_dir
None
2012-07-25 16:22:03 DEBUG [quantum.service] config_file
['/etc/quantum/quantum.conf']
2012-07-25 16:22:03 DEBUG [quantum.service] core_plugin
quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
2012-07-25 16:22:03 DEBUG [quantum.service] debug
True
2012-07-25 16:22:03 DEBUG [quantum.service] log_config
None
2012-07-25 16:22:03 DEBUG [quantum.service] log_date_format
%Y-%m-%d %H:%M:%S
2012-07-25 16:22:03 DEBUG [quantum.service] log_dir
None
2012-07-25 16:22:03 DEBUG [quantum.service] log_file
None
2012-07-25 16:22:03 DEBUG [quantum.service] log_format
%(asctime)s %(levelname)8s [%(name)s] %(message)s
2012-07-25 16:22:03 DEBUG [quantum.service] mac_generation_retries
16
2012-07-25 16:22:03 DEBUG [quantum.service] policy_file
policy.json
2012-07-25 16:22:03 DEBUG [quantum.service] syslog_log_facility
LOG_USER
2012-07-25 16:22:03 DEBUG [quantum.service] use_syslog
False
2012-07-25 16:22:03 DEBUG [quantum.service] verbose
True
2012-07-25 16:22:03 DEBUG [quantum.service]
********************************************************************************
2012-07-25 16:22:03 INFO [quantum.common.config] Config paste file:
/etc/quantum/api-paste.ini
2012-07-25 16:22:03 DEBUG [quantum.manager] Plugin
location:quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
2012-07-25 16:22:03 INFO [quantum.manager] Loading Plugin:
quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
2012-07-25 16:22:03 INFO [quantum.api.extensions] Initializing
extension manager.
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: credential.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: extensions.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: providernet.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: multiport.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _qos_view.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: portstats.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: portprofile.py
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco
Port Profile
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
Port Profile
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
Portprofile include QoS information
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
http://docs.ciscocloud.com/api/ext/portprofile/v1.0
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
2011-07-23T13:25:27-06:00
2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco
Port Profile not supported by plugin
<quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
object at 0x2975ed0>
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _portstats_view.py
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _novatenant_view.py
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: providernet.py
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name:
Provider Network
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias:
provider
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
Expose mapping of virtual networks to VLANs and flat networks
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
http://docs.openstack.org/ext/provider/api/v1.0
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
2012-07-23T10:00:00-00:00
2012-07-25 16:22:03 WARNING [quantum.api.extensions] Loaded extension:
provider
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: extensions.py
2012-07-25 16:22:03 WARNING [quantum.api.extensions] Did not find
expected name "Extensions" in
/xxxxx/openstack/quantum/quantum/extensions/extensions.py
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: novatenant.py
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco
Nova Tenant
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
Nova Tenant
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
novatenant resource is used by nova side to invoke quantum api
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
http://docs.ciscocloud.com/api/ext/novatenant/v1.0
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
2011-08-09T13:25:27-06:00
2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco
Nova Tenant not supported by plugin
<quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
object at 0x2975ed0>
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: portstats.py
2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension file
portstats.py wasnt loaded due to cannot import name extensions
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _credential_view.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _pprofiles.py
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: novatenant.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: portprofile.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: __init__.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: __init__.py
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _pprofiles.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: credential.py
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco
Credential
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
Credential
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
Credential include username and password
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
http://docs.ciscocloud.com/api/ext/credential/v1.0
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
2011-07-25T13:25:27-06:00
2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco
Credential not supported by plugin
<quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
object at 0x2975ed0>
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _novatenant_view.pyc
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: multiport.py
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco
Multiport
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
Multiport
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
handle multiple ports in one call
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
http://docs.ciscocloud.com/api/ext/multiport/v1.0
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
2011-08-25T13:25:27-06:00
2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco
Multiport not supported by plugin
<quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
object at 0x2975ed0>
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: qos.py
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco
qos
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
qos
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
qos includes qos_name and qos_desc
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
http://docs.ciscocloud.com/api/ext/qos/v1.0
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
2011-07-25T13:25:27-06:00
2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco
qos not supported by plugin
<quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
object at 0x2975ed0>
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _qos_view.py
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: _credential_view.py
2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
file: qos.pyc
2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with
method overriding = True, and path info altering = True
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Extended
resource: extensions
2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with
method overriding = True, and path info altering = True
2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with
method overriding = True, and path info altering = True
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Extended
resource: extensions
2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with
method overriding = True, and path info altering = True
2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with
method overriding = True, and path info altering = True
2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Extended
resource: extensions
2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with
method overriding = True, and path info altering = True
2012-07-25 16:22:03 DEBUG [eventlet.wsgi.server] (22190) wsgi
starting up on http://192.168.23.5:12060/

--
Mailing list: https://launchpad.net/~netstack
Post to : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help : https://help.launchpad.net/ListHelp
Re: [DB] Create Quantum DB [ In reply to ]
I've just tried to reproduce your condition by dropping all the tables on
the ovs_quantum db and then relaunching quantum-server, quantum-agent, and
quantum-dhcp.

The tables were successfully recreated.
The only advice I can give is to 1) verify no table actually appears when
you do "show tables" for ovs_quantum, and 2) drop the current ovs_quantum
schema and create a new one (with no tables).

Even if the service starts fine, I guess it then fails when you try to
perform any operations. It would be nice to see that traceback.

Salvatore

On 25 July 2012 16:30, Nicolas de Bonfils <openstack@nicolas2bonfils.com>wrote:

> It seems you are already in a situation where you have an empty db
>> ("show databases" returns ovs_quantum, but "show tables" returns an
>> empty list).
>>
> That's it.
>
>
> Quantum-server should recreate the tables for you. If this is not
>> happening, you should have an error during Quantum startup. Can you
>> post the traceback?
>>
> I got no error :/
> I recheck the sql connection url, it's ok (other services connects without
> error)
> You can read the startup log below :
> 2012-07-25 16:22:03 DEBUG [quantum.service]
> ****************************************************************
> ********************
> 2012-07-25 16:22:03 DEBUG [quantum.service] Configuration options
> gathered from config file:
> 2012-07-25 16:22:03 DEBUG [quantum.service]
> ==============================**==================
> 2012-07-25 16:22:03 DEBUG [quantum.service] api_extensions_path
> 2012-07-25 16:22:03 DEBUG [quantum.service] api_paste_config
> api-paste.ini
> 2012-07-25 16:22:03 DEBUG [quantum.service] base_mac
> fa:16:3e:00:00:00
> 2012-07-25 16:22:03 DEBUG [quantum.service] bind_host
> 192.168.23.5
> 2012-07-25 16:22:03 DEBUG [quantum.service] bind_port
> 12060
> 2012-07-25 16:22:03 DEBUG [quantum.service] config_dir
> None
> 2012-07-25 16:22:03 DEBUG [quantum.service] config_file
> ['/etc/quantum/quantum.conf']
> 2012-07-25 16:22:03 DEBUG [quantum.service] core_plugin
> quantum.plugins.openvswitch.**ovs_quantum_plugin.**OVSQuantumPluginV2
> 2012-07-25 16:22:03 DEBUG [quantum.service] debug
> True
> 2012-07-25 16:22:03 DEBUG [quantum.service] log_config
> None
> 2012-07-25 16:22:03 DEBUG [quantum.service] log_date_format
> %Y-%m-%d %H:%M:%S
> 2012-07-25 16:22:03 DEBUG [quantum.service] log_dir
> None
> 2012-07-25 16:22:03 DEBUG [quantum.service] log_file
> None
> 2012-07-25 16:22:03 DEBUG [quantum.service] log_format
> %(asctime)s %(levelname)8s [%(name)s] %(message)s
> 2012-07-25 16:22:03 DEBUG [quantum.service] mac_generation_retries
> 16
> 2012-07-25 16:22:03 DEBUG [quantum.service] policy_file
> policy.json
> 2012-07-25 16:22:03 DEBUG [quantum.service] syslog_log_facility
> LOG_USER
> 2012-07-25 16:22:03 DEBUG [quantum.service] use_syslog
> False
> 2012-07-25 16:22:03 DEBUG [quantum.service] verbose
> True
> 2012-07-25 16:22:03 DEBUG [quantum.service]
> ****************************************************************
> ********************
> 2012-07-25 16:22:03 INFO [quantum.common.config] Config paste file:
> /etc/quantum/api-paste.ini
> 2012-07-25 16:22:03 DEBUG [quantum.manager] Plugin
> location:quantum.plugins.**openvswitch.ovs_quantum_**
> plugin.OVSQuantumPluginV2
> 2012-07-25 16:22:03 INFO [quantum.manager] Loading Plugin:
> quantum.plugins.openvswitch.**ovs_quantum_plugin.**OVSQuantumPluginV2
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Initializing
> extension manager.
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: credential.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: extensions.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: providernet.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: multiport.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _qos_view.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: portstats.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: portprofile.py
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco Port
> Profile
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
> Port Profile
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
> Portprofile include QoS information
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
> http://docs.ciscocloud.com/**api/ext/portprofile/v1.0<http://docs.ciscocloud.com/api/ext/portprofile/v1.0>
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
> 2011-07-23T13:25:27-06:00
> 2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco Port
> Profile not supported by plugin <quantum.plugins.openvswitch.**
> ovs_quantum_plugin.**OVSQuantumPluginV2 object at 0x2975ed0>
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _portstats_view.py
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _novatenant_view.py
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: providernet.py
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Provider
> Network
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: provider
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
> Expose mapping of virtual networks to VLANs and flat networks
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
> http://docs.openstack.org/ext/**provider/api/v1.0<http://docs.openstack.org/ext/provider/api/v1.0>
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
> 2012-07-23T10:00:00-00:00
> 2012-07-25 16:22:03 WARNING [quantum.api.extensions] Loaded extension:
> provider
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: extensions.py
> 2012-07-25 16:22:03 WARNING [quantum.api.extensions] Did not find
> expected name "Extensions" in /xxxxx/openstack/quantum/**
> quantum/extensions/extensions.**py
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: novatenant.py
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco Nova
> Tenant
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
> Nova Tenant
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
> novatenant resource is used by nova side to invoke quantum api
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
> http://docs.ciscocloud.com/**api/ext/novatenant/v1.0<http://docs.ciscocloud.com/api/ext/novatenant/v1.0>
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
> 2011-08-09T13:25:27-06:00
> 2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco Nova
> Tenant not supported by plugin <quantum.plugins.openvswitch.**
> ovs_quantum_plugin.**OVSQuantumPluginV2 object at 0x2975ed0>
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: portstats.py
> 2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension file
> portstats.py wasnt loaded due to cannot import name extensions
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _credential_view.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _pprofiles.py
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: novatenant.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: portprofile.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: __init__.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: __init__.py
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _pprofiles.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: credential.py
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco
> Credential
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
> Credential
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
> Credential include username and password
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
> http://docs.ciscocloud.com/**api/ext/credential/v1.0<http://docs.ciscocloud.com/api/ext/credential/v1.0>
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
> 2011-07-25T13:25:27-06:00
> 2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco
> Credential not supported by plugin <quantum.plugins.openvswitch.**
> ovs_quantum_plugin.**OVSQuantumPluginV2 object at 0x2975ed0>
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _novatenant_view.pyc
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: multiport.py
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco
> Multiport
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco
> Multiport
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description:
> handle multiple ports in one call
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
> http://docs.ciscocloud.com/**api/ext/multiport/v1.0<http://docs.ciscocloud.com/api/ext/multiport/v1.0>
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
> 2011-08-25T13:25:27-06:00
> 2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco
> Multiport not supported by plugin <quantum.plugins.openvswitch.**
> ovs_quantum_plugin.**OVSQuantumPluginV2 object at 0x2975ed0>
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: qos.py
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext name: Cisco qos
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext alias: Cisco qos
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext description: qos
> includes qos_name and qos_desc
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext namespace:
> http://docs.ciscocloud.com/**api/ext/qos/v1.0<http://docs.ciscocloud.com/api/ext/qos/v1.0>
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Ext updated:
> 2011-07-25T13:25:27-06:00
> 2012-07-25 16:22:03 WARNING [quantum.api.extensions] extension Cisco qos
> not supported by plugin <quantum.plugins.openvswitch.**ovs_quantum_plugin.
> **OVSQuantumPluginV2 object at 0x2975ed0>
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _qos_view.py
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: _credential_view.py
> 2012-07-25 16:22:03 INFO [quantum.api.extensions] Loading extension
> file: qos.pyc
> 2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with method
> overriding = True, and path info altering = True
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Extended resource:
> extensions
> 2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with method
> overriding = True, and path info altering = True
> 2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with method
> overriding = True, and path info altering = True
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Extended resource:
> extensions
> 2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with method
> overriding = True, and path info altering = True
> 2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with method
> overriding = True, and path info altering = True
> 2012-07-25 16:22:03 DEBUG [quantum.api.extensions] Extended resource:
> extensions
> 2012-07-25 16:22:03 DEBUG [routes.middleware] Initialized with method
> overriding = True, and path info altering = True
> 2012-07-25 16:22:03 DEBUG [eventlet.wsgi.server] (22190) wsgi starting
> up on http://192.168.23.5:12060/
>
Re: [DB] Create Quantum DB [ In reply to ]
> The tables were successfully recreated.
> The only advice I can give is to 1) verify no table actually appears
> when you do "show tables" for ovs_quantum, and 2) drop the current
> ovs_quantum schema and create a new one (with no tables).
Did it several times, also check the user privileges in mysql, recreate
it, restart mysql, still no success

> Even if the service starts fine, I guess it then fails when you try to
> perform any operations. It would be nice to see that traceback.
for quantum-server :
2012-07-25 21:53:12 DEBUG [routes.middleware] No route matched for
GET /ports.json
2012-07-25 21:53:12 DEBUG [routes.middleware] Matched GET /ports.json
2012-07-25 21:53:12 DEBUG [routes.middleware] Route path:
'/ports{.format}', defaults: {'action': u'index', 'controller':
wsgify(quantum.api.v2.resource.resource, RequestClass=<class
'quantum.api.v2.resource.Request'>)}
2012-07-25 21:53:12 DEBUG [routes.middleware] Match dict: {'action':
u'index', 'controller': wsgify(quantum.api.v2.resource.resource,
RequestClass=<class 'quantum.api.v2.resource.Request'>), 'format':
u'json'}
2012-07-25 22:01:12 DEBUG [eventlet.wsgi.server] 192.168.23.5 - -
[25/Jul/2012 22:01:12] "GET /v2.0/networks.json HTTP/1.1" 200 124
0.001811

for quantum-agent (repeating at infinity):
ERROR:__main__:Main-loop Exception:
Traceback (most recent call last):
File
"/xxxx/openstack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 450, in daemon_loop
for p in db.ports.all())
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/sqlsoup.py",
line 809, in __getattr__
return self.entity(attr)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/sqlsoup.py",
line 806, in entity
return self.map_to(attr, tablename=attr, schema=schema)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/sqlsoup.py",
line 689, in map_to
schema=schema or self.schema)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py",
line 314, in __new__
table._init(name, metadata, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py",
line 377, in _init
self._autoload(metadata, autoload_with, include_columns)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py",
line 393, in _autoload
self, include_columns, exclude_columns
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 2412, in run_callable
return conn.run_callable(callable_, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1959, in run_callable
return callable_(self, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py",
line 264, in reflecttable
return insp.reflecttable(table, include_columns, exclude_columns)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/reflection.py",
line 350, in reflecttable
tbl_opts = self.get_table_options(table_name, schema,
**table.kwargs)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/reflection.py",
line 178, in get_table_options
**kw)
File "<string>", line 1, in <lambda>
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/reflection.py",
line 47, in cache
ret = fn(self, con, *args, **kw)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py",
line 2036, in get_table_options
parsed_state = self._parsed_state_or_create(connection, table_name,
schema, **kw)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py",
line 2135, in _parsed_state_or_create
info_cache=kw.get('info_cache', None)
File "<string>", line 1, in <lambda>
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/reflection.py",
line 47, in cache
ret = fn(self, con, *args, **kw)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py",
line 2160, in _setup_parser
full_name=full_name)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py",
line 2247, in _show_create_table
raise exc.NoSuchTableError(full_name)
NoSuchTableError: `ports`

for quantum-dhcp (repeating at infinity):
2012-07-25 21:53:20 INFO [quantum.agent.dhcp_agent] Connecting to
database "ovs_quantum" on 192.168.23.5
2012-07-25 21:53:20 WARNING [quantum.agent.dhcp_agent] Unable to get
network state delta. Exception: `subnets`


--
Mailing list: https://launchpad.net/~netstack
Post to : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help : https://help.launchpad.net/ListHelp
Re: [DB] Create Quantum DB [ In reply to ]
I admin I have never seen anything like this.
The issue must then be either in configure_db or register_models, both in
db/api.py, even if I would have expected to see "Database Registration
Exception" in the logs.

However, I cannot say what's the root cause for the issue - Quantum,
sqlAlchemy, or something else in your environment.

I know this sounds odd, but if you can instrument configure_db code to see
which paths are taken into that routine that might help us understand a
little bit better what's happening in your environment, and maybe file a
bug for Quantum if required.

I am on the #openstack-dev IRC channel, my nick is salv-orlando. Feel free
to ping me.

Salvatore


On 25 July 2012 21:57, Nicolas de BONFILS <openstack@nicolas2bonfils.com>wrote:

>
> The tables were successfully recreated.
>> The only advice I can give is to 1) verify no table actually appears
>> when you do "show tables" for ovs_quantum, and 2) drop the current
>> ovs_quantum schema and create a new one (with no tables).
>>
> Did it several times, also check the user privileges in mysql, recreate
> it, restart mysql, still no success
>
>
> Even if the service starts fine, I guess it then fails when you try to
>> perform any operations. It would be nice to see that traceback.
>>
> for quantum-server :
> 2012-07-25 21:53:12 DEBUG [routes.middleware] No route matched for GET
> /ports.json
> 2012-07-25 21:53:12 DEBUG [routes.middleware] Matched GET /ports.json
> 2012-07-25 21:53:12 DEBUG [routes.middleware] Route path:
> '/ports{.format}', defaults: {'action': u'index', 'controller':
> wsgify(quantum.api.v2.**resource.resource, RequestClass=<class
> 'quantum.api.v2.resource.**Request'>)}
> 2012-07-25 21:53:12 DEBUG [routes.middleware] Match dict: {'action':
> u'index', 'controller': wsgify(quantum.api.v2.**resource.resource,
> RequestClass=<class 'quantum.api.v2.resource.**Request'>), 'format':
> u'json'}
> 2012-07-25 22:01:12 DEBUG [eventlet.wsgi.server] 192.168.23.5 - -
> [25/Jul/2012 22:01:12] "GET /v2.0/networks.json HTTP/1.1" 200 124 0.001811
>
> for quantum-agent (repeating at infinity):
> ERROR:__main__:Main-loop Exception:
> Traceback (most recent call last):
> File "/xxxx/openstack/quantum/**quantum/plugins/openvswitch/**agent/ovs_quantum_agent.py",
> line 450, in daemon_loop
> for p in db.ports.all())
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/ext/**sqlsoup.py",
> line 809, in __getattr__
> return self.entity(attr)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/ext/**sqlsoup.py",
> line 806, in entity
> return self.map_to(attr, tablename=attr, schema=schema)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/ext/**sqlsoup.py",
> line 689, in map_to
> schema=schema or self.schema)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**schema.py",
> line 314, in __new__
> table._init(name, metadata, *args, **kw)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**schema.py",
> line 377, in _init
> self._autoload(metadata, autoload_with, include_columns)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**schema.py",
> line 393, in _autoload
> self, include_columns, exclude_columns
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**engine/base.py",
> line 2412, in run_callable
> return conn.run_callable(callable_, *args, **kwargs)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**engine/base.py",
> line 1959, in run_callable
> return callable_(self, *args, **kwargs)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**engine/default.py",
> line 264, in reflecttable
> return insp.reflecttable(table, include_columns, exclude_columns)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**engine/reflection.py",
> line 350, in reflecttable
> tbl_opts = self.get_table_options(table_**name, schema, **table.kwargs)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**engine/reflection.py",
> line 178, in get_table_options
> **kw)
> File "<string>", line 1, in <lambda>
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**engine/reflection.py",
> line 47, in cache
> ret = fn(self, con, *args, **kw)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**dialects/mysql/base.py",
> line 2036, in get_table_options
> parsed_state = self._parsed_state_or_create(**connection, table_name,
> schema, **kw)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**dialects/mysql/base.py",
> line 2135, in _parsed_state_or_create
> info_cache=kw.get('info_cache'**, None)
> File "<string>", line 1, in <lambda>
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**engine/reflection.py",
> line 47, in cache
> ret = fn(self, con, *args, **kw)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**dialects/mysql/base.py",
> line 2160, in _setup_parser
> full_name=full_name)
> File "/usr/local/lib/python2.7/**dist-packages/sqlalchemy/**dialects/mysql/base.py",
> line 2247, in _show_create_table
> raise exc.NoSuchTableError(full_**name)
> NoSuchTableError: `ports`
>
> for quantum-dhcp (repeating at infinity):
> 2012-07-25 21:53:20 INFO [quantum.agent.dhcp_agent] Connecting to
> database "ovs_quantum" on 192.168.23.5
> 2012-07-25 21:53:20 WARNING [quantum.agent.dhcp_agent] Unable to get
> network state delta. Exception: `subnets`
>
>
Re: [DB] Create Quantum DB [ In reply to ]
SOLVED ! (the problem, as usual, was between chair and keyboard)

I put some nice log in "configure_db" particularly the options dict and
see that the sql connection use sqlite://
The step leading to the problem : checkout/update quantum repo, copy
the conf file to /etc/quantum but *keep the original (not configure to
your need) in xxx/quantum/etc/ dir* => quantum will load them instead
of /etc/quantum even if you set the '--config-file' option in the
command line.
I believe it's an existing bug. I should have taken more attention in
reading devstack code where they move the file, not copy it...

Salvatore, thanks for your help.
Now, back to business ;-)

--- Nicolas

On Thu Jul 26 07:06:59 2012, Salvatore Orlando wrote:
> I admin I have never seen anything like this.
> The issue must then be either in configure_db or register_models, both
> in db/api.py, even if I would have expected to see "Database
> Registration Exception" in the logs.
>
> However, I cannot say what's the root cause for the issue - Quantum,
> sqlAlchemy, or something else in your environment.
>
> I know this sounds odd, but if you can instrument configure_db code to
> see which paths are taken into that routine that might help us
> understand a little bit better what's happening in your environment,
> and maybe file a bug for Quantum if required.
>
> I am on the #openstack-dev IRC channel, my nick is salv-orlando. Feel
> free to ping me.
>
> Salvatore

--
Mailing list: https://launchpad.net/~netstack
Post to : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help : https://help.launchpad.net/ListHelp