[Openstack] Accessing Nova DB from the Compute Host

Razique Mahroua razique.mahroua at gmail.com
Thu Dec 6 10:25:35 UTC 2012


Check this Trinath
https://bugs.launchpad.net/keystone/+bug/860885


Regards,
Razique Mahroua - Nuage & Co
razique.mahroua at gmail.com
Tel : +33 9 72 37 94 15



Le 5 déc. 2012 à 12:08, Razique Mahroua <razique.mahroua at gmail.com> a écrit :

> HI Trinath,
> just add the right credentials into your .bashrc or any file the system user can source : 
> 
>> export SERVICE_TOKEN=admin
>>                                     
>> export OS_TENANT_NAME=admin
>> export OS_USERNAME=admin
>> export OS_PASSWORD=openstack
>> export OS_AUTH_URL=http://$keystone-IP:5000/v2.0/
>> export SERVICE_ENDPOINT=http://$keystone-IP:35357/v2.0/
> and it would work
> 
> Regards,
> 	
> Razique Mahroua - Nuage & Co
> razique.mahroua at gmail.com
> Tel : +33 9 72 37 94 15
> 
> <NUAGECO-LOGO-Fblan_petit.jpg>
> 
> Le 5 déc. 2012 à 12:04, Trinath Somanchi <trinath.somanchi at gmail.com> a écrit :
> 
>> Hi-
>> 
>> Is there any way with out using the nova-client from the compute host, to access the nova database?
>> 
>> I tried, using the /nova/db/api.py and /nova/db/sqlalchemy/api.py class definitions for accessing the database but failed to get the data.
>> 
>> 
>> I get this error for the sample def. i have written.
>> 
>>  File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 5263, in sampledata_by_host
>>     filter(models.Instance.host == host_name).all()
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2115, in all
>>     return list(self)
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2227, in __iter__
>>     return self._execute_and_instances(context)
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2240, in _execute_and_instances
>>     close_with_result=True)
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2231, in _connection_from_session
>>     **kw)
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 730, in connection
>>     close_with_result=close_with_result)
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 736, in _connection_for_bind
>>     return engine.contextual_connect(**kwargs)
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2490, in contextual_connect
>>     self.pool.connect(),
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 224, in connect
>>     return _ConnectionFairy(self).checkout()
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 387, in __init__
>>     rec = self._connection_record = pool._do_get()
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 802, in _do_get
>>     return self._create_connection()
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 188, in _create_connection
>>     return _ConnectionRecord(self)
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 270, in __init__
>>     self.connection = self.__connect()
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 330, in __connect
>>     connection = self.__pool._creator()
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 80, in connect
>>     return dialect.connect(*cargs, **cparams)
>>   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 281, in connect
>>     return self.dbapi.connect(*cargs, **cparams)
>> OperationalError: (OperationalError) unable to open database file None None
>> 
>> Can any one help when does this error occur and how to resolve the same.
>> 
>> Thanks in advance.
>> 
>> -- 
>> Regards,
>> ----------------------------------------------
>> Trinath Somanchi,
>> +91 9866 235 130
>> 
>> _______________________________________________
>> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121206/1134355b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NUAGECO-LOGO-Fblan_petit.jpg
Type: image/jpeg
Size: 10122 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121206/1134355b/attachment.jpg>


More information about the Openstack mailing list