13.0 Resource management

A primary motivation in Legion's design is flexibility and transparency: programs can be distributed and run on widely distributed resources without the user having to engage in complex, time-consuming negotiations with individual site administrators. However, in order to allow sites to protect their resources against unauthorized or malicious use, Legion provides tools to allow system administrators can maintain their local policies. Final authority over the use of a resource remains with each resource's administrators.

There are three objects for managing your Legion resources: the Collection, the Scheduler, and the Enactor. There are a corresponding set of command-line tools to control the objects. A more detailed discussion of these objects is in Resource management in the Developer Manual, but in brief they carry out the following functions.

Resource managers can use scheduling-related commands (below) to set up system, class, and instance level scheduling policies.

13.1 Scheduling-related commands

There are a several commands that can be used to set up an individual Legion's scheduling process and a class's or instance's host and vault placement policy. Please see Scheduling support in the Reference Manual for details of these command's syntax and usage.

13.1.1 Configuring the Scheduler

The legion_config_scheduler command configures a basic Legion Scheduler's helper objects. Use it to assign a particular Collection and Enactor to a basic Legion Scheduler or vice versa.

It can also be used to query which helper objects have been set for a basic Legion Scheduler. The example below shows the LOID of the default scheduler object's enactor.

$ legion_config_scheduler -c /etc/DefaultScheduler -get_enactor   
Current enactor is: 1.36baeb09.66000000.01000000.000001fc...
13.1.2 Setting a class's default Scheduler

This legion_set_scheduler command sets a specific class's default Scheduler. The class will then use its assigned scheduler object to determine which hosts and vaults should manage its instances (i.e., determine placements for the class's instances). The example below sets SchedulerFoo as the default scheduler object for ClassFoo.

$ legion_set_scheduler -c /class/ClassFoo -c SchedulerFoo

All of ClassFoo's instances will be placed with SchedulerFoo.

13.1.3 Setting Scheduler policy

The legion_set_scheduler_policy command sets a class object's policy for using its default Scheduler. There are two policy options, which determine whether or not the class uses its default scheduler if the scheduler object is not active. Depending on its type, a class may require a policy which does not use an inert Scheduler. If not, classes should have a default placement available

13.1.4 Adding resources to a Collection

There are three commands for controlling the Collection object. Objects can be added with legion_join_collection. The example below adds HostFoo to the default Collection, although any Legion object can be added to a Collection.

$ legion_join_collection -c /etc/Collection -c /hosts/HostFoo

The legion_leave_collection command removes objects from the Collection object.

The legion_query_collection prints a list of which objects are currently part of a given Collection. The legion_query_collection command uses MESSIAHS Interface Language (MIL) query strings (see legion_query_collection in the Reference Manual for query string examples and More about the Scheduler in the Developer Manual for relevant MIL interfaces). The example below returns the list of Linux host objects that are part of the default Collection.

$ legion_query_collection -c /etc/Collection \
2 hits:

Back to System Administrator Manual Table of Contents

Directory of Legion 1.5 Manuals