Bug 1285121 - [DOCS] Registry storage example shows directly mounting nfs not created pv and pvc opjects
Summary: [DOCS] Registry storage example shows directly mounting nfs not created pv an...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Thien-Thi Nguyen
QA Contact: Ma xiaoqiang
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-24 22:24 UTC by Ryan Howe
Modified: 2019-09-12 09:23 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-17 20:56:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ryan Howe 2015-11-24 22:24:30 UTC
Document URL: 
https://docs.openshift.com/enterprise/3.1/install_config/install/docker_registry.html#production-use

Describe the issue: 

- The docs say that for production use persistent storage using PersistentVolume and PersistentVolumeClaim objects for storage 

- Then provides and example that does not create the object but instead directly mounts the nfs to the pod. 


Additional information: 

I ran:

# oc volume deploymentconfigs/docker-registry  --add --overwrite --name=registry-storage --mount-path=/registry -t pvc --claim-name=registry-claim

AFTER I CREATE the following

Registry volumes: 

 apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
	name: registry-claim
  spec:
	accessModes:
	- ReadWriteMany
	resources:
	  requests:
		storage: 5Gi
	volumeName: registry-volume
  status: {}

  apiVersion: v1
  kind: PersistentVolume
  metadata:
	name: registry-volume
  spec:
	accessModes:
	- ReadWriteMany
	capacity:
	  storage: 10Gi
	nfs:
	  path: /share/registry
	  server: 172.17.28.3
	persistentVolumeReclaimPolicy: Recycle
  status: {}


Document URL: 

Section Number and Name: 

Describe the issue: 

Suggestions for improvement: 

Additional information:

Comment 1 Ryan Howe 2015-11-24 22:36:59 UTC
Example Steps


1. Create PV [1]
# oc create pv.json 

2. CreatePVC [2]
# oc create pvc.json -n default 

3. Add this to your existing registry 
# oc volume deploymentconfigs/docker-registry  --add --overwrite --name=registry-storage --mount-path=/registry -t pvc --claim-name=registry-claim

4. (optional) Run the following if using a replicated registry: 
# oc get -o yaml svc docker-registry | sed 's/\(sessionAffinity:\s*\).*/\1ClientIP/' | oc replace -f -


---------------

[1] cat pv.json 

            "kind": "PersistentVolume",
            "apiVersion": "v1",
            "metadata": {
                "name": "registry-volume",
                "creationTimestamp": null
            },
            "spec": {
                "capacity": {
                    "storage": "10Gi"
                },
                "nfs": {
                    "server": "172.17.28.3",
                    "path": "/share/share4"
                },
                "accessModes": [
                    "ReadWriteMany"
                ],
                "persistentVolumeReclaimPolicy": "Recycle"
            },
            "status": {}
       
[2] cat pvc.json


            "kind": "PersistentVolumeClaim",
            "apiVersion": "v1",
            "metadata": {
                "name": "registry-claim",
                "creationTimestamp": null
            },
            "spec": {
                "accessModes": [
                    "ReadWriteMany"
                ],
                "resources": {
                    "requests": {
                        "storage": "5Gi"
                    }
                },
                "volumeName": "registry-volume"
            },
            "status": {}

Comment 2 Thien-Thi Nguyen 2016-03-17 20:56:59 UTC
This discrepancy has since been addressed by:
- https://github.com/openshift/openshift-docs/commit/ec81f7879bfefc52aae93b4b747f98c2d33a50f8

Verified live (same as Document URL in the Description):
- https://docs.openshift.com/enterprise/3.1/install_config/install/docker_registry.html#production-use

Moving status to CLOSED CURRENTRELEASE.


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