Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes: airbyte-volume-configs PVC declared as ReadWriteOnce, but is used in multiple pods #16698

Open
ball-hayden opened this issue Sep 14, 2022 · 8 comments
Labels
community frozen Not being actively worked on kubernetes team/platform-move type/bug Something isn't working

Comments

@ball-hayden
Copy link

Environment

  • Airbyte version: 0.40.6
  • OS Version / Instance: Official Docker
  • Deployment: Kubernetes
  • Step where error happened: Deploy

Current Behavior

airbyte-cron deployment pods fail to start, because airbyte-volume-configs is already mounted by airbyte-server pod

Expected Behavior

A ReadWriteOnce PVC should not be used by multiple pods.

Logs

Multi-Attach error for volume "pvc-24380ad7-a93d-4a45-ae66-4dfee25947eb" Volume is already used by pod(s) airbyte-server-86d4c84855-2ng89

Steps to Reproduce

  1. Use kustomize to deploy https://github.com/airbytehq/airbyte/tree/master/kube/overlays/stable-with-resource-limits
  2. Observe error

Are you willing to submit a PR?

I'd need guidance as to how the team would like to handle this.

One option would be to use a ReadWriteMany, although this doesn't seem to be supported by many providers.
Another option might be to have airbyte-cron contact airbyte-server to fetch config?

@dis-sid
Copy link

dis-sid commented Nov 3, 2022

This one had me deleting the airbyte server pod multiple times until it gets scheduled on the same node as the airbyte-cron pod (ReadWriteOnce is accessible by multiple pods if they are on the same node). It makes upgrading the airbyte instance complicated.

I can't recommend using ReadWriteMany beacause of so few providers supporting it and neither using node affinity constraints because it makes the cluster more rigid. If both airbyte-cron and server need write access to it we can:

  • Move the config into object storage
  • Have both server and cron run into the same pod
  • Like @ball-hayden proposed, have a service handling read/write access to the config volume

@StevenReitsma
Copy link

Weirdly enough the Helm chart doesn't seem to have this airbyte-volume-configs volume at all... https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-cron/templates/deployment.yaml

What's this PVC used for anyway?

@Zeppier
Copy link
Contributor

Zeppier commented Nov 4, 2022

Weirdly enough the Helm chart doesn't seem to have this airbyte-volume-configs volume at all... https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-cron/templates/deployment.yaml

But I see it here: https://github.com/airbytehq/airbyte/blob/master/kube/resources/volume-configs.yaml.

And we have the same problems now. If a restart happens we need to do a lot of workarounds to make it work. Any insights on why we need it at all?

@mozarik
Copy link

mozarik commented Nov 9, 2022

Yep have that problem too

  Normal   Scheduled           45m                 default-scheduler        Successfully assigned airbyte/airbyte-cron-765ccb6b44-9lb2j to gke-ase1-glo-data-1-e2-std-14-36-de-s-3e48975c-4xw8
  Warning  FailedAttachVolume  45m                 attachdetach-controller  Multi-Attach error for volume "pvc-cf321101-735f-47e1-ae5a-607a8c26fa1a" Volume is already used by pod(s) airbyte-server-8c464cd5f-tbc96
  Warning  FailedMount         16m (x3 over 40m)   kubelet                  Unable to attach or mount volumes: unmounted volumes=[airbyte-volume-configs], unattached volumes=[gcs-log-creds-volume kube-api-access-lkqfk airbyte-volume-configs]: timed out waiting for the condition
  Warning  FailedMount         13m (x3 over 34m)   kubelet                  Unable to attach or mount volumes: unmounted volumes=[airbyte-volume-configs], unattached volumes=[kube-api-access-lkqfk airbyte-volume-configs gcs-log-creds-volume]: timed out waiting for the condition
  Warning  FailedMount         20s (x14 over 43m)  kubelet                  Unable to attach or mount volumes: unmounted volumes=[airbyte-volume-configs], unattached volumes=[airbyte-volume-configs gcs-log-creds-volume kube-api-access-lkqfk]: timed out waiting for the condition

Currently i delete that volumt mount

@mozarik
Copy link

mozarik commented Nov 9, 2022

@obraginskaya
Copy link

Hey, we got the same issue with kustomize deployment. Any ideas? Maybe Deployment should be changed to StatefulSet as it was proposed here #9133 (comment)?

@marcosmarxm marcosmarxm changed the title airbyte-volume-configs PVC declared as ReadWriteOnce, but is used in multiple pods Kubernetes: airbyte-volume-configs PVC declared as ReadWriteOnce, but is used in multiple pods Nov 30, 2022
@Kopiczek
Copy link

Kopiczek commented Feb 2, 2023

Is there any update to this?

@lydialimsetel
Copy link

Facing same issue here. So, I ended up commenting out the whole volumeMounts and volume section in cron.yaml. So now airbyte-cron doesn't go and fight with airbyte-server for the volume. The volume is likely not useful anyway.

  #     volumeMounts:
  #       - name: airbyte-volume-configs
  #         mountPath: /configs
  #       - name: gcs-log-creds-volume
  #         mountPath: /secrets/gcs-log-creds
  #         readOnly: true
  # volumes:
  #   - name: airbyte-volume-configs
  #     persistentVolumeClaim:
  #       claimName: airbyte-volume-configs
  #   - name: gcs-log-creds-volume
  #     secret:
  #       secretName: gcs-log-creds

@bleonard bleonard added the frozen Not being actively worked on label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community frozen Not being actively worked on kubernetes team/platform-move type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests