Skip to content

Proxy exits with wrong code after SIGTERM #1529

@cdaguerre

Description

@cdaguerre

Bug Description

Graceful termination seems impossible in v2. Whether I set --max-sigterm-delay or not doesn't matter, process always has exit code 137, even when there are no active connections.

Example code (or command)

- name: cloudsql-proxy
  image: {{ $root.Values.sqlProxy.image }}
  command:
    - '/kubexit/kubexit'
    - '/cloud-sql-proxy'
    - '--address=127.0.0.1'
    - '--max-sigterm-delay=10s'
    - '--structured-logs'
    - '--prometheus'
    {{- range $k, $v := $root.Values.sqlProxy.connections }}
    - '{{ $v.dsn }}?port={{ $v.port }}'
    {{- end }}
  lifecycle:
    preStop:
      exec:
        command: ['sleep', '10']

Stacktrace

Capture d’écran 2022-11-05 à 18 05 03

How to reproduce

  1. ?
  2. ?

Environment

  1. OS type and version: GKE 1.24.4-gke.800
  2. Cloud SQL Proxy version (./cloud-sql-proxy --version): 2.0.0-preview.2

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions