oar.modules

oar.modules.almighty

This module is the OAR server. It decides what actions must be performed. It is divided into 3 processes:

  • One listens to a TCP/IP socket. It waits information or commands from OAR user program or from the other modules.

  • Another one deals with commands thanks to an automaton and launch right modules one after one.

  • The third one handles a pool of forked processes that are used to launch and stop the jobs.

oar.modules.almighty.signal_handler(sig, stack)[source]
oar.modules.almighty.launch_command(command)[source]

Launch the command line passed in parameter

oar.modules.almighty.start_greta() subprocess.Popen[source]

Start oar.kao.greta

oar.modules.almighty.check_greta(greta, logger)[source]

Check the presence greta process

oar.modules.almighty.check_for_villains()[source]

Start oar.modules.sarko

oar.modules.almighty.check_nodes()[source]

Start oar.modules.finaud

oar.modules.almighty.leon()[source]

Start oar.modules.leon

oar.modules.almighty.nodeChangeState()[source]

Start oar.modules.node_change_state

class oar.modules.almighty.Almighty[source]

Bases: object

meta_scheduler()[source]

Start oar.kao.meta_sched

start_companions()[source]

Start appendice oar.modules.appendice_proxy and oar.modules.bipbip_commander commander processes

time_update()[source]
set_appendice_timeout(timeout)[source]

Set timeout appendice socket

qget(timeout)[source]

function used by the main automaton to get notifications from appendice

add_command(command)[source]

as commands are just notifications that will handle all the modifications in the base up to now, we should avoid duplication in the command file

read_commands(timeout=5000)[source]

read commands until reaching the maximal successive read value or having read all of the pending commands

run(loop=True)[source]

Start oar.modules.almigthy main loop.

oar.modules.almighty.main()[source]

oar.modules.appendice_proxy

Proxy to help incremental transition toward ZMQ use between version 2.x OAR’s modules and version 3.x

class oar.modules.appendice_proxy.AppendiceProxy[source]

Bases: object

run(loop=True)[source]
oar.modules.appendice_proxy.main()[source]

oar.modules.bipbip

oar.modules.bipbip_commander

Process that launches and manages bipbip and leon processes.

Commands:
  • OAREXEC

  • OARRUNJOB

  • LEONEXTERMINATE

TODO: jsonify ?

Example:

{
    "job_id": 5,
    "cmd": "LEONEXTERMINATE"
    "args": [5]
}
oar.modules.bipbip_commander.launch_command(command, logger)[source]

Launch the command line passed in parameter

oar.modules.bipbip_commander.bipbip_leon_executor(command: dict[str, Any], leon_command: str, bipbip_command: str, logger)[source]
class oar.modules.bipbip_commander.BipbipCommander(config=None)[source]

Bases: object

set_notification_timeout(timeout)[source]

Set timeout for zmq notification socket

run(loop=True)[source]
oar.modules.bipbip_commander.main()[source]

oar.modules.finaud

Check Alive and Suspected nodes.

class oar.modules.finaud.Finaud(config)[source]

Bases: object

run(session)[source]
oar.modules.finaud.main()[source]

oar.modules.greta

This module is responsible of the advanced management of the standby mode of the nodes. It’s related to the energy saving features of OAR. It is an optional module activated with the ENERGY_SAVING_INTERNAL=yes configuration variable.

It runs as a fourth oar.modules.almigthy daemon and opens a pipe on which it receives commands from the MetaScheduler. It also communicates with a library called “WindowForker” that is responsible of forking shut-down/wake-up commands in a way that not too much commands are started at a time.


This module is responsible of waking up / shutting down nodes when the scheduler decides it (writes it on a named pipe)

CHECK command is sent on the zmq PULL socket to oar.modules.greta from different modules:

  • By oar.kao.meta_sched if there is no node to wake up / shut down in order.
    • to check timeout and check memorized nodes list <TODO>

    • to check booting nodes status

  • TOFINISH: Greta will integrate window guarded launching processes

  • By windowForker module:
    • to avoid zombie process

    • to messages received in queue (IPC)

Example of received message:

{
    "cmd": "WAKEUP",
    "nodes": ["node1", "node2" ]
}
oar.modules.greta.fill_timeouts(str_timeouts)[source]

Timeout to consider a node broken (suspected) if it has not woken up The value can be an integer of seconds or a set of pairs. For example, “1:500 11:1000 21:2000” will produce a timeout of 500 seconds if 1 to 10 nodes have to wakeup, 1000 seconds if 11 t 20 nodes have to wake up and 2000 seconds otherwise. ENERGY_SAVING_NODE_MANAGER_WAKEUP_TIMEOUT=”900”

oar.modules.greta.get_timeout(timeouts, nb_nodes)[source]
class oar.modules.greta.GretaClient(config, logger)[source]

Bases: object

Greta client part used by metascheduler to interact with Greta server

check_nodes()[source]
halt_nodes(nodes)[source]
wake_up_nodes(nodes)[source]
class oar.modules.greta.Greta(config, logger)[source]

Bases: object

run(session=None, loop=True)[source]
oar.modules.greta.command_executor(cmd_node, config, logger)[source]
class oar.modules.greta.WindowForker(window_size, timeout, config, logger)[source]

Bases: object

add_commands_toLaunch(session, commands)[source]
check_executors(session, config, nodes_list_running)[source]
oar.modules.greta.main()[source]

oar.modules.leon

oar.modules.node_change_state

oar.modules.sarko

Module contents