GithubHelp home page GithubHelp logo

Comments (12)

Haleygo avatar Haleygo commented on June 19, 2024 1

The request has been released in victoria-metrics-cluster-0.11.14, close as completed.

from helm-charts.

Haleygo avatar Haleygo commented on June 19, 2024

Hello,

I try to make it use the PVC and PV of the primary cluster, but it seems impossible now. If I set existingClaim, all vmstorage pods will use the same PVC, that is not what I want.

You want the secondary cluster to use the PVC and PV of the primary cluster, then you don't want them to use the same PVC. Got me confused, could you elaborate?

from helm-charts.

chenlujjj avatar chenlujjj commented on June 19, 2024

Sorry for the confusion.
Say the primary cluster has 4 vmstorage pods, and their PVC are vmstorage-0, vmstorage-1, vmstorage-2, vmstorage-3.
Then I want the secondary cluster's vmstorage pods use these PVC respectively. If I set existingClaim to vmstorage-0, all four pods are using the same PVC which is not I want.

from helm-charts.

chenlujjj avatar chenlujjj commented on June 19, 2024

I got a workaround for this issue, though a bit ugly.

  1. I updated this line to:
name: {{ .Values.vmstorage.persistentVolume.name | default "vmstorage-volume" }}

so that I can customize the PVC name in the values.yaml.

  1. For the primary cluster, I set the vmstorage.persistentVolume.name to vmstorage-volume-standby, so the actual PVC name is vmstorage-volume-standby-victoria-metrics-cluster-vmstorage-{0/1/2/3}

  2. For the secondary cluster names as standby-victoria-metrics-cluster, I set the vmstorage.persistentVolume.name to vmstorage-volume, so the PVC name will be the same as the primary cluster's respectively

from helm-charts.

chenlujjj avatar chenlujjj commented on June 19, 2024

The reason I try to reuse the PVCs is that I want to use GCP regional persistent disk to improve availability

from helm-charts.

Haleygo avatar Haleygo commented on June 19, 2024

Oh, okay, I'm afraid you can't do that, two vmstorage process can't use the same volume as their storage.
First of all, vmstorage will try to create a flock.lock file under "/vm-data" to make sure it's the only process has exclusive access to "/vm-data", and will panic if it can't acquire the lock.
Even if we remove this check, normally you shouldn't have two different processes to write&read the same volume, it causes data duplicated and conflicted. And if one process causes data corruption, you lose two of them, then there is no sense to call it HA.

from helm-charts.

chenlujjj avatar chenlujjj commented on June 19, 2024

@Haleygo Thanks for your reply. I understand your concern.

I should have pointed out that the secondary cluster will not write&read to the same volume with the primary cluster at the same time, it is only for disaster recovery. In other words, the secondary cluster will be started when we find the primary cluster is unavailable and not working anymore.

from helm-charts.

Haleygo avatar Haleygo commented on June 19, 2024

So you have two different available zone or region, the first vmcluster deployed on zoneA, second one on zoneB and components on zoneB are all stopped(replicas=0) at first. If zoneA is completely down, you can increase zoneB vmcluster's replicas(it's the same as creating a new vmcluster) and use zoneB.
But if zoneA is not completely down, just several vmstorage nodes are down, e.g storage0 and storage2, in this case, you can't use zoneB to help recovering, since you will get double storage1 and storage3.
Am I understand correctly?

If so, then every method that generates same persistentVolume name for different vmcluster will work, like yours here.
And I don't see how we can improve chart for this particular case.

from helm-charts.

chenlujjj avatar chenlujjj commented on June 19, 2024

Correct, that's what I mean.

from helm-charts.

chenlujjj avatar chenlujjj commented on June 19, 2024

Maybe I can raise a PR to make the vmstorage.persistentVolume.name customizable so that I don't need to host the chart separately? Thanks

from helm-charts.

Haleygo avatar Haleygo commented on June 19, 2024

Maybe I can raise a PR to make the vmstorage.persistentVolume.name customizable so that I don't need to host the chart separately? Thanks

yeah, feel free)

You can also try using the k8s stack chart, VMClusterSpec.VMStorage.storage supports customized VolumeClaimTemplate name as well.

from helm-charts.

chenlujjj avatar chenlujjj commented on June 19, 2024

I created a PR #939

from helm-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.