zalando / zalando/postgres-operator

Dealing with containers in ContainerCreating state

Open
#809 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

The operator seems to have a problem with pods which are stuck in the state ContainerCreating. Pods might be stuck there, for example, because a volume cannot be mounted.

The problem has an impact on the operator itself because it blocks the workers with processes starting to recreate pods. In this case no more Postgres clusters can be created because the events are stuck in the queue.

Operator v1.3.1

http://localhost:8080/workers/all/status

{
  "0": {
    "CurrentCluster": {
      "Namespace": "k8s-pgbouncer-sidear-test-0p560nsg",
      "Name": "improvement-test-cluster"
    },
    "CurrentProcess": {
      "Name": "starting to recreate pods",
      "StartTime": "2020-01-31T14:49:38.352382396Z"
    }
  },
  "1": {
    "CurrentCluster": {
      "Namespace": "postgres-sidecar-test",
      "Name": "improvement-test-cluster"
    },
    "CurrentProcess": {
      "Name": "starting to recreate pods",
      "StartTime": "2020-01-31T14:49:01.419016514Z"
    }
  },
  "2": {
    "CurrentCluster": {
      "Namespace": "k8s-pgbouncer-sidear-test-ukga5av8",
      "Name": "improvement-test-cluster"
    },
    "CurrentProcess": {
      "Name": "starting to recreate pods",
      "StartTime": "2020-01-31T14:47:54.455182054Z"
    }
  },
  "3": {
    "CurrentCluster": {
      "Namespace": "bfischer-sandbox",
      "Name": "improvement-test-cluster"
    },
    "CurrentProcess": {
      "Name": "starting to recreate pods",
      "StartTime": "2020-01-31T14:48:16.282425935Z"
    }
  }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the /workers/all/status endpoint and the reported starting to recreate pods process, then examine behavior when a pod remains in ContainerCreating because a volume cannot be mounted. Done should include preventing the blocked workers from stalling the event queue and allowing other PostgreSQL clusters to be created.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.