{"id":"IL-0207","org":"GitLab","date":"2022-11-30","docs":["https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/16875","https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/16221"],"title":{"en":"A routine task run from an engineer's local environment switched to production and deleted GitLab.com's Consul release, so Patroni lost Consul and GitLab.com returned 5xx errors to all traffic","ko":"로컬 개발 환경에서 돌린 작업이 운영 컨텍스트로 넘어가 Kubernetes 클러스터의 Consul 릴리스를 통째로 지웠고, Patroni 가 무너져 GitLab.com 전체가 5XX 오류를 냈다."},"domain":["kubernetes"],"impact":{"scope":"All traffic to GitLab.com; the CDN reported about 13 million requests that ended in 503 during the outage","users":"~100% of traffic","region":"unknown"},"review":{"written_by":"session","reviewed_at":null,"reviewed_by":null},"lessons":{"en":"A tool that can switch its target from a local environment to production during a deploy or rollback turns routine local work into a production change. GitLab plans to improve its Kubernetes deployment process so that harmful deployment operations are less likely to be run against production from local environments, and to integrate Teleport with its clusters, which could give SREs a read-only role by default.\n\nDetection and diagnosis were fast because the alerts led straight from Patroni to its dependency, Consul. Bringing the deleted release back needed manual work, because the tooling did not make the redeploy straightforward, but it was still done relatively quickly.","ko":"로컬 개발 환경에서 운영 클러스터에 접근할 수 있으면 도구가 컨텍스트를 예상과 다르게 바꾸는 순간 일상 작업이 운영 장애가 된다. GitLab 은 Kubernetes 배포 방식을 개선하고, Teleport 로 SRE 의 기본 권한을 읽기 전용으로 둘 수 있게 하면 이런 위험이 크게 줄어든다고 봤다. 알림과 원인 파악은 빨랐다. 지워진 릴리스를 다시 배포하는 데는 손으로 해야 할 일이 있었지만 비교적 빨리 끝났다."},"related":[],"sources":[{"url":"https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8100","kind":"github","license":"unknown","archived":null}],"summary":{"en":"On 30 November 2022 GitLab.com went down for all traffic. An engineer had started a routine task from a local development environment, using GitLab's tooling and a well-known open source tool. Through what the review calls an unfortunate series of events and unexpected tool behaviour, the context switched from local development to production during a local deploy or rollback operation, and the change deleted the entire Consul release from GitLab's production Kubernetes cluster.\n\nConsul is a core component of Patroni, which keeps GitLab's Postgres clusters highly available. Without Consul the Patroni clusters became unhealthy and GitLab.com answered with 5XX errors. Engineers were alerted immediately, followed the trail from the Patroni failover alert to the missing Consul servers and found the root cause within minutes. They re-applied the Consul release to production; the Consul cluster came up quickly and the database clusters recovered. The deployment tooling did not make it simple to redeploy the release, and the redeploy needed manual steps.","ko":"2022년 11월 30일 GitLab.com 전체가 내려갔다. 한 엔지니어가 로컬 개발 환경에서 사내 도구로 일상적인 작업을 돌렸다. 로컬 배포나 롤백 도중 컨텍스트가 로컬 개발에서 운영으로 바뀌었고, 이때 잘 알려진 오픈소스 도구가 예상하지 못한 동작을 해 운영 환경에 변경이 들어갔다.\n\n이 변경은 운영 Kubernetes 클러스터의 Consul 릴리스를 통째로 지웠다. Consul 은 GitLab 의 Postgres 고가용성 구성인 Patroni 의 핵심 구성 요소다. Consul 클러스터가 내려가자 Patroni 클러스터가 비정상이 됐고, GitLab.com 으로 가는 트래픽이 모두 5XX 오류로 끝났다.\n\n팀은 Consul 릴리스를 운영에 다시 적용했다. Consul 클러스터가 빠르게 올라왔고 데이터베이스 클러스터도 회복했다. 쓰던 도구로는 Consul 릴리스를 다시 배포하기가 간단하지 않아 손으로 개입해야 했다. GitLab 은 이 장애가 코드 배포나 인프라 변경으로 생긴 것이 아니라고 밝혔다."},"trigger":{"en":"An engineer ran a routine task with GitLab's tools in a local development environment; during a local deploy or rollback operation the tool's context changed from local development to production, and the change was applied to production.","ko":"엔지니어가 로컬 개발 환경에서 사내 도구로 일상적인 작업을 돌렸다. 로컬 배포나 롤백 도중 컨텍스트가 로컬 개발에서 운영으로 바뀌었고, 이때 잘 알려진 오픈소스 도구가 예상하지 못한 동작을 해 운영 환경에 변경이 들어갔다."},"severity":"unknown","symptoms":["service-unavailable","high-error-rate","resources-deleted"],"timeline":{"detected_after":null,"resolved_after":null},"date_kind":"incident","detection":{"en":"GitLab's monitoring and alerting fired immediately; one of the alerts reported a Patroni failover.","ko":"모니터링과 알림 인프라가 곧바로 경보를 보냈다. 팀은 Consul 클러스터가 내려가 Patroni 클러스터에 영향을 주자마자 큰 장애가 난 것을 알았고, 근본 원인도 몇 분 안에 찾았다."},"components":["database"],"root_cause":"human-operation","remediation":[{"text":{"en":"re-applied the Consul release to the production Kubernetes cluster, with manual steps because the tooling did not support the redeploy directly","ko":"지워진 Consul 릴리스를 운영에 다시 적용했다. Consul 클러스터가 올라오자 데이터베이스 클러스터가 회복했다."}}],"action_items":[{"text":{"en":"Improve the Kubernetes deployment process to reduce the risk of running harmful deployment operations against production from local environments (https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/16875)","ko":"Kubernetes 배포 방식을 개선해 로컬 환경에서 운영 환경을 대상으로 위험한 배포 작업이 돌아갈 가능성을 줄인다. 개념 검증은 reliability 이슈 16875 에서 진행한다."}},{"text":{"en":"Integrate Teleport with the Kubernetes clusters, which could give SREs a read-only role by default (https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/16221)","ko":"Teleport 를 Kubernetes 클러스터와 연동한다. 이렇게 하면 SRE 에게 기본으로 읽기 전용 역할을 줄 수 있어 실수로 운영 환경을 바꿀 위험이 줄어든다."}}],"contributing":["no-safeguard-on-destructive-change"],"recurrence_of":null,"symptoms_text":{"en":"GitLab's monitoring and alerting fired at once. One of the alerts reported a Patroni failover, and users of GitLab.com received 5XX errors; the CDN counted about 13 million requests answered with 503 during the outage.\n\nPatroni, the high-availability system for GitLab's Postgres clusters, was investigated first and was not responding. Patroni depends on Consul, and the Consul servers were missing. In the Kubernetes cluster the whole Consul release was gone: all Consul pods, services and the other resources of the release had been deleted.","ko":"모니터링과 알림이 곧바로 울렸다. 알림 하나는 Patroni 페일오버를 가리켰다. GitLab.com 으로 가는 트래픽은 모두 5XX 오류로 끝났다.\n\nCDN 은 장애 동안 약 1300만 건의 요청이 503 으로 끝났다고 집계했다.\n\n엔지니어들은 페일오버 알림 때문에 Patroni 부터 살폈다. Patroni 가 응답하지 않아 Patroni 가 의존하는 Consul 을 봤고, Consul 서버가 없어진 것을 발견했다. Kubernetes 클러스터에서 Consul 릴리스가 통째로 사라져 있었고, Consul 관련 파드와 서비스가 모두 없었다."},"updated_at":"2026-11-10T00:00:41.141741Z","url":"https://benchlet.com/incidentlib/app/cases/IL-0207","org_slug":"gitlab"}