Bug 1285121 - [DOCS] Registry storage example shows directly mounting nfs not created pv and pvc opjects
[DOCS] Registry storage example shows directly mounting nfs not created pv an...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
3.1.0
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Thien-Thi Nguyen
Ma xiaoqiang
Vikram Goyal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-24 17:24 EST by Ryan Howe
Modified: 2016-08-04 21:27 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-17 16:56:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ryan Howe 2015-11-24 17:24:30 EST
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 17:36:59 EST
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 16:56:59 EDT
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.