Skip to content

failed to write binding to database: pq: insert or update on table "tailnet_peers" violates foreign key constraint "tailnet_peers_coordinator_id_fkey" #11750

Closed
@mafredri

Description

@mafredri

Saw this error pop up in the logs whilst running a scale test, unsure if this is expected behavior or not. Labeling as a bug for now.

{
  "insertId": "rjjvlnfjo618o67y",
  "jsonPayload": {
    "logging.googleapis.com/severity": "ERROR",
    "error": "pq: insert or update on table \"tailnet_peers\" violates foreign key constraint \"tailnet_peers_coordinator_id_fkey\"",
    "binding_id": [
      4,
      19,
      168,
      223,
      234,
      124,
      74,
      79,
      143,
      154,
      65,
      114,
      15,
      7,
      65,
      13
    ],
    "coordinator_id": "417d3bab-f45e-48f1-b5f2-816f19cf45bb",
    "node": {
      "id": 8099089021738205000,
      "derp_latency": {
        "999-v4": 0.00167452
      },
      "as_of": {
        "nanos": 730454000,
        "seconds": 1705928991
      },
      "allowed_ips": [
        "fd7a:115c:a1e0:4a4f:8f9a:4172:f07:410d/128",
        "fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128"
      ],
      "preferred_derp": 999,
      "addresses": [
        "fd7a:115c:a1e0:4a4f:8f9a:4172:f07:410d/128",
        "fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128"
      ],
      "disco": "discokey:e77e63e215cb26f38c4c7c857811ae0aeb3bc97729448d8ac5a3f8d09c101b15",
      "key": "bnBLTFG66N7RRtPHzBL+S2rkqcxu1+XKcnGSMpuWQs+YOg=="
    },
    "message": "failed to write binding to database"
  },
  "resource": {
    "type": "k8s_container",
    "labels": {
      "project_id": "v2-loadtest",
      "container_name": "coder",
      "cluster_name": "big",
      "pod_name": "coder-5dd8558d57-4ffwg",
      "location": "us-central1-a",
      "namespace_name": "coder-big"
    }
  },
  "timestamp": "2024-01-22T13:21:52.543215073Z",
  "severity": "ERROR",
  "labels": {
    "k8s-pod/app_kubernetes_io/version": "2.7.0",
    "k8s-pod/app_kubernetes_io/instance": "big",
    "k8s-pod/app_kubernetes_io/managed-by": "Helm",
    "k8s-pod/app_kubernetes_io/name": "coder",
    "k8s-pod/pod-template-hash": "5dd8558d57",
    "compute.googleapis.com/resource_name": "gke-big-big-coder-8a85823c-43my",
    "k8s-pod/helm_sh/chart": "coder-2.7.0",
    "k8s-pod/app_kubernetes_io/part-of": "coder"
  },
  "logName": "projects/v2-loadtest/logs/stderr",
  "operation": {
    "producer": "coderd.pgcoord"
  },
  "sourceLocation": {
    "file": "/home/runner/actions-runner/_work/coder/coder/enterprise/tailnet/pgcoord.go",
    "line": "534",
    "function": "github.com/coder/coder/v2/enterprise/tailnet.(*binder).writeOne"
  },
  "receiveTimestamp": "2024-01-22T13:21:57.306367041Z"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APInetworkingArea: networking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions