Submitting jobs to launch instances from OpenStack
Use the bsub command to submit jobs that require instances that are launched from OpenStack as the resource provider. Use the bhosts to monitor borrowed hosts. Use the bhosts command to monitor host status.
About this task
Procedure
-
Use the bsub command to submit jobs that require instances that are launched
from OpenStack as the resource provider.
The following bsub command with no options submits a job that triggers a launch demand when no resources are available in the LSF cluster:
You also can use the openstackhost resource in a select[] resource requirement string. Because the openstackhost resource is defined in a template as a Boolean attribute, it triggers a launch demand:bsub myjob
bsub -R "select[openstackhost]" myjob
-
Use the bhosts command to monitor instances.
The status of the instances becomes ok when they join the LSF cluster as dynamic hosts.Verify that the job is running on host-10-110-135-193:
bhosts -a HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV lsfmanagement ok - 1 0 0 0 0 0 host-10-110-135-193 ok - 1 1 1 0 0 0
-
Use the bhosts command to monitor the status of the instances.
Run bhosts with -a option, which shows all hosts, including terminated instances. If no jobs start running on an instance from OpenStack in the number of minutes specified by the LSF_EXTERNAL_HOST_IDLE_TIME parameter, the instance is relinquished and its host status changes to closed_RC. When the instance is terminated, the host status becomes unavail.
You cannot use the badmin hopen command to open a borrowed host in closed_RC status.
bhosts -a HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV lsfmanagement ok - 1 0 0 0 0 0 host-10-110-135-193 unavail - 1 0 0 0 0 0
-
(Optional) Use external job submission and execution controls.
Use the job submission and execution controls feature to use external, site-specific executable files to validate, modify, and reject jobs, transfer data, and modify the job execution environment. To control job submissions such as permission checks before instances are launched from OpenStack, you can set up an external submission (esub) script. For more information, see External Job Submission and Execution Controls.