Scale pod and the volume attached to the pod

Solution In Progress - Updated -

Issue

  • Imagine a pod with a pv backed by a replication controller, and when scaling the pod to 2, would it be possible that the new pod will have a new volume?

I've seen in the templates (i.e.- the mysql with permanent storage), it creates the claim and then attach the volume using the claim previously created, but if I try to scale the rc, the new pod also tries to use the same volume (which fails because it is not multiwrite enabled).

Any clues? I've seen this https://github.com/openshift/origin/issues/4211 that talks about a "PersistentVolumeClaimTemplate on the RC side-by-side with the PodTemplate" and some folk asking in stackoverflow http://stackoverflow.com/questions/33313199/is-there-any-way-that-can-make-each-pod-gets-its-own-volume-in-rc-template and nothing else

A simple use case will be the one commented in the upstream issue, when a user wants to create a database cluster where every database node has its own storage. It can start with a single pod and a persistent volume attached to the pod and when scaling to >1 pod, a new pod with a proper new volume needs to be created, otherwise, the new pod will try to use the same volume and bad things can happen (data corruption)

Environment

  • Openshift Enterprise 3.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.