This topic is not relevant if you are running LGTM Enterprise on Kubernetes.
Labeling worker daemons, and the jobs they analyze, provides a way of matching build/analysis jobs to suitable workers. For example, you can stipulate that jobs for one project are only processed by workers running on Windows, while jobs for Java must be processed by workers on which a specific build tool has been installed. A worker can only process a build/analysis job if it has been assigned all of the labels that have been assigned to the job. If a job is queued for processing but it has a set of labels that no currently running worker can match, then the job fails. It's removed from the job queue and a log entry is generated.
For more information about labeling, see Defining which workers can build and analyze a project.
Identifying jobs that failed due to labeling problems
When jobs fail due to labeling problems they are listed on the
A Labeling failures section is also added to the Worker management tab of the Infrastructure page.
Debugging labeling failures
- Go to the
Jobstab of the Logspage in the administration interface.
- Click the arrow button beside a job that failed because there was no suitable worker.
If a job has been assigned any language-wide or project-level labels, these are listed in a Labels field in the Basic information section:
This field is not displayed if the job has not been assigned any labels.
Check that there are no mistakes in the labels.
In the example above it's likely that
dotnot4-7should have been
windoowsshould have been
Review LGTM's cluster configuration file and check that the workers on at least one of the worker hosts are assigned all of the labels specified for each failing job.
The cluster configuration file is
<LGTM releases directory>/state/lgtm-cluster-config.yml—where <LGTM releases directory> is the directory into which the installation package for the current release was unpacked (for example,
/home/adminuser/lgtm-releases/). For more information about the cluster configuration file, see lgtm-cluster-config.yml file.
- Go to the
Infrastructureadministration page and click the Worker management tab.
- Check that suitable workers for the failed jobs are currently running.
After you have corrected the problems that caused the jobs to fail, you can mark them as being available to be retried.
Retrying jobs that failed due to labeling problems
- Go to the
- Click the
- Scroll down the page (if necessary) to the Labeling failures section.
The failed jobs are scheduled for processing again.
On a large LGTM Enterprise installation it may take several hours before the jobs are processed.