Skip to content

RO_management

Carolina Fernández edited this page Jun 19, 2015 · 5 revisions

Home > Management > RO


Disclaimer: The following management manual assumes that configuration of the whole software has been done according to the configuration manual.

Basic Operations

Typical usage for (MR)O:

# Start
/etc/init.d/felix-mro start  # MRO
/etc/init.d/felix-ro start   # RO

# Stop
/etc/init.d/felix-mro stop  # MRO
/etc/init.d/felix-ro stop   # RO

# Restart
/etc/init.d/felix-mro restart  # MRO
/etc/init.d/felix-ro restart   # RO

# Clean database (peers are kept) and restart
/etc/init.d/felix-mro force-reload  # MRO
/etc/init.d/felix-ro force-reload   # RO

Troubleshooting

Managing consistency

Cleaning up the database

(M)RO retrieves information based on the resources advertised by its managed ROs (MRO) or RMs (MRO, RO). As these resources may change in a future (some new may be added, others may be removed), there is sometimes necessary to clean up the RO database and restart it.

If you find a message like ObjectId(...) not found in a log or as an output returned by a GENIv3 method; please stop the (M)RO, clean its database and restart it:

  1. Execute special command in initscript:

    /etc/init.d/felix-mro force-reload  # MRO
    /etc/init.d/felix-ro force-reload  # RO
    

If this did not work or is not available in your deployment, do the following:

  1. Stop (M)RO bykill -9 $PID on the correct process(es)

  2. Enter (M)RO database. In a console:

    # Access MongoDB console
    $ mongo
    root@dc1-ro:~# mongo
    MongoDB shell version: 2.0.6
    connecting to: test
    
    # Show list of databases and choose the proper one
    > show dbs
    felix_mro	0.203125GB
    felix_ro	0.203125GB
    local	(empty)
    test	(empty)
    
    # For MRO
    > use felix_mro
    switched to db felix_mro
    # For RO
    > use felix_ro
    switched to db felix_ro
    
    # Remove (drop) database
    > db.dropDatabase()
    
  3. Add the peers to (M)RO (only once after cleaning!):

    ## RO: manually inserting data for managed RMs
    cd /opt/felix/resource-orchestrator/modules/resource/orchestrator/deploy
    ./configure_rms.sh
    
    # OR
    
    # Running a script where the entries are already configured (create one if it does not exist)
    cd /opt/felix/resource-orchestrator/modules/resource/orchestrator/src/admin/db
    ./add_local_rms.sh
    
    ## MRO: manually inserting data for managed ROs and RMs
    cd /opt/felix/resource-orchestrator-mro/modules/resource/orchestrator/deploy
    ./configure_rms.sh
    
    
  4. Restart (M)RO:

    ## For MRO
    
    cd /opt/felix/resource-orchestrator-mro/modules/resource/orchestrator/src
    # Use init script
    /etc/init.d/felix-mro start
    
    ## For RO
    
    cd /opt/felix/resource-orchestrator/modules/resource/orchestrator/src
    # Use init script
    /etc/init.d/felix-ro start
    
    # OR
    
    # Send process to background
    python main.py > /dev/null 1>&2 &
    
Clone this wiki locally