Hi Abbass,

I guess you read the blueprint Russell referred to. I think you actually are 
saying the same - but please read steps below and tell me if they don't cover 
what you want.

This is what it will do:

1.       Add a column to the compute_nodes table for a JSON blob

2.       Add plug-in framework for additional resources in resource_tacker 
(just like filters in filter scheduler)

3.       Resource plugin classes will implement things like:

a.       Claims test method

b.      "add your data here" method (so it can populate the JSON blob)

4.       Additional column is available in host_state at filter scheduler

You will then be able to do any or all of the following:

1.       Add new parameters to requests in extra_specs

2.       Add new filter/weight classes as scheduler plugins

a.       Will have access to filter properties (including extra_specs)

b.      Will have access to extra resource data (from compute node)

c.       Can generate limits

3.       Add new resource classes as scheduler plugins

a.       Will have access to filter properties (including extra specs)

b.      Will have access to limits (from scheduler)

c.       Can generate extra resource data to go to scheduler

Does this match your needs?

There are also plans to change how data goes from compute nodes to scheduler 
(i.e. not through the database). This will remove the database from the 
equation. But that can be kept as a separate concern.

Paul.



From: Abbass MAROUNI [mailto:abbass.maro...@virtualscale.fr]
Sent: 03 December 2013 08:54
To: openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [nova][database] Update compute_nodes table

I am aware of this work, in fact I reused a column (pci_stats) in the 
compute_nodes table to store a JSON blob.
I track the resource in the resource_tracker and update the column and then use 
the blob in a filter.
Maybe I should reformulate my question, How can I add a column to the table and 
use it in resource_tracker without breaking something ?

Best regards,

2013/12/2 
<openstack-dev-requ...@lists.openstack.org<mailto:openstack-dev-requ...@lists.openstack.org>>


----------------------------------------------------------------------

Message: 1
Date: Mon, 02 Dec 2013 12:06:21 -0500
From: Russell Bryant <rbry...@redhat.com<mailto:rbry...@redhat.com>>
To: openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>
Subject: Re: [openstack-dev] [nova][database] Update compute_nodes
        table
Message-ID: <529cbe0d....@redhat.com<mailto:529cbe0d....@redhat.com>>
Content-Type: text/plain; charset=ISO-8859-1

On 12/02/2013 11:47 AM, Abbass MAROUNI wrote:
> Hello,
>
> I'm looking for way to a add new attribute to the compute nodes by
>  adding a column to the compute_nodes table in nova database in order to
> track a metric on the compute nodes and use later it in nova-scheduler.
>
> I checked the  sqlalchemy/migrate_repo/versions and thought about adding
> my own upgrade then sync using nova-manage db sync.
>
> My question is :
> What is the process of upgrading a table in the database ? Do I have to
> modify or add a new variable in some class in order to associate the
> newly added column with a variable that I can use ?

Don't add this.  :-)

There is work in progress to just have a column with a json blob in it
for additional metadata like this.

https://blueprints.launchpad.net/nova/+spec/extensible-resource-tracking
https://wiki.openstack.org/wiki/ExtensibleResourceTracking

--
Russell Bryant

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to