wiki:Internal/RunningInventory

Version 16 (modified by jkol, 9 years ago) ( diff )

How to Run Inventory

To run inventory preform the following (ALL STEPS AS ROOT):

From repository1

  1. Goto the tfptboot directory and make a symbolic link for the appropriate domain:
    cd /tftpboot/pxelinux.cfg/
    
    ln -s inventory-nb-grid 0A0A
    
DomainSourceTarget
Gridinventory-nb-grid0A0A
SB1inventory-nb-sb10A0B
SB2inventory-nb-sb20A0C
SB3inventory-nb-sb30A0D
SB4inventory-nb-sb40A0E
SB5inventory-nb-sb50A0F
SB6inventory-nb-sb60A10
SB7inventory-nb-sb70A11
SB8inventory-nb-sb80A12
SB9inventory-nb-sb90A13
Outdoorinventory-nb-outdoor0A28
  1. Goto the /export/nfsroot/etc/resolvconf/resolv.conf.d and make a symbolic link to head for the proper domain:
    cd /export/nfsroot/etc/resolvconf/resolv.conf.d
    
    ln -s head.grid head
    
DomainSource
Gridhead.grid
SB1head.sb1
SB2head.sb2
SB3head.sb3
SB4head.sb4
SB5head.sb5
SB6head.sb6
SB7head.sb7
SB8head.sb8
SB9head.sb9
Outdoorhead.outdoor

From console (grid or sandbox)

  1. If you are inventorying grid:

Run the run_inventory script (this script will take 45 minutes to run):

cd /root/inventory/
./run_inventory.rb

Starting Output will look like:

root@console.grid:/root/inventory# ./run_inventory.rb 
/usr/lib/ruby/vendor_ruby/restclient/response.rb:11: warning: method redefined; discarding old body
I, [2013-06-26T16:55:18.502861 #30052]  INFO -- : Database: Restfull DB connected to http://internal1.orbit-lab.org:5054/inventory/
=================== grid.orbit-lab.org  ====================
=================== First pass ====================
Turning off 400 nodes
Sleep for a minute
Turning on 400 nodes
Give it 900 to collect
.
.
.

If you are inventorying a sandbox:

Turn on (or restart) all nodes, so they boot into the inventory pxe-image:

omf tell -a on -t all

Check the inventory page for the sandbox you are inventorying and monitor the INV_check_in attribute:

DomainURL
Gridhttp://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.grid.orbit-lab.org&attribute=INV_check_in
SB1http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb1.orbit-lab.org&attribute=INV_check_in
SB2http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb2.orbit-lab.org&attribute=INV_check_in
SB3http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb3.orbit-lab.org&attribute=INV_check_in
SB4http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb4.orbit-lab.org&attribute=INV_check_in
SB5http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb5.orbit-lab.org&attribute=INV_check_in
SB6http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb6.orbit-lab.org&attribute=INV_check_in
SB7http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb7.orbit-lab.org&attribute=INV_check_in
SB8http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb8.orbit-lab.org&attribute=INV_check_in
SB9http://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.sb9.orbit-lab.org&attribute=INV_check_in
Outdoorhttp://internal1.orbit-lab.org:5054/inventory/attribute_list?set=node*.outdoor.orbit-lab.org&attribute=INV_check_in

Wait until all the nodes check in, then proceed to next step.

From repository1

  1. Break the symbolic link!!! If this is not done the next person to use the grid/sandbox will have a bad time.

Note: Where 0A0A is the hex target set in Step 1 (example):

rm 0A0A

From internal1

  1. Update the inventory service "domain topology" cache (which nodes belong to what testbeds) by visiting the following URL (takes 2-3 minutes to complete):
http://internal1.orbit-lab.org:5054/inventory/update_cache
  1. Update topologies:
    cd /usr/share/omf-aggmgr-5.4/omf-aggmgr/ogs_inventory/scripts
    
    ./mktopo all
    
    Note: This takes some time to preform all the actions, and the omf-agg-manager restarts every even hour on the 11th minute. If the ruby process is running at that time it will fail.
Note: See TracWiki for help on using the wiki.