Bug 1249150 - oc exec -p docker-registry-1-da73t find /registry does not work with latest registry container
oc exec -p docker-registry-1-da73t find /registry does not work with latest...
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: brice
Vikram Goyal
Vikram Goyal
: 1254014 (view as bug list)
Depends On:
Blocks: 1254014
  Show dependency treegraph
Reported: 2015-07-31 12:10 EDT by Ryan Howe
Modified: 2016-08-19 14:10 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-19 19:48:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ryan Howe 2015-07-31 12:10:59 EDT
Document URL: https://docs.openshift.com/enterprise/3.0/admin_guide/install/docker_registry.html#file-storage

Section Number and Name: file storage

Describe the issue:  

# oc exec -p docker-registry-1-da73t find /registry

The find command is not a command in the latest registry container. 

Suggestions for improvement: 

Instead use the following command to open a bash shell in the registry 

oc exec -p docker-registry-1-5deze -i -t -- bash -il

Additional information:
Comment 2 brice 2015-09-14 00:37:22 EDT
PR submitted:


Ryan, my test machine is currently out of commission, so I couldn't get test out this command myself, so i may be wrong, but it looks like this is simply opening up a bash shell into the pod. Is there an missing command to be run after this one to list the registry contents?
Comment 3 Ryan Howe 2015-09-14 09:56:25 EDT

Following the instructions results in the following:

[root@master ~]# oc exec -p docker-registry-1-2r24y -i -t -- bash -il
W0914 09:44:51.565795 54908 cmd.go:149] -p POD is DEPRECATED and will be removed in a future version. Use exec POD instead.

Error from server: Pod "Unknown" is forbidden: Cannot exec into a privileged container

Steps to lead up to this:

$ echo '{"kind":"ServiceAccount","apiVersion":"v1","metadata":{"name":"registry"}}' | oc create -n default -f -
$ oc edit scc privileged



$ oadm registry --service-account=registry --config=/etc/openshift/master/admin.kubeconfig --credentials=/etc/openshift/master/openshift-registry.kubeconfig --images='registry.access.redhat.com/openshift3/ose-${component}:${version}' --mount-host=/mnt/registry --selector="zone=west"
$ oc get all
$ oc get pods --watch
$  oc exec -p docker-registry-1-2r24y -i -t -- bash -il
Comment 4 Ryan Howe 2015-09-18 16:13:23 EDT
This explains the what has changed. The oc exec will not work on privileged containers 

Comment 5 brice 2015-09-24 00:51:51 EDT
I've replaced the command in the section, but also added in an Important box after the example explaining the restrictions of privileged container.

Ryan, if there's anything else for this BZ, please let me know.

Comment 6 brice 2015-10-11 20:17:02 EDT
PR merged:

Comment 7 Timothy 2015-12-07 23:05:02 EST
*** Bug 1254014 has been marked as a duplicate of this bug. ***

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