wiki:Software/eAM/aInventory/fScheduler

Version 9 (modified by ssugrim, 10 years ago) ( diff )

Domain management

Adding new testbed

Currently, information about resources i.e. testbeds are kept into 2 databases, scheduler database (newScheduler) and inventory database (inventory54). To add new virtual domain we need to update both databases. There is a script addVirtualDomais.rb on internal2, /usr/share/omf-aggmgr-5.4/omf-aggmgr/ogs_loginCommon/w. Calling that script will add virtual domains into inventory database and prepare sql script to run from mysql to update scheduler database.

ruby addVirtualDomais.rb listOfdomains.txt

listOfDomains.txt is file with following information

domainName; <listo of nodes that belong to new domain>; <domain description>

Output file is machines.sql There is also file testbed_attributes.yaml to define necessary testbed information.

Make testbed inactive

To remove testbed from scheduler page just mark it inactive into both databases.

For scheduler databases run

UPDATE resources set status = 'u' where name='<testbed_name>';

For inventory, change INF_status attribute to 0:

 wget -qO- 'http://new.orbit-lab.org:5054/inventory/attribute_modify?name=<testbed_name>&attribute=INF_status&value=0

Updating testbed information

To change testbed name, make it active and change list of nodes do the following:

Scheduler database
  • Make domain active in scheduler database i.e set status to 'a':
    Update newScheduler.resources set status='a' where name = '<old_name>';
    
  • Change name and description:
    Update newScheduler.resources set name='<new_name>', notes='node3-3 i node4-10' where name = '<old_name>';
    

or with one statement

Update newScheduler.resources set status='a', name='<new_name>', notes='node3-3 i node4-10' where name ='<old_name>';
Inventory database
  • Change name

It's not possible to change resource name using inventory service. This can be done directly into database. Anytime you can delete resource with <old_name> and create new one. To change resource name run flowing script:

UPDATE inventory54.resource SET name='<new_name>' where name='<old_name>';
  • Make it active, i.e set INF_status to 1 if domain should appear on status page
     wget -qO- 'http://new.orbit-lab.org:5054/attribute_modify?name=<new_name&attribute=INF_status&value=1
    

Domain have to have INF_x_max and INF_y_max attributes. It is necessary to restart status service after these changes.

  • Change description
     wget -qO- 'http://new.orbit-lab.org:5054/attribute_modify?name=<new_name>&attribute=INF_description&value=<new_description>
    
Define list of nodes
  • Delete old list of nodes - currently, there is no possibility to do it trough service, it has to be done into database directly
    DELETE FROM inventory54.relations WHERE subject_id=(SELECT id FROM inventory54.resources where name='<new_name>');
    

Pay attention, <new_name> is used because name is already changed. If you this before changing the name, than use <old_name>.

  • Add nodes - do the flowing for each node that belongs to resource i.e. testbed
     wget -qO- 'http://new.orbit-lab.org:5054/relation_add?parent=<new_name>&child=<node_name>
    
Note: See TracWiki for help on using the wiki.