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

Provide equivalent of 'oc set volume --overwrite'. #2045

Closed
GrahamDumpleton opened this issue Sep 11, 2017 · 9 comments
Closed

Provide equivalent of 'oc set volume --overwrite'. #2045

GrahamDumpleton opened this issue Sep 11, 2017 · 9 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/P2

Comments

@GrahamDumpleton
Copy link

If you attempt to mount a volume in a container of a pod, and try to name the volume definition the same as an existing volume definition, the web console will give you an error and not allow it.

image

The problem is that the ability to reuse the existing volume definition, when it is the same underlying persistent volume claim, is necessary if you are attempting to share a volume between two different containers within the same pod.

When using the command line you can override any such error by using the oc set volume --overwrite option. A similar ability is needed in the web console.

There are possibly two choices. If the error comes up, show a checkbox to allow you to overwrite it. Or, maybe not even show the error if the volume definition exists but is for the same persistent volume claim. That is, make it intelligent enough to know that it can reuse the existing volume definition which has already been created for the same persistent volume claim.

Note that you cannot just create a second volume definition for the same underlying persistent volume as it seems having multiple volume definitions with different names, but for the same underlying persistent volume claim, against the one deployment configuration, cause deployment to hang.

@juanvallejo juanvallejo self-assigned this Sep 22, 2017
@spadgett spadgett added this to the 3.7.0 milestone Sep 27, 2017
openshift-merge-robot added a commit that referenced this issue Oct 13, 2017
…rwrite-option

Automatic merge from submit-queue.

add "overwrite" option to attachPVC view

Depends on: openshift/origin-web-common#203
Fixes #2045

Work in progress. Just wanted to begin gathering feedback.
Will post images.

cc @spadgett @benjaminapetersen
@spadgett
Copy link
Member

Reopening because there is an issue with the current fix.

@spadgett spadgett reopened this Oct 13, 2017
@spadgett
Copy link
Member

@GrahamDumpleton Making sure I understand the scenario: You want to be able to add the same PVC to different containers in the same pod? Do they need different mount paths? Otherwise you should be able to add it to all containers at once.

@GrahamDumpleton
Copy link
Author

They needed to be added at different mount points in each container and with different sub path from within the volume as it was not intended they use the same data, but different parts of the shared volume.

@GrahamDumpleton
Copy link
Author

As example:

                    "spec": {
                        "volumes": [
                            {
                                "name": "data",
                                "persistentVolumeClaim": {
                                    "claimName": "${APPLICATION_NAME}-data"
                                }
                            }
                        ],
                        "containers": [
                            {
                                "name": "wordpress",
                                ...
                                "volumeMounts": [
                                    {
                                        "name": "data",
                                        "mountPath": "/opt/app-root/src",
                                        "subPath": "wordpress-data"
                                    }
                                ]
                            },
                            {
                                "name": "mysql",
                                ...
                                "volumeMounts": [
                                    {
                                        "name": "data",
                                        "mountPath": "/var/lib/mysql/data",
                                        "subPath": "mysql-database"
                                    }
                                ]
                            }

@spadgett
Copy link
Member

Thanks @GrahamDumpleton for explaining.

Note that you cannot just create a second volume definition for the same underlying persistent volume as it seems having multiple volume definitions with different names, but for the same underlying persistent volume claim, against the one deployment configuration, cause deployment to hang.

@mfojtik @Kargakis Is this a bug?

@spadgett spadgett removed this from the 3.7.0 milestone Oct 16, 2017
@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 15, 2019
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 7, 2020
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci-robot openshift-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 7, 2020
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci-robot
Copy link

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/P2
Projects
None yet
Development

No branches or pull requests

5 participants