After deploying F8 templates on my CDK, I'm seeing the following errors on my nexus pod...
Caused by: java.nio.file.AccessDeniedException: /sonatype-work/storage/central
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[na:1.8.0_74]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_74]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_74]
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[na:1.8.0_74]
I used the 'gofabric8 volumes' to create the volumes on my CDK
oc describe po/nexus-1-553l4
Name: nexus-1-553l4
Namespace: default
Security Policy: anyuid
Node: cdk.vm/192.168.121.20
Start Time: Tue, 22 Nov 2016 23:40:35 -0300
Labels: deployment=nexus-1
deploymentconfig=nexus
group=io.fabric8.devops.apps
project=nexus
provider=fabric8
version=2.2.297
Status: Running
IP: 172.17.0.3
Controllers: ReplicationController/nexus-1
Containers:
nexus:
Container ID: docker://ba225858b65f5a5d73d1b14353b1e817dde0dabaab0ff166a76d6fa28907a751
Image: fabric8/nexus:2.2.297
Image ID: docker-pullable://docker.io/fabric8/nexus@sha256:6051d102ac8e5b2699bf6017d4167b1b03c8584afb26db53af1c5508e2a7b3f1
Port: 8081/TCP
Limits:
cpu: 0
memory: 0
Requests:
cpu: 0
memory: 0
State: Running
Started: Tue, 22 Nov 2016 23:40:38 -0300
Ready: True
Restart Count: 0
Liveness: http-get http://:8081/content/repositories/ delay=60s timeout=10s period=10s #success=1 #failure=3
Volume Mounts:
/sonatype-work/storage from nexus-storage (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-2futs (ro)
Environment Variables:
KUBERNETES_NAMESPACE: default (v1:metadata.namespace)
Conditions:
Type Status
Initialized True
Ready True
PodScheduled True
Volumes:
nexus-storage:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: nexus-storage
ReadOnly: false
default-token-2futs:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-2futs
oc get persistentvolume
NAME CAPACITY ACCESSMODES STATUS CLAIM REASON AGE
default-jenkins-workspace 1Gi RWO Bound default/jenkins-workspace 29m
default-nexus-storage 1Gi RWO Bound default/nexus-storage 29m
pv01 1Gi RWO,RWX Bound default/gogs-data 1h
pv02 2Gi RWO,RWX Bound default/jenkins-jobs 1h
pv03 3Gi RWO,RWX Bound default/jenkins-mvn-local-repo 1h
oc describe pv/default-nexus-storage 1 ↵
Name: default-nexus-storage
Labels: <none>
Status: Bound
Claim: default/nexus-storage
Reclaim Policy: Recycle
Access Modes: RWO
Capacity: 1Gi
Message:
Source:
Type: HostPath (bare host directory volume)
Path: /data/default/nexus-storage
No events.
[vagrant@cdk ~]$ ls -la /data/default/
total 0
drwxr-xr-x. 4 root root 52 Nov 22 21:26 .
drwxr-xr-x. 3 root root 21 Nov 22 21:23 ..
drwxr-xr-x. 2 root root 6 Nov 22 21:23 jenkins-workspace
drwxr-xr-x. 2 root root 6 Nov 22 21:26 nexus-storage
I'm suspecting the 'HostPath' volume type is not supported on CDK...
CDK comes with 3 volumes of NFS type... They were picked by gogs and jenkins pods.
what is missing?