Bug 1493014 - Container post hook fails with "permission denied"
Summary: Container post hook fails with "permission denied"
Keywords:
Status: CLOSED DUPLICATE of bug 1471256
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Seth Jennings
QA Contact: DeShuai Ma
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-19 07:35 UTC by Siamak Sadeghianfar
Modified: 2017-09-19 14:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-19 14:25:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Siamak Sadeghianfar 2017-09-19 07:35:53 UTC
When deploying a pod with a post hook defined, the post hook container fails with the following error:

Error: Error response from daemon: {"message":"create 0a2219769d94944945ab651323c6526f950cabd072fe4965e69117f2611dcc04: mkdir /var/lib/docker/volumes/0a2219769d94944945ab651323c6526f950cabd072fe4965e69117f2611dcc04: permission denied"}


This happens on the Pro cluster.
OpenShift Master: v3.6.173.0.21 (online version 3.5.1.76)
Kubernetes Master: v1.6.1+5115d708d7


How reproducible:
$ oc process -f https://raw.githubusercontent.com/OpenShiftDemos/nexus/master/nexus2-template.yaml | oc create -f -

Comment 1 Michal Fojtik 2017-09-19 08:02:36 UTC
I suspect this is a SELinux or permission problem with Docker.

Comment 2 Seth Jennings 2017-09-19 14:25:16 UTC
This is an issue with the container being built with VOLUME in the dockerfile
https://hub.docker.com/r/sonatype/nexus/~/dockerfile/

Namely the /sonatype-work mount point is a docker volume that is not labeled properly as it is outside the knowledge of the openshift node.

I see the template mounts an emptydir at that point, but it seems like the docker volume is mounting on top of that.

This issue has been captured in an RFE to ignore these volumes https://bugzilla.redhat.com/show_bug.cgi?id=1471256

*** This bug has been marked as a duplicate of bug 1471256 ***


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