Bug 1299834 - [RFE] Scale pod and the volume attached to the pod
Summary: [RFE] Scale pod and the volume attached to the pod
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Derek Carr
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-19 11:13 UTC by Miheer Salunke
Modified: 2023-03-24 13:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-18 12:39:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description Miheer Salunke 2016-01-19 11:13:55 UTC
1. Proposed title of this feature request  
    => Scale pod and the volume attached to the pod 
 
     
    3. What is the nature and description of the request?  
    => 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)


The current implementation for PVs and RCs means that all pod replicas created in the RC will share the same claim name.  This works well for shared storage, but does not work if you want a distinct volume per pod.

The PetSet proposal being discussed upstream handles distinct volumes per pod.   https://github.com/kubernetes/kubernetes/pull/18016


Ways of making an RC give distinct volumes to pods seems to be under discussion  as per the mailing list.  It's not a technical issue/problem, but a lack-of-good-requirements problem.

Mailing list discussion -
http://post-office.corp.redhat.com/archives/openshift-sme/2016-January/msg00438.html



      
    7. Is there already an existing RFE upstream or in Red Hat Bugzilla? 
=> Related   -    https://github.com/kubernetes/kubernetes/pull/18016
             https://github.com/openshift/origin/issues/4211 
    

    10. List any affected packages or components.  
=>  Master, Node, Kubernetes, Replication Controller

Comment 2 Mark Turansky 2016-01-19 15:10:09 UTC
Re-assigning to Brad as this is an RFE.

Comment 3 Steve Watt 2016-02-01 17:06:23 UTC
Miheer, we are working to address this issue. 

I do want to point though that if you use HostPath as your volume type in your RC definition, then you would be able to get the functionality you seek. However, this is usually only a solution that is available on-premise as most Cloud Providers do not provide enough local storage capacity for this to be an attractive alternative.

For a network storage based solution (as opposed to HostPath, which is local storage), the current community strategy is looking to address this is via the PetSet proposal which you refer to and that work is in progress.

Comment 5 errata-xmlrpc 2017-01-18 12:39:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0066


Note You need to log in before you can comment on or make changes to this bug.