So I'm trying to setup my first openshift cluster and I'm using the following docs to get started:
Setup prereqs:
https://docs.openshift.com/container-platform/3.5/install_config/install/host_preparation.html
Then oc cluster up:
https://docs.openshift.org/latest/getting_started/administrators.html
Then I'm trying to setup a container which requires a persistent volume. I'm
using a dead simple pv.yaml to configure it:
kind: PersistentVolume
apiVersion: v1
metadata:
name: mycontainer-pv
labels:
app-volume: "mycontainer"
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /tmp/data
I created the /tmp/data dir, created the pv with oc create -f ./pv.yaml
and it shows up in oc get pv:
# oc get pv | grep tw-console-pv
mycontainer-pv 10Gi RWO Retain Bound
mycontainer/mycontainer-console 18h
but when I start my container it fails to start. In the logs I see:
Apr 19 00:13:33 cto-ose4-1 journal: E0419 00:13:33.165666 29278
docker_manager.go:2313] container start failed: RunContainerError:
GenerateRunContainerOptions: lstat /tmp/data: no such file or directory
Apr 19 00:13:33 cto-ose4-1 journal: E0419 00:13:33.165746 29278
pod_workers.go:184] Error syncing pod 970b0907-431c-11e8-bc09-42010af00084,
skipping: failed to "StartContainer" for "mycontainer-console" with
RunContainerError: "GenerateRunContainerOptions: lstat /tmp/data: no such file
or directory"
Apr 19 00:13:40 cto-ose4-1 journal: E0419 00:13:40.258411 29278 utils.go:91]
Unable to get uid from job persistent-volume-setup in namespace default
Apr 19 00:13:42 cto-ose4-1 journal: I0419 00:13:42.975542 29278
operation_executor.go:1079] MountVolume.SetUp succeeded for volume
"kubernetes.io/secret/7c6f7215-42c7-11e8-bc09-42010af00084-registry-token-gwxgv"
(spec.Name: "registry-token-gwxgv") pod "7c6f7215-42c7-11e8-bc09-42010af00084"
(UID: "7c6f7215-42c7-11e8-bc09-42010af00084").
Apr 19 00:13:45 cto-ose4-1 journal: I0419 00:13:45.988758 29278
operation_executor.go:1079] MountVolume.SetUp succeeded for volume
"kubernetes.io/secret/970b0907-431c-11e8-bc09-42010af00084-mycontainer-console-token-7j0m5"
(spec.Name: "mycontainer-console-token-7j0m5") pod
"970b0907-431c-11e8-bc09-42010af00084" (UID:
"970b0907-431c-11e8-bc09-42010af00084").
Apr 19 00:13:45 cto-ose4-1 journal: I0419 00:13:45.991621 29278
operation_executor.go:1079] MountVolume.SetUp succeeded for volume
"kubernetes.io/configmap/970b0907-431c-11e8-bc09-42010af00084-mycontainer-config-volume"
(spec.Name: "mycontainer-config-volume") pod
"970b0907-431c-11e8-bc09-42010af00084" (UID:
"970b0907-431c-11e8-bc09-42010af00084").
Apr 19 00:13:46 cto-ose4-1 journal: E0419 00:13:46.163184 29278
docker_manager.go:2313] container start failed: RunContainerError:
GenerateRunContainerOptions: lstat /tmp/data: no such file or directory
Apr 19 00:13:46 cto-ose4-1 journal: E0419 00:13:46.163247 29278
pod_workers.go:184] Error syncing pod 970b0907-431c-11e8-bc09-42010af00084,
skipping: failed to "StartContainer" for "mycontainer-console" with
RunContainerError: "GenerateRunContainerOptions: lstat /tmp/data: no such file
or directory"
Why does it say "no such file or directory"?
# ls -ld /tmp/data/
drwxr-xr-x. 2 nobody nobody 6 Apr 18 06:05 /tmp/data/
I've tried various permissions and ownership and it's not selinux
because there are no denials in /var/log/audit/audit.log.
What could be the problem here?
Ideas are very much appreciated!
--
Tracy Reed
http://tracyreed.org
Digital signature attached for your safety.
signature.asc
Description: PGP signature
_______________________________________________ users mailing list [email protected] http://lists.openshift.redhat.com/openshiftmm/listinfo/users
