Bug 1249150 - oc exec -p docker-registry-1-da73t find /registry does not work with latest registry container
Summary: oc exec -p docker-registry-1-da73t find /registry does not work with latest...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: brice
QA Contact: Vikram Goyal
Vikram Goyal
URL:
Whiteboard:
: 1254014 (view as bug list)
Depends On:
Blocks: 1254014
TreeView+ depends on / blocked
 
Reported: 2015-07-31 16:10 UTC by Ryan Howe
Modified: 2016-08-19 18:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-20 00:48:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ryan Howe 2015-07-31 16:10:59 UTC
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 04:37:22 UTC
PR submitted:

https://github.com/openshift/openshift-docs/pull/960

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 13:56:25 UTC

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

ADDED

    system:serviceaccount:default:registry

$ 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 20:13:23 UTC
This explains the what has changed. The oc exec will not work on privileged containers 

https://bugzilla.redhat.com/show_bug.cgi?id=1255120

Comment 5 brice 2015-09-24 04:51:51 UTC
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.

Thanks!

Comment 6 brice 2015-10-12 00:17:02 UTC
PR merged:

https://github.com/openshift/openshift-docs/pull/960

Comment 7 Timothy 2015-12-08 04:05:02 UTC
*** 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.