sabre1041 / ose-jenkins-cluster

[DEPRECATED] Jenkins slave cluster on OpenShift
17 stars 64 forks source link

jenkins-cluster-persistent jenkins pod stuck at ContainerCreating #5

Closed itewk closed 8 years ago

itewk commented 8 years ago

When I try to create a persistent Jenkins cluster using the jenkins-cluster-persistent the jenkins pod is getting stuck with a status of "ContainerCreating". I am not sure where to find logs that would be helpful in debugging this.

Creating the app:

[root@master-1 ~]# oc new-app --template=jenkins-cluster-persistent
--> Deploying template jenkins-cluster-persistent for "jenkins-cluster-persistent"
     With parameters:
      APPLICATION_NAME=jenkins
      Application hostname=
      JENKINS_PASSWORD=password # generated
      JENKINS_SERVICE_ACCOUNT=default
      JENKINS_IMAGE_TAG=ose-jenkins:1.609-15
      GIT_URI=https://github.com/sabre1041/ose-jenkins-cluster.git
      GIT_REF=master
      EXECUTORS=1
      SLAVE_RECCURENCE_PERIOD=500
      VOLUME_CAPACITY=512Mi
--> Creating resources with label app=jenkins ...
    ImageStream "jenkins" created
    ImageStream "jenkins-slave" created
    ImageStream "rhel7" created
    ImageStream "ose-jenkins" created
    Service "jenkins" created
    Service "jenkins-slave" created
    BuildConfig "jenkins" created
    BuildConfig "jenkins-slave" created
    Route "jenkins" created
    PersistentVolumeClaim "jenkins" created
    DeploymentConfig "jenkins" created
    DeploymentConfig "jenkins-slave" created
--> Success
    Build scheduled for "jenkins" - use the logs command to track its progress.
    Build scheduled for "jenkins-slave" - use the logs command to track its progress.
    Run 'oc status' to view your app.

The pod status:

[root@master-1 ~]# oc get pod
NAME                    READY     STATUS              RESTARTS   AGE
jenkins-1-build         0/1       Completed           0          1m
jenkins-1-q1iek         0/1       ContainerCreating   0          1m
jenkins-slave-1-build   1/1       Running             0          1m

Persistent Volume Status:

[root@master-1 ~]# oc get pv
NAME              LABELS    CAPACITY   ACCESSMODES   STATUS    CLAIM                    REASON    AGE
jenkins           <none>    1Gi        RWO           Bound     jenkins/jenkins                    2m
registry-volume   <none>    10Gi       RWX           Bound     default/registry-claim             5d

Persistent Volume Claim Status:

[root@master-1 ~]# oc get pvc
NAME      LABELS                                            STATUS    VOLUME    CAPACITY   ACCESSMODES   AGE
jenkins   app=jenkins,template=jenkins-cluster-persistent   Bound     jenkins   1Gi        RWO           1m
[root@master-1 ~]# oc get pv

Configure used to create the Persistent Volume:

apiVersion: "v1"
kind: "PersistentVolume"
metadata:
  name: "jenkins"
spec:
  capacity:
    storage: "1Gi"
  accessModes:
    - "ReadWriteOnce"
  nfs:
    path: "/opt/nfs/ose/jenkins"
    server: "nfs.itewk.com"
  persistentVolumeReclaimPolicy: "Recycle"
sabre1041 commented 8 years ago

Describe the pod

oc describe pod <pod_id>

This should describe if there are issues accessing the NFS server

itewk commented 8 years ago

@sabre1041 Thank you. At the same time I found the error log in the UI and it was having trouble with the NFS mount. I had forgot to restart the NFS server after updating /etc/export