<div dir="ltr">I am aware of this work, in fact I reused a column (pci_stats) in the compute_nodes table to store a JSON blob.<div>I track the resource in the resource_tracker and update the column and then use the blob in a filter.</div>
<div>Maybe I should reformulate my question, How can I add a column to the table and use it in resource_tracker without breaking something ?</div><div><br></div><div>Best regards,<br><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/12/2  <span dir="ltr"><<a href="mailto:openstack-dev-request@lists.openstack.org" target="_blank">openstack-dev-request@lists.openstack.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 02 Dec 2013 12:06:21 -0500<br>
From: Russell Bryant <<a href="mailto:rbryant@redhat.com">rbryant@redhat.com</a>><br>
To: <a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a><br>
Subject: Re: [openstack-dev] [nova][database] Update compute_nodes<br>
        table<br>
Message-ID: <<a href="mailto:529CBE0D.608@redhat.com">529CBE0D.608@redhat.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
On 12/02/2013 11:47 AM, Abbass MAROUNI wrote:<br>
> Hello,<br>
><br>
> I'm looking for way to a add new attribute to the compute nodes by<br>
>  adding a column to the compute_nodes table in nova database in order to<br>
> track a metric on the compute nodes and use later it in nova-scheduler.<br>
><br>
> I checked the  sqlalchemy/migrate_repo/versions and thought about adding<br>
> my own upgrade then sync using nova-manage db sync.<br>
><br>
> My question is :<br>
> What is the process of upgrading a table in the database ? Do I have to<br>
> modify or add a new variable in some class in order to associate the<br>
> newly added column with a variable that I can use ?<br>
<br>
Don't add this.  :-)<br>
<br>
There is work in progress to just have a column with a json blob in it<br>
for additional metadata like this.<br>
<br>
<a href="https://blueprints.launchpad.net/nova/+spec/extensible-resource-tracking" target="_blank">https://blueprints.launchpad.net/nova/+spec/extensible-resource-tracking</a><br>
<a href="https://wiki.openstack.org/wiki/ExtensibleResourceTracking" target="_blank">https://wiki.openstack.org/wiki/ExtensibleResourceTracking</a><br>
<br>
--<br>
Russell Bryant<br>
</blockquote></div><br></div></div></div>