Test the resource leasing model

The following instructions explain how to configure the lease model on two clusters. Cluster2 will be the resource provider; it will export hosts to cluster1.

  1. In the provider cluster, edit the LSF_TOP/conf/lsbatch/cluster_name/configdir/lsb.resources file to specify the hosts to be exported.

    For example, in cluster2, one job slot each on hostE and hostF will be exported and can be used by cluster1:

    Begin HostExport
    PER_HOST     = hostE hostF
    SLOTS        = 1
    DISTRIBUTION = ([cluster1, 100])
    End HostExport
  2. Reconfigure the cluster:
    % badmin reconfig
  3. Use the bclusters command to make sure the cluster is configured correctly.

    For example, in cluster2:

    % bclusters
    ...
    [Resourse Lease Information]
    REMOTE_CLUSTER  RESOURCE_FLOW   STATUS
    cluster1        EXPORT          conn
  4. In the consumer cluster, edit the LSF_TOP/conf/lsbatch/cluster_name/configdir/lsb.queues file and add a queue that will use the hosts borrowed from the provider cluster as if they were local resources. For example, in cluster1:
    Begin Queue
    QUEUE_NAME  = ssimodel
    HOSTS       = all@cluster2
    DESCRIPTION = Jobs in this queue will use cluster2 hosts
    End Queue
  5. Reconfigure the cluster:
    % badmin reconfig
  6. Use the bclusters command to make sure the queue is configured correctly.

    For example, in cluster1:

    % bclusters
    ...
    [Resourse Lease Information ]
    REMOTE_CLUSTER  RESOURCE_FLOW   STATUS
    cluster2        IMPORT          conn
  7. Submit a job to the queue in cluster1. It must run on a host borrowed from cluster2.

Example

Submit a job to the queue named ssimodel in cluster1:

% bsub -q ssimodel -R “type==any” sleep 500
Job <204> is submitted to queue <ssimodel>.
% bjobs
JOBID   USER    STAT  QUEUE    FROM_HOST        EXEC_HOST      JOB_NAME   SUBMIT_TIME
204     user1   RUN   ssimodel hostA            hostE@cluster2 sleep 500  Nov 13 12:15
% bhosts
HOST_NAME          STATUS       JL/U   MAX  NJOBS   RUN  SSUSP  USUSP    RSV
hostE@cluster2     ok         -      1    1       1    0      0        0
hostA              ok          -      -    0       0    0      0        0

You can also view this job from cluster2, where it has a different job ID:

% bjobs
JOBID  USER  STAT  QUEUE            FROM_HOST       EXEC_HOST  JOB_NAME   SUBMIT_TIME
854   user1  RUN  ssimodel@cluster1 hostA@cluster1  hostE      sleep 500  Nov 13 12:15