Ask Your Question
2

I want to know the database information where the details for addition of nodes are maintained ?

asked 2015-04-29 05:49:09 -0500

wolfsharad24 gravatar image

Hi all,

I want to know the specific names of the Databases that are used to store the information of newly added nodes ? In which exact openstack source-file this addition of node details is added to the DB ?

Thanks in advance !!

edit retag flag offensive close merge delete

Comments

When we are using the Dashboard for undercloud, before we go for overcloud deployment we do register the nodes. When this registration is happening through GUI-Dashboard, in the background what will happen and where the data is stored regarding the details we give in that register node?

wolfsharad24 gravatar imagewolfsharad24 ( 2015-04-30 07:46:26 -0500 )edit

I need to locate the code from the source-code of OpenStack that is doing the register operation of nodes...

wolfsharad24 gravatar imagewolfsharad24 ( 2015-04-30 07:47:13 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-04-29 10:30:10 -0500

What type of nodes, there are additional steps lets say for a compute node.

This may help you get what you're looking for http://thornelabs.net/2014/08/03/dele...

edit flag offensive delete link more

Comments

The question you were asked is :-

Which python module or library is responsible for maintaining table compute_nodes in nova database on
Controller , when new compute node is added or removed ?

That is not an answer. I am very sorry.

dbaxps gravatar imagedbaxps ( 2015-04-29 11:15:00 -0500 )edit

the above link is very helpful thank you so much, but in what file or module this db updation is done in the actual OpenStack source code ??

wolfsharad24 gravatar imagewolfsharad24 ( 2015-04-30 00:53:38 -0500 )edit
0

answered 2015-04-29 14:08:34 -0500

dbaxps gravatar image

updated 2015-04-29 14:32:42 -0500

Using answer field as comment due to known limitations
I am unable address your question exactly, however I can post a piece of python code sufficient to understand how it can be done.
Sample 1

/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py
. . . . . 
def compute_node_get_all(context, no_date_fields):
. . . . . . 
compute_nodes = []
    for proxy in compute_node_rows:
        node = dict(proxy.items())
        node['service'] = services.get(proxy['service_id'])

        compute_nodes.append(node)

    return compute_nodes

Sample 2 - nova/db/sqlalchemy/migrate_repo/versions/251_add_numa_topology_to_comput_nodes.py

from sqlalchemy import Column
from sqlalchemy import MetaData
from sqlalchemy import Table
from sqlalchemy import Text

def upgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine
    compute_nodes = Table('compute_nodes', meta, autoload=True)
    shadow_compute_nodes = Table('shadow_compute_nodes', meta, autoload=True)
    numa_topology = Column('numa_topology', Text, nullable=True)
    shadow_numa_topology = Column('numa_topology', Text, nullable=True)
    compute_nodes.create_column(numa_topology)
    shadow_compute_nodes.create_column(shadow_numa_topology)
edit flag offensive delete link more

Comments

Thank you so much. I am trying to understand the source code of OpenStack. I have downloaded the source code of OpenStack from the GitHub.In this context, I want to know the code that is used when we add/Register a new node in undercloud.where the node information will be stored? how?

wolfsharad24 gravatar imagewolfsharad24 ( 2015-04-30 00:48:48 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-04-29 05:49:09 -0500

Seen: 118 times

Last updated: Apr 29 '15