<div dir="ltr"><div>Correction: the table_name is services not instances.<br><br></div>-Regards<br>Rahul<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 23, 2013 at 3:45 PM, Rahul Sharma <span dir="ltr"><<a href="mailto:rahulsharmaait@gmail.com" target="_blank">rahulsharmaait@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Trinath,<br><br></div>I don't know how you have landed to this situation, mostly would be because of upgrade. What had happened is that in <b>Nova</b> databases's <b>instances</b> table, column  <b>availability_zones</b> is not present(was there in earlier releases). You might be having the latest database and old nova-code.  Due to this, sqlalchemy is sending commands to fetch values based on availability_zones column but the table in database don't have that column. Due to this,  you are hitting the exception.<br>


<br></div>One solution is to manually add the extra column to the database to support the old code. But chances are that there will be more tables in database in which you need to do this procedure again and again.<br><br>


</div>Second solution is to have latest code for the Nova, that will solve the problem.<br><br></div>Thanks and Regards<span class="HOEnZb"><font color="#888888"><br>Rahul Sharma<br></font></span></div><div class="HOEnZb">

<div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 23, 2013 at 2:58 PM, Razique Mahroua <span dir="ltr"><<a href="mailto:razique.mahroua@gmail.com" target="_blank">razique.mahroua@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Did you run an upgrade? <div>try maybe : </div><div>$nova-manage db sync</div><div><br>


</div><div>(make a backup first)</div><div><br></div><div>regards,</div><div><br><div>
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:'Lucida Grande';word-spacing:0px"><span style="font-weight:normal;font-family:Helvetica"><b style="color:rgb(19,112,138)">Razique Mahroua</b></span><span style="font-weight:normal;font-family:Helvetica;color:rgb(19,112,138)"><b> - </b></span><span style="font-family:Helvetica"><span style="font-weight:normal;font-family:Helvetica"><b style="color:rgb(19,112,138)">Nuage & Co</b></span><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px;font-size:medium"><span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal">


<font color="#13708a"><a href="mailto:razique.mahroua@gmail.com" target="_blank">razique.mahroua@gmail.com</a></font></div><div style="font-style:normal;font-size:medium;font-family:Helvetica"><font color="#13708a">Tel : <a href="tel:%2B33%209%2072%2037%2094%2015" value="+33972379415" target="_blank">+33 9 72 37 94 15</a></font></div>


</span></span></span></span></span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Arial;word-spacing:0px">


<span><img height="125" width="125"></span>
</div>
<br><div><div>Le 23 mai 2013 à 11:19, Trinath Somanchi <<a href="mailto:trinath.somanchi@gmail.com" target="_blank">trinath.somanchi@gmail.com</a>> a écrit :</div><br><blockquote type="cite"><div><div>Hi Stackers-<div>


<br></div><div>I have installed nova-compute from the source code, with command, "python setup.py install". </div><div><br></div><div>Also, configured the configuration files.</div><div><br></div>
<div>When I start the "nova-compute" service, I get the following issues.</div><div><br></div><div><div>2013-05-23 14:37:27 3124 AUDIT nova.service [-] Starting compute node (version 2013.1-LOCALBRANCH:LOCALREVISION)</div>



<div>2013-05-23 14:37:27 3124 DEBUG nova.virt.libvirt.driver [-] Connecting to libvirt: <a>qemu:///system</a> _get_connection /usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/virt/libvirt/driver.py:340</div><div>


2013-05-23 14:37:28 INFO nova.compute.manager [req-f5cbe8c7-1fba-430d-965d-e6f72cef1ad2 None None] Updating host status</div>
<div>2013-05-23 14:37:28 DEBUG nova.virt.libvirt.driver [req-f5cbe8c7-1fba-430d-965d-e6f72cef1ad2 None None] Updating host stats update_status /usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/virt/libvirt/driver.py:3039</div>



<div>2013-05-23 14:37:28 DEBUG nova.virt.libvirt.driver [req-f5cbe8c7-1fba-430d-965d-e6f72cef1ad2 None None] Connecting to libvirt: <a>qemu:///system</a> _get_connection /usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/virt/libvirt/driver.py:340</div>



<div>2013-05-23 14:37:28 DEBUG nova.virt.libvirt.driver [req-f5cbe8c7-1fba-430d-965d-e6f72cef1ad2 None None] Updating host stats update_status /usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/virt/libvirt/driver.py:3039</div>



<div>2013-05-23 14:37:29 DEBUG nova.manager [req-f5cbe8c7-1fba-430d-965d-e6f72cef1ad2 None None] Notifying Schedulers of capabilities ... publish_service_capabilities /usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/manager.py:256</div>



<div>2013-05-23 14:37:29 3124 DEBUG nova.openstack.common.rpc.amqp [-] Making asynchronous fanout cast... fanout_cast /usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/openstack/common/rpc/amqp.py:385</div><div>



2013-05-23 14:37:29 3124 DEBUG nova.openstack.common.rpc.amqp [-] Pool creating new connection create /usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/openstack/common/rpc/amqp.py:58</div><div>2013-05-23 14:37:29 3124 INFO nova.openstack.common.rpc.common [-] Connected to AMQP server on <a href="http://10.232.91.81:5672/" target="_blank">10.232.91.81:5672</a></div>



<div>Traceback (most recent call last):</div><div>  File "/usr/lib/python2.7/site-packages/eventlet-0.12.1-py2.7.egg/eventlet/hubs/hub.py", line 346, in fire_timers</div><div>    timer()</div><div>  File "/usr/lib/python2.7/site-packages/eventlet-0.12.1-py2.7.egg/eventlet/hubs/timer.py", line 56, in __call__</div>



<div>    cb(*args, **kw)</div><div>  File "/usr/lib/python2.7/site-packages/eventlet-0.12.1-py2.7.egg/eventlet/greenthread.py", line 194, in main</div><div>    result = function(*args, **kwargs)</div><div>  File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/service.py", line 124, in run_server</div>



<div>    server.start()</div><div>  File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/service.py", line 399, in start</div><div>    self.binary)</div><div>  File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/db/api.py", line 158, in service_get_by_args</div>



<div>    return IMPL.service_get_by_args(context, host, binary)</div><div>  File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/db/sqlalchemy/api.py", line 107, in wrapper</div><div>    return f(*args, **kwargs)</div>



<div>  File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/db/sqlalchemy/api.py", line 411, in service_get_by_args</div><div>    filter_by(binary=binary).\</div><div>  File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/orm/query.py", line 2156, in first</div>



<div>    ret = list(self[0:1])</div><div>  File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/orm/query.py", line 2023, in __getitem__</div><div>    return list(res)</div><div>



  File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/orm/query.py", line 2227, in __iter__</div><div>    return self._execute_and_instances(context)</div><div>  File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances</div>



<div>    result = conn.execute(querycontext.statement, self._params)</div><div>  File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/engine/base.py", line 1449, in execute</div>



<div>    params)</div><div>  File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement</div><div>    compiled_sql, distilled_params</div>



<div>  File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/engine/base.py", line 1698, in _execute_context</div><div>    context)</div><div>  File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/engine/base.py", line 1850, in _handle_dbapi_exception</div>



<div>    None, sys.exc_info()[2]</div><div>OperationalError: (OperationalError) (1054, "Unknown column 'services.availability_zone' in 'field list'") 'SELECT services.created_at AS services_created_at, services.updated_at AS services_updated_at, services.deleted_at AS services_deleted_at, services.deleted AS services_deleted, <a href="http://services.id/" target="_blank">services.id</a> AS services_id, services.host AS services_host, services.`binary` AS services_binary, services.topic AS services_topic, services.report_count AS services_report_count, services.disabled AS services_disabled, services.availability_zone AS services_availability_zone \nFROM services \nWHERE services.deleted = %s AND services.host = %s AND services.`binary` = %s \n LIMIT %s' (0, 'ComputeNode-1', 'nova-compute', 1)</div>



<div>2013-05-23 14:37:29 3124 CRITICAL nova [-] (OperationalError) (1054, "Unknown column 'services.availability_zone' in 'field list'") 'SELECT services.created_at AS services_created_at, services.updated_at AS services_updated_at, services.deleted_at AS services_deleted_at, services.deleted AS services_deleted, <a href="http://services.id/" target="_blank">services.id</a> AS services_id, services.host AS services_host, services.`binary` AS services_binary, services.topic AS services_topic, services.report_count AS services_report_count, services.disabled AS services_disabled, services.availability_zone AS services_availability_zone \nFROM services \nWHERE services.deleted = %s AND services.host = %s AND services.`binary` = %s \n LIMIT %s' (0, 'ComputeNode-1', 'nova-compute', 1)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova Traceback (most recent call last):</div><div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/bin/nova-compute", line 5, in <module></div><div>2013-05-23 14:37:29 3124 TRACE nova     pkg_resources.run_script('nova==2013.1', 'nova-compute')</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 505, in run_script</div><div>2013-05-23 14:37:29 3124 TRACE nova     self.require(requires)[0].run_script(script_name, ns)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1245, in run_script</div><div>2013-05-23 14:37:29 3124 TRACE nova     execfile(script_filename, namespace, namespace)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/EGG-INFO/scripts/nova-compute", line 60, in <module></div><div>2013-05-23 14:37:29 3124 TRACE nova     service.wait()</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/service.py", line 667, in wait</div><div>2013-05-23 14:37:29 3124 TRACE nova     _launcher.wait()</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/service.py", line 186, in wait</div><div>2013-05-23 14:37:29 3124 TRACE nova     super(ServiceLauncher, self).wait()</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/service.py", line 156, in wait</div><div>2013-05-23 14:37:29 3124 TRACE nova     service.wait()</div>


<div>
2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/eventlet-0.12.1-py2.7.egg/eventlet/greenthread.py", line 168, in wait</div><div>2013-05-23 14:37:29 3124 TRACE nova     return self._exit_event.wait()</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/eventlet-0.12.1-py2.7.egg/eventlet/event.py", line 116, in wait</div><div>2013-05-23 14:37:29 3124 TRACE nova     return hubs.get_hub().switch()</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/eventlet-0.12.1-py2.7.egg/eventlet/hubs/hub.py", line 187, in switch</div><div>2013-05-23 14:37:29 3124 TRACE nova     return self.greenlet.switch()</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/eventlet-0.12.1-py2.7.egg/eventlet/greenthread.py", line 194, in main</div><div>2013-05-23 14:37:29 3124 TRACE nova     result = function(*args, **kwargs)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/service.py", line 124, in run_server</div><div>2013-05-23 14:37:29 3124 TRACE nova     server.start()</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/service.py", line 399, in start</div><div>2013-05-23 14:37:29 3124 TRACE nova     self.binary)</div><div>



2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/db/api.py", line 158, in service_get_by_args</div><div>2013-05-23 14:37:29 3124 TRACE nova     return IMPL.service_get_by_args(context, host, binary)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/db/sqlalchemy/api.py", line 107, in wrapper</div><div>2013-05-23 14:37:29 3124 TRACE nova     return f(*args, **kwargs)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/nova-2013.1-py2.7.egg/nova/db/sqlalchemy/api.py", line 411, in service_get_by_args</div><div>2013-05-23 14:37:29 3124 TRACE nova     filter_by(binary=binary).\</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/orm/query.py", line 2156, in first</div><div>2013-05-23 14:37:29 3124 TRACE nova     ret = list(self[0:1])</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/orm/query.py", line 2023, in __getitem__</div><div>2013-05-23 14:37:29 3124 TRACE nova     return list(res)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/orm/query.py", line 2227, in __iter__</div><div>2013-05-23 14:37:29 3124 TRACE nova     return self._execute_and_instances(context)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances</div><div>2013-05-23 14:37:29 3124 TRACE nova     result = conn.execute(querycontext.statement, self._params)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/engine/base.py", line 1449, in execute</div><div>2013-05-23 14:37:29 3124 TRACE nova     params)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement</div><div>2013-05-23 14:37:29 3124 TRACE nova     compiled_sql, distilled_params</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/engine/base.py", line 1698, in _execute_context</div><div>2013-05-23 14:37:29 3124 TRACE nova     context)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova   File "/usr/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-ppc.egg/sqlalchemy/engine/base.py", line 1850, in _handle_dbapi_exception</div><div>2013-05-23 14:37:29 3124 TRACE nova     None, sys.exc_info()[2]</div>



<div>2013-05-23 14:37:29 3124 TRACE nova OperationalError: (OperationalError) (1054, "Unknown column 'services.availability_zone' in 'field list'") 'SELECT services.created_at AS services_created_at, services.updated_at AS services_updated_at, services.deleted_at AS services_deleted_at, services.deleted AS services_deleted, <a href="http://services.id/" target="_blank">services.id</a> AS services_id, services.host AS services_host, services.`binary` AS services_binary, services.topic AS services_topic, services.report_count AS services_report_count, services.disabled AS services_disabled, services.availability_zone AS services_availability_zone \nFROM services \nWHERE services.deleted = %s AND services.host = %s AND services.`binary` = %s \n LIMIT %s' (0, 'ComputeNode-1', 'nova-compute', 1)</div>



<div>2013-05-23 14:37:29 3124 TRACE nova </div><div><br></div><div>With respect to the above issue, I feel there exists some access to an unknown column in the DB tables.</div><div><br></div><div>The SERVICES table of the nova DB is as below</div>



<div><br></div><div><div>mysql> desc services;</div><div>+--------------+--------------+------+-----+---------+----------------+</div><div>| Field        | Type         | Null | Key | Default | Extra          |</div><div>



+--------------+--------------+------+-----+---------+----------------+</div><div>| created_at   | datetime     | YES  |     | NULL    |                |</div><div>| updated_at   | datetime     | YES  |     | NULL    |                |</div>



<div>| deleted_at   | datetime     | YES  |     | NULL    |                |</div><div>| id           | int(11)      | NO   | PRI | NULL    | auto_increment |</div><div>| host         | varchar(255) | YES  |     | NULL    |                |</div>



<div>| binary       | varchar(255) | YES  |     | NULL    |                |</div><div>| topic        | varchar(255) | YES  |     | NULL    |                |</div><div>| report_count | int(11)      | NO   |     | NULL    |                |</div>



<div>| disabled     | tinyint(1)   | YES  |     | NULL    |                |</div><div>| deleted      | int(11)      | YES  |     | NULL    |                |</div><div>+--------------+--------------+------+-----+---------+----------------+</div>



</div><div><br></div><div>Kindly help me resolve the issue.</div><div><br></div><div><br></div><div><br></div>-- <br>Regards,<br>----------------------------------------------<br>Trinath Somanchi,<div><a href="tel:%2B91%209866%20235%20130" value="+919866235130" target="_blank">+91 9866 235 130</a></div>




</div></div></div>
_______________________________________________<br>Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>


Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>


</blockquote></div><br></div></div><br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>