Jenkinsci/Jenkins helm chart - jenkins container stucks at Beginning extraction from war file

505 views Asked by At

I am trying to deploy jenkins to IBM Cloud Kubernetes Service using persistent volume. Jenkins container stucks at Beginning extraction from war file.

I have tried without persistence and it is deployed as expected.

persistence:
  storageClass: ibmc-file-bronze
serviceAccount:
  create: false
  name: jenkins
  annotations: {}
controller:
  customInitContainers:
    - name: "volume-mount-permission"
      image: "busybox"
      command: ["/bin/sh"]
      args:
      - -c
      - >-
          chgrp -R 1000 /var/jenkins_home && 
          chown -R 0 /var/jenkins_home &&
          chmod -R g+rwx /var/jenkins_home
      volumeMounts:
        - name: "jenkins-home"
          mountPath: "/var/jenkins_home"
      securityContext:
        runAsUser: 0
  serviceType: NodePort

This is my values.yaml file. I configured a custom init container for folder permissions. Without this, init container fails with permission issue. With volume-mount-permissions init container, all other containers terminate with success.

The permission of jenkins_home folder is below.

jenkins@jenkins-pv-0:/$ ls -al /var/jenkins_home/
total 44
drwxrwxr-x 6 nobody  jenkins  4096 Nov 26 15:02 .
drwxr-xr-x 1 root    root     4096 Nov 26 15:01 ..
drwxr-xr-x 3 jenkins jenkins  4096 Nov 26 14:50 .cache
drwxrwsrwx 2 root    jenkins  4096 Nov 26 14:50 casc_configs
-rw-r--r-- 1 jenkins jenkins  3106 Nov 26 15:01 copy_reference_file.log
-rw-r--r-- 1 jenkins jenkins     8 Nov 26 14:50 jenkins.install.InstallUtil.lastExecVersion
-rw-r--r-- 1 jenkins jenkins     8 Nov 26 14:50 jenkins.install.UpgradeWizard.state
drwxr-xr-x 2 jenkins jenkins 16384 Nov 26 14:51 plugins
-rw-r--r-- 1 jenkins jenkins    78 Nov 26 14:50 plugins.txt
drwxr-xr-x 6 jenkins jenkins  4096 Nov 26 15:02 war

Logs of Jenkins container is as below:

2020-11-26T15:01:49.195430822Z Running from: /usr/share/jenkins/jenkins.war
2020-11-26T15:01:49.199519383Z webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
2020-11-26T15:01:49.404752124Z 2020-11-26 15:01:49.388+0000 [id=1]  INFO    org.eclipse.jetty.util.log.Log#initialized: Logging initialized @522ms to org.eclipse.jetty.util.log.JavaUtilLog
2020-11-26T15:01:49.585199893Z 2020-11-26 15:01:49.584+0000 [id=1]  INFO    winstone.Logger#logInternal: Beginning extraction from war file

I followed the installation guide from Jenkins official Kubernetes installation.

1

There are 1 answers

0
Hasan Can Volaka On BEST ANSWER

The solution was installing the IBM Cloud Block Storage plug-in.

On IBM Cloud Kubernetes Service, I think, Jenkins cannot be installed on file-storage