2021-12-22 Error pushing Windows container registry images

Current Status

Customer reporting 500 errors pushing Windows container registry images (https://gitlab.zendesk.com/agent/tickets/258086).

We fixed this in Omnibus years ago in gitlab-org/omnibus-gitlab!2938 (merged) turning off validation, but I see the pod has this definition:

git@gitlab-registry-9cf6f5684-4qwwm:/etc/docker/registry$ grep -A 8 validation: config.yml
validation:
  disabled: false
  manifests:
    referencelimit: 200
    urls:
      allow:
      - .*
      deny:

More information will be added as we investigate the issue.

Timeline

Recent Events (available internally only):

  • Deployments
  • Feature Flag Changes
  • Infrastructure Configurations
  • GCP Events (e.g. host failure)

All times UTC.

2021-12-22

  • 21:29 - @stanhu declares incident in Slack.

Takeaways

  • ...

Corrective Actions

Corrective actions should be put here as soon as an incident is mitigated, ensure that all corrective actions mentioned in the notes below are included.

  • We need to adjust the layer linking logic and database schema to account for nondistributable layers gitlab-org/container-registry#543 (closed)

Note: In some cases we need to redact information from public view. We only do this in a limited number of documented cases. This might include the summary, timeline or any other bits of information, laid out in out handbook page. Any of this confidential data will be in a linked issue, only visible internally. By default, all information we can share, will be public, in accordance to our transparency value.


Click to expand or collapse the Incident Review section.

Incident Review

  • Ensure that the exec summary is completed at the top of the incident issue, the timeline is updated and relevant graphs are included in the summary
  • If there are any corrective action items mentioned in the notes on the incident, ensure they are listed in the "Corrective Action" section
  • Fill out relevant sections below or link to the meeting review notes that cover these topics

Customer Impact

  1. Who was impacted by this incident? (i.e. external customers, internal customers)
    1. Approx five top-level namespaces
  2. What was the customer experience during the incident? (i.e. preventing them from doing X, incorrect display of Y, ...)
    1. Pushes for windows images failed with 500
  3. How many customers were affected?
    1. Appox 4,300 top level namespaces are currently effected by this issue, but this is limited to containers using nondistributable layers, which are rare — over the last week, we've only seen the related error message 26 times.
  4. If a precise customer impact number is unknown, what is the estimated impact (number and ratio of failed requests, amount of traffic drop, ...)?
    1. ...

What were the root causes?

What When Wrong

Rarely, some container images use foreign layers (docker schema 2 manifests) or nondistributable layers (OCI Images). These layers, rather than being pushed onto the registry, are accessed via a URL. Windows containers are the most prominent example of such layers, but often contain normal layers as well.

This issue only effects container registry repositories on the new code path using the database, see: Container Registry: Gradual Migration Plan.

When a container image containing a mix of nondistributable and normal layers is pushed to the new codepath, all normal blobs are first uploaded to the repository. Afterwards, when the manifest is PUT to the registry, the database reads the manifest json, and attempts to link each blob listed therein to the manifest entity in the database. Since the nondistributable layers have not been pushed to the database, the registry fails to find the blob associated with the SHA hash, and fails the manifest PUT.

What can be improved

The container registry is missing an API integration test, which covers an image being pushed with nondistributable layers. Adding this test case should prevent future errors involving this edge case.

Incident Response Analysis

  1. How was the incident detected?
    1. ...
  2. How could detection time be improved?
    1. ...
  3. How was the root cause diagnosed?
    1. ...
  4. How could time to diagnosis be improved?
    1. ...
  5. How did we reach the point where we knew how to mitigate the impact?
    1. ...
  6. How could time to mitigation be improved?
    1. ...
  7. What went well?
    1. ...

Post Incident Analysis

  1. Did we have other events in the past with the same root cause?
    1. ...
  2. Do we have existing backlog items that would've prevented or greatly reduced the impact of this incident?
    1. ...
  3. Was this incident triggered by a change (deployment of code or change to infrastructure)? If yes, link the issue.
    1. ...

What went well?

  • ...

Guidelines

  • Blameless RCA Guideline

Resources

  1. If the Situation Zoom room was utilised, recording will be automatically uploaded to Incident room Google Drive folder (private)
Edited Dec 23, 2021 by Hayley Swimelar
Assignee Loading
Time tracking Loading