Orbit code indexer alerts

Covers OrbitServiceGkgIndexerCodeErrorSLOViolation, OrbitServiceGkgIndexerCodeTrafficCessation, OrbitServiceGkgIndexerCodeTrafficAbsent.

The code indexer fails to index repositories, or it stopped. Users see old code data, such as definitions and references. Queries continue to work.

Check

On Dedicated, only the Dedicated EOC runs commands. Use gkg-indexer-code and no --context.

  1. Check the pods and the autoscaler. Healthy: pods are Running, RESTARTS does not increase and PAUSED is not True. No pods in the output: the pool has 0 pods. Look at PAUSED.

    kubectl --context gke_gl-orbit-prd_us-east1_orbit-prd -n gkg get pods | grep orbit-indexer-code
    kubectl --context gke_gl-orbit-prd_us-east1_orbit-prd -n gkg get scaledobject orbit-indexer-code
  2. Look for Gitaly apdex alerts that fire at the same time. Healthy: none.

  3. Open the indexer dashboard. Healthy: code task errors are near 0. Then read the logs and filter on the project ID.

  4. Look for a recent deploy. Healthy: the newest ReplicaSet is older than the alert.

    kubectl --context gke_gl-orbit-prd_us-east1_orbit-prd -n gkg get rs --sort-by=.metadata.creationTimestamp | grep orbit-indexer-code | tail -1

Act

You see Do this Done when
Gitaly apdex alerts at the same time Stop code indexing. Follow Gitaly overload. Gitaly CPU goes down.
Started with a deploy Roll back. Code task errors are near 0.
PAUSED is True Someone stopped the pool. Ask in the incident channel. When the overload is gone, resume. Pods are Running.
Pods restart with OOMKilled Follow OrbitContainerOOMKilled. RESTARTS does not increase.
Pods are evicted for ephemeral storage Raise tmpSizeLimit and the ephemeral-storage limit together (capacity). No new evictions.
Archive downloads fail Gitaly, Workhorse or the GitLab API is down. Page the on-call of that service. Code task errors are near 0.
Errors concentrate on one project Do not purge NATS. After the last attempt, a few minutes later, the task goes to the dead letter queue (code indexing). Errors continue after 1 hour: page Orbit tier-2. Errors for that project stop.
THERE_IS_NO_COLUMN on the ClickHouse write Code bug. Page Orbit tier-2. Orbit tier-2 has the issue.

Escalate

No cause after 15 minutes: page Orbit tier-2 in incident.io (escalation). Dedicated: the EOC runs /inc escalate and selects Orbit.