Repository navigation
Closed
Labels
Description
Working through with @pmorie.
Secrets/RC created via following manifest:
---
id: "fabric8-config"
kind: "Config"
apiVersion: "v1beta1"
name: "fabric8-config"
description: "Creates a hawtio console"
items:
- apiVersion: "v1beta2"
kind: "Secret"
id: "openshift-cert-secrets"
data:
my-file: amltbWkK
- apiVersion: "v1beta1"
desiredState:
podTemplate:
desiredState:
manifest:
containers:
- image: "busybox:latest"
name: "test-container"
imagePullPolicy: "PullIfNotPresent"
volumeMounts:
- name: openshift-cert-secrets
mountPath: /etc/secret-volume
readOnly: true
command:
- sleep
- 5000000
id: "busyboxPod"
version: "v1beta1"
volumes:
- name: openshift-cert-secrets
source:
secret:
target:
kind: Secret
namespace: default
name: openshift-cert-secrets
labels:
component: "test"
replicaSelector:
component: "test"
replicas: 1
id: "busybox-controller"
kind: "ReplicationController"
Volume is mounted in container but contains no files, either visible in container or on host. Logs from a customized origin image provided by @pmorie with extra logging are available at https://gist.github.com/jimmidyson/d378d4a0e7c6f0fdfe0a, specifically see https://gist.github.com/jimmidyson/d378d4a0e7c6f0fdfe0a#file-openshift-log-L407-L421. Initial guess is that it's the Cleaner that's cleaning files too eagerly.
Activity
pmorie commentedon Mar 27, 2015
@jimmidyson I believe this is all sorted out now, want to comment with the resolution?
jimmidyson commentedon Mar 27, 2015
@pmorie um, well the resolution was to try again :) I think it was to do with a version mismatch between the client I was using & the server, but after a clean clone & build all worked fine. Thanks for your help @pmorie!
jimmidyson commentedon Mar 27, 2015
Although this worked fine with clean build from master earlier today, I've just tried again with docker image openshift/origin:latest from Docker hub & the issue still exists: secrets volume is mounted but contains no files & no files on host filesystem at mounted dir either. This is using the following manifests provided by @pmorie (https://gist.githubusercontent.com/pmorie/b6e7c4cdcc06247a1f8d/raw/45d7010c2f8b07ab277df1b8a26ac378bd3843f6/secret.json & https://gist.githubusercontent.com/pmorie/b6e7c4cdcc06247a1f8d/raw/9a33b80d7e777531600ef91d75646469e2d82798/pod.json)
What could be the difference between local build & running in container? Even dir permissions are different in containers (1777 in local build vs 0750 when running openshift in docker container).
smarterclayton commentedon Mar 31, 2015
/tmpfs mounting maybe?
pmorie commentedon Apr 1, 2015
Our next step for this is to debug the all-in-one binary on @jimmidyson's system and step through what's happening. This behavior happens in permissive mode, so I don't think it's an selinux issue.
jimmidyson commentedon Apr 2, 2015
Just to confirm that this happens only when running OpenShift in a container. When running on host it works perfectly.
smarterclayton commentedon Apr 2, 2015
It's probably that no volumes that have to mount work properly in a container right now because the kubelet is not in the host's root namespace. That's an issue that we need to pursue upstream.
jimmidyson commentedon Apr 2, 2015
Empty dir volumes work fine IIRC. Wouldn't that be affected in this case?
smarterclayton commentedon Apr 2, 2015
No because the daemon manages that from the host mount namespace.
@pweil- @pmorie can you guys start a discussion upstream today about whether there is an easy fix that would allow a container running in a mount namespace to properly mount in the root? Bring the appinfra guys in on SPC (Dan Walsh) if you have to. If we are truly blocked on this without a workaround we can get upstream then we can't run the node in a container except in test environments. Hint: I think we need to find the minimal solution for 3.0 that doesn't involve massive complexity, but allows it to work.
pweil- commentedon Apr 2, 2015
I believe this is the quick fix: kubernetes/kubernetes#6238 (comment)
pweil- commentedon Apr 2, 2015
Sorry, that was the issue, this is the pr kubernetes/kubernetes#6319
pmorie commentedon Apr 9, 2015
@pweil- Unfortunately, that is not the fix; that is only to set the rootcontext of the tmpfs mountpoint to the same as that of the kubelet root dir. The issue @smarterclayton is getting at is that the kubelet process itself is not is the same mount namespace as the host. The container and kubelet wind up not sharing mount namespaces and thus the pod's containers do not see the mounts the kubelet makes.
jimmidyson commentedon Apr 9, 2015
@pmorie @pweil- Do you think there is a solution to this coming soon or should we stop recommending running OpenShift itself in a container for now?
pmorie commentedon Apr 9, 2015
@jimmidyson I don't have a read on it yet; I will let you know.
pmorie commentedon Apr 9, 2015
@jimmidyson Were you using a privileged container?
pmorie commentedon Apr 9, 2015
Looks like there's a relevant upstream issue for this: moby/moby#10088
jimmidyson commentedon Apr 9, 2015
Yes using a privileged container to run openshift all-in-one, but not for
all other containers obviously.
On 20:25, Thu, 9 Apr 2015 Paul Morie [email protected] wrote:
pmorie commentedon Apr 15, 2015
Opened kubernetes/kubernetes#6848 upstream for this.
liggitt commentedon May 8, 2015
@pmorie upstream issue was closed... was this issue resolved?
pmorie commentedon May 8, 2015
@liggitt I need to make a change in origin for this - it's next in my queue
On Thu, May 7, 2015 at 9:43 PM Jordan Liggitt [email protected]
wrote:
pmorie commentedon May 8, 2015
I tried to reproduce this tonight and couldn't. I can create the secrets example pod from upstream and see the content correctly.
danmcp commentedon May 11, 2015
Any remaining issues here?
Modify Makefile to only specify ldflags once (openshift#1471)