[JIRA] (JENKINS-41418) Permission denied while accessing workspace

759 views
Skip to first unread message

mkumatag@in.ibm.com (JIRA)

unread,
Jan 25, 2017, 5:59:02 AM1/25/17
to jenkinsc...@googlegroups.com
Manjunath Kumatagi created an issue
 
Jenkins / Bug JENKINS-41418
Permission denied while accessing workspace
Issue Type: Bug Bug
Assignee: Carlos Sanchez
Components: kubernetes-plugin
Created: 2017/Jan/25 10:58 AM
Priority: Major Major
Reporter: Manjunath Kumatagi

I've added kubernetes cloud in system config and created git project with following Jenkinsfile and trying to run the job and hitting with following permission issues.

podTemplate(label: 'mypod', containers: [
    containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, command: 'cat'),
    containerTemplate(name: 'golang', image: 'golang:1.6.3-alpine', ttyEnabled: true, command: 'cat')
  ],
  volumes: [hostPathVolume(mountPath: "/var/run/docker.sock", hostPath: "/var/run/docker.sock")]) {

    node ('mypod') {
        stage 'Get a Maven project'
        sh """
        cat /etc/resolv.conf
        route
        ip addr show
        """
        git 'https://github.com/jenkinsci/kubernetes-plugin.git'
        container('maven') {
            stage 'Build a Maven project'
            sh 'mvn clean install'
        }

        stage 'Get a Golang project'
        git url: 'https://github.com/hashicorp/terraform.git'
        container('golang') {
            stage 'Build a Go project'
            sh """
            mkdir -p /go/src/github.com/hashicorp
            ln -s `pwd` /go/src/github.com/hashicorp/terraform
            cd /go/src/github.com/hashicorp/terraform && make core-dev
            """
        }

    }
}

Error:

Started by user admin
 > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to g...@github.ibm.com:mkumatag/test-kube-pipeline.git
 > git config remote.origin.url g...@github.ibm.com:mkumatag/test-kube-pipeline.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/master
Seen 1 remote branch
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url g...@github.ibm.com:mkumatag/test-kube-pipeline.git # timeout=10
Fetching upstream changes from g...@github.ibm.com:mkumatag/test-kube-pipeline.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress g...@github.ibm.com:mkumatag/test-kube-pipeline.git +refs/heads/*:refs/remotes/origin/*
Checking out Revision 45e459e4645b1dfb2e27bde2b36503fb1d2926d6 (master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 45e459e4645b1dfb2e27bde2b36503fb1d2926d6
 > git rev-list 45e459e4645b1dfb2e27bde2b36503fb1d2926d6 # timeout=10
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Still waiting to schedule task
kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9 is offline
Running on kubernetes-634383bd02e4408a9ad879376fa358c7-4e37578f5757a in /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA
[Pipeline] {
[Pipeline] stage (Get a Maven project)
Using the 'stage' step without a block argument is deprecated
Entering stage Get a Maven project
Proceeding
[Pipeline] sh
[test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA] Running shell script
+ cat /etc/resolv.conf
+ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         172.17.0.1      0.0.0.0         UG    0      0        0 eth0
172.17.0.0      *               255.255.0.0     U     0      0        0 eth0
+ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
14: eth0@if15: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    link/ether 02:42:ac:11:00:05 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.5/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:acff:fe11:5/64 scope link 
       valid_lft forever preferred_lft forever
+ sleep 30
[Pipeline] git
Cloning the remote Git repository
Cloning repository https://github.com/jenkinsci/kubernetes-plugin.git
 > git init /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA # timeout=10
Fetching upstream changes from https://github.com/jenkinsci/kubernetes-plugin.git
 > git --version # timeout=10
 > git fetch --tags --progress https://github.com/jenkinsci/kubernetes-plugin.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url https://github.com/jenkinsci/kubernetes-plugin.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/jenkinsci/kubernetes-plugin.git # timeout=10
Fetching upstream changes from https://github.com/jenkinsci/kubernetes-plugin.git
 > git fetch --tags --progress https://github.com/jenkinsci/kubernetes-plugin.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision a9bb356e021a89fd174472217aa112ea37c0b308 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a9bb356e021a89fd174472217aa112ea37c0b308
 > git branch -a -v --no-abbrev # timeout=10
 > git checkout -b master a9bb356e021a89fd174472217aa112ea37c0b308
 > git rev-list a9bb356e021a89fd174472217aa112ea37c0b308 # timeout=10
[Pipeline] container
[Pipeline] {
[Pipeline] stage (Build a Maven project)
Using the 'stage' step without a block argument is deprecated
Entering stage Build a Maven project
Proceeding
[Pipeline] sh
[test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA] Running shell script
Executing shell script inside container [maven] of pod [kubernetes-634383bd02e4408a9ad879376fa358c7-4e37578f5757a]
Executing command: sh -c echo $$ > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/pid'; jsc=durable-d2db8e2edcfe3ddf1127c78a3c7156e6; JENKINS_SERVER_COOKIE=$jsc '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/script.sh' > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/jenkins-result.txt' 
cd /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA
sh -c echo $$ > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/pid'; jsc=durable-d2db8e2edcfe3ddf1127c78a3c7156e6; JENKINS_SERVER_COOKIE=$jsc '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/script.sh' > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/jenkins-result.txt' 
exit
/home/jenkins # cd /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQ

LCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA
/bin/sh: cd: can't cd to /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA
/home/jenkins # sh -c echo $$ > '/home/jenkins/workspace/test-kube-pipeline_mast

er-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/pid

'; jsc=durable-d2db8e2edcfe3ddf1127c78a3c7156e6; JENKINS_SERVER_COOKIE=$jsc '/ho

me/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2

C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/script.sh' > '/home/jenkins/workspace/t

est-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tm

p/durable-ee7e41ae/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/workspace/tes

t-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/

durable-ee7e41ae/jenkins-result.txt' 
/bin/sh: can't create /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/pid: Permission denied
/bin/sh: can't create /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/jenkins-log.txt: Permission denied
/bin/sh: can't create /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-ee7e41ae/jenkins-result.txt: Permission denied
/home/jenkins # exit
command terminated with non-zero exit code: Error executing in Docker Container: 1[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

mkumatag@in.ibm.com (JIRA)

unread,
Jan 25, 2017, 6:02:04 AM1/25/17
to jenkinsc...@googlegroups.com
Manjunath Kumatagi commented on Bug JENKINS-41418
 
Re: Permission denied while accessing workspace

Here is the pod in yaml format which got created while running this job:


apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: 2017-01-25T07:13:22Z
  labels:
    jenkins: slave
    jenkins/mypod: "true"
  name: kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9
  namespace: default
  resourceVersion: "860"
  selfLink: /api/v1/namespaces/default/pods/kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9
  uid: c19b9100-e2cd-11e6-b29b-005056aa2e0b
spec:
  containers:
  - command:
    - cat
    env:
    - name: JENKINS_SECRET
      value: 367fe11e3c73e1032ec45faaeea7f06526a32d182b87d3234fd8374e9893ec31
    - name: JENKINS_NAME
      value: kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9
    - name: JENKINS_LOCATION_URL
      value: http://jenkins-master:8080/
    - name: JENKINS_URL
      value: http://jenkins-master:8080
    - name: JENKINS_JNLP_URL
      value: http://jenkins-master:8080/computer/kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9/slave-agent.jnlp
    - name: HOME
      value: /home/jenkins
    image: maven:3.3.9-jdk-8-alpine
    imagePullPolicy: IfNotPresent
    name: maven
    resources: {}
    securityContext:
      privileged: false
    terminationMessagePath: /dev/termination-log
    tty: true
    volumeMounts:
    - mountPath: /var/run/docker.sock
      name: volume-0
    - mountPath: /home/jenkins
      name: workspace-volume
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-q4pkd
      readOnly: true
    workingDir: /home/jenkins
  - command:
    - cat
    env:
    - name: JENKINS_SECRET
      value: 367fe11e3c73e1032ec45faaeea7f06526a32d182b87d3234fd8374e9893ec31
    - name: JENKINS_NAME
      value: kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9
    - name: JENKINS_LOCATION_URL
      value: http://jenkins-master:8080/
    - name: JENKINS_URL
      value: http://jenkins-master:8080
    - name: JENKINS_JNLP_URL
      value: http://jenkins-master:8080/computer/kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9/slave-agent.jnlp
    - name: HOME
      value: /home/jenkins
    image: golang:1.6.3-alpine
    imagePullPolicy: IfNotPresent
    name: golang
    resources: {}
    securityContext:
      privileged: false
    terminationMessagePath: /dev/termination-log
    tty: true
    volumeMounts:
    - mountPath: /var/run/docker.sock
      name: volume-0
    - mountPath: /home/jenkins
      name: workspace-volume
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-q4pkd
      readOnly: true
    workingDir: /home/jenkins
  - args:
    - 367fe11e3c73e1032ec45faaeea7f06526a32d182b87d3234fd8374e9893ec31
    - kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9
    env:
    - name: JENKINS_SECRET
      value: 367fe11e3c73e1032ec45faaeea7f06526a32d182b87d3234fd8374e9893ec31
    - name: JENKINS_NAME
      value: kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9
    - name: JENKINS_LOCATION_URL
      value: http://jenkins-master:8080/
    - name: JENKINS_URL
      value: http://jenkins-master:8080
    - name: JENKINS_JNLP_URL
      value: http://jenkins-master:8080/computer/kubernetes-634383bd02e4408a9ad879376fa358c7-4e36e7bfa07c9/slave-agent.jnlp
    - name: HOME
      value: /home/jenkins
    image: jenkinsci/jnlp-slave:alpine
    imagePullPolicy: IfNotPresent
    name: jnlp
    resources: {}
    securityContext:
      privileged: false
    terminationMessagePath: /dev/termination-log
    volumeMounts:
    - mountPath: /var/run/docker.sock
      name: volume-0
    - mountPath: /home/jenkins
      name: workspace-volume
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-q4pkd
      readOnly: true
    workingDir: /home/jenkins
  dnsPolicy: ClusterFirst
  nodeName: 127.0.0.1
  restartPolicy: Never
  schedulername: default-scheduler
  securityContext: {}
  serviceAccount: default
  serviceAccountName: default
  terminationGracePeriodSeconds: 30
  volumes:
  - hostPath:
      path: /var/run/docker.sock
    name: volume-0
  - emptyDir: {}
    name: workspace-volume
  - name: default-token-q4pkd
    secret:
      defaultMode: 420
      secretName: default-token-q4pkd
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: 2017-01-25T07:13:22Z
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: 2017-01-25T07:13:22Z
    message: 'containers with unready status: [jnlp]'
    reason: ContainersNotReady
    status: "False"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: 2017-01-25T07:13:22Z
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: docker://471e625e4f3832055e75d1c50ee61f663244fa70d63bb54aab1456ed4d04d40e
    image: docker.io/golang:1.6.3-alpine
    imageID: docker-pullable://docker.io/golang@sha256:6654d7df76000e3fa23576fd94890a72392fbb1302594e5e2d0a0a1bff169c7c
    lastState: {}
    name: golang
    ready: true
    restartCount: 0
    state:
      running:
        startedAt: 2017-01-25T07:13:23Z
  - containerID: docker://5a6983062767db39474895f4d682d2540d09445772d4ae3c68374c50916d3116
    image: docker.io/jenkinsci/jnlp-slave:alpine
    imageID: docker-pullable://docker.io/jenkinsci/jnlp-slave@sha256:846676e95a2e690fa1de424bcd512fb4f0b71b6061f3998cb3b8a12383a15ded
    lastState: {}
    name: jnlp
    ready: false
    restartCount: 0
    state:
      terminated:
        containerID: docker://5a6983062767db39474895f4d682d2540d09445772d4ae3c68374c50916d3116
        exitCode: 1
        finishedAt: 2017-01-25T07:13:25Z
        reason: Error
        startedAt: 2017-01-25T07:13:24Z
  - containerID: docker://e106d7281949110626e3c5b5b50f5c7520a7a23488f8af509c120a40280e4a7a
    image: docker.io/maven:3.3.9-jdk-8-alpine
    imageID: docker-pullable://docker.io/maven@sha256:d5aabe35d2ede10587c7d826aab02482751504f39fab21aa5f6ee35cd2cc16b4
    lastState: {}
    name: maven
    ready: true
    restartCount: 0
    state:
      running:
        startedAt: 2017-01-25T07:13:25Z
  hostIP: 127.0.0.1
  phase: Running
  podIP: 172.17.0.2
  qosClass: BestEffort
  startTime: 2017-01-25T07:13:22Z

sergey@kulanov.org.ua (JIRA)

unread,
Jan 26, 2017, 8:09:02 AM1/26/17
to jenkinsc...@googlegroups.com

please try to copy/paste the exact code from example https://github.com/jenkinsci/kubernetes-plugin#pipeline-support

and paste the result here

mkumatag@in.ibm.com (JIRA)

unread,
Jan 27, 2017, 2:03:02 AM1/27/17
to jenkinsc...@googlegroups.com

I copy pasted exact code from above git repo and tried running it,.. Jos is waiting for slave to be up and running to run the job but slave never came up and here what I find in the kubernetes:

[root@<kubernetes-master> kubernetes]# ./cluster/kubectl.sh get pods
NAME                                                        READY     STATUS              RESTARTS   AGE
kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9   0/3       ContainerCreating   0          5m


[root@<kubernetes-master> kubernetes]# ./cluster/kubectl.sh describe pod kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9
Name:		kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9
Namespace:	default
Node:		127.0.0.1/127.0.0.1
Start Time:	Fri, 27 Jan 2017 01:47:41 -0500
Labels:		jenkins=slave
		jenkins/mypod=true
Status:		Pending
IP:		
Controllers:	<none>
Containers:
  maven:
    Container ID:	
    Image:		maven:3.3.9-jdk-8-alpine
    Image ID:		
    Port:		
    Command:
      cat
    State:		Waiting
      Reason:		ContainerCreating
    Ready:		False
    Restart Count:	0
    Volume Mounts:
      /etc/shared-secrets from volume-0 (rw)
      /home/jenkins from workspace-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-jqq8v (ro)
    Environment Variables from:	<none>
    Environment Variables:
      JENKINS_SECRET:		0c574b20fd8c968fbc2671d550c454c8c15e9cbb4cb810055c9dae547ac428a5
      JENKINS_NAME:		kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9
      JENKINS_LOCATION_URL:	http://<jenkins-master>:8080/
      JENKINS_URL:		http://<jenkins-master>:8080
      JENKINS_JNLP_URL:		http://<jenkins-master>:8080/computer/kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9/slave-agent.jnlp
      HOME:			/home/jenkins
  golang:
    Container ID:	
    Image:		golang:1.6.3-alpine
    Image ID:		
    Port:		
    Command:
      cat
    State:		Waiting
      Reason:		ContainerCreating
    Ready:		False
    Restart Count:	0
    Volume Mounts:
      /etc/shared-secrets from volume-0 (rw)
      /home/jenkins from workspace-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-jqq8v (ro)
    Environment Variables from:	<none>
    Environment Variables:
      JENKINS_SECRET:		0c574b20fd8c968fbc2671d550c454c8c15e9cbb4cb810055c9dae547ac428a5
      JENKINS_NAME:		kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9
      JENKINS_LOCATION_URL:	http://<jenkins-master>:8080/
      JENKINS_URL:		http://<jenkins-master>:8080
      JENKINS_JNLP_URL:		http://<jenkins-master>:8080/computer/kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9/slave-agent.jnlp
      HOME:			/home/jenkins
  jnlp:
    Container ID:	
    Image:		jenkinsci/jnlp-slave:alpine
    Image ID:		
    Port:		
    Args:
      0c574b20fd8c968fbc2671d550c454c8c15e9cbb4cb810055c9dae547ac428a5
      kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9
    State:		Waiting
      Reason:		ContainerCreating
    Ready:		False
    Restart Count:	0
    Volume Mounts:
      /etc/shared-secrets from volume-0 (rw)
      /home/jenkins from workspace-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-jqq8v (ro)
    Environment Variables from:	<none>
    Environment Variables:
      JENKINS_SECRET:		0c574b20fd8c968fbc2671d550c454c8c15e9cbb4cb810055c9dae547ac428a5
      JENKINS_NAME:		kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9
      JENKINS_LOCATION_URL:	http://<jenkins-master>:8080/
      JENKINS_URL:		http://<jenkins-master>:8080
      JENKINS_JNLP_URL:		http://<jenkins-master>:8080/computer/kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9/slave-agent.jnlp
      HOME:			/home/jenkins
Conditions:
  Type		Status
  Initialized 	True 
  Ready 	False 
  PodScheduled 	True 
Volumes:
  volume-0:
    Type:	Secret (a volume populated by a Secret)
    SecretName:	shared-secrets
  workspace-volume:
    Type:	EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:	
  default-token-jqq8v:
    Type:	Secret (a volume populated by a Secret)
    SecretName:	default-token-jqq8v
QoS Class:	BestEffort
Node-Selectors:	<none>
Tolerations:	<none>
Events:
  FirstSeen	LastSeen	Count	From			SubObjectPath	Type		Reason		Message
  ---------	--------	-----	----			-------------	--------	------		-------
  5m		5m		1	{default-scheduler }			Normal		Scheduled	Successfully assigned kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9 to 127.0.0.1
  5m		1m		10	{kubelet 127.0.0.1}			Warning		FailedMount	MountVolume.SetUp failed for volume "kubernetes.io/secret/80020c1e-e45c-11e6-9dc3-005056aa2e0b-volume-0" (spec.Name: "volume-0") pod "80020c1e-e45c-11e6-9dc3-005056aa2e0b" (UID: "80020c1e-e45c-11e6-9dc3-005056aa2e0b") with: secrets "shared-secrets" not found
  3m		1m		2	{kubelet 127.0.0.1}			Warning		FailedMount	Unable to mount volumes for pod "kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9_default(80020c1e-e45c-11e6-9dc3-005056aa2e0b)": timeout expired waiting for volumes to attach/mount for pod "default"/"kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9". list of unattached/unmounted volumes=[volume-0]
  3m		1m		2	{kubelet 127.0.0.1}			Warning		FailedSync	Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "default"/"kubernetes-68ce0b016db741cc9bc7f89b961e3bbd-57f30d1779ab9". list of unattached/unmounted volumes=[volume-0]
[root@<kubernetes-master> kubernetes]#

secret volume was the only difference what I had in my earlier try volumes: [secretVolume(secretName: 'shared-secrets', mountPath: '/etc/shared-secrets')].

The steps I'm trying are :

1. export API_HOST_IP="0.0.0.0"
2. Running the kubernetes cluster with the help of "./hack/local-up-cluster.sh"
3. exposed 8080 port on the same machine
4. Configured the kubernetes cloud in the jenkins configuration with IP : http://<kubernetes-master>:8080
5. Created this job and running it.

Please let me know if I'm missing something here? like creating some sort of a secret and put it somewhere!

sergey@kulanov.org.ua (JIRA)

unread,
Jan 27, 2017, 5:07:01 AM1/27/17
to jenkinsc...@googlegroups.com

Actually I have the same issue, but it's not 100% reproducible, `waiting to start slave`, that's why I asked your to check the example. Ok so, please try to define jnlp container explicitly:

          containerTemplate(
              name: 'jnlp',
              image: jnlpSlaveImg,
              args: '${computer.jnlpmac} ${computer.name}'
          )

where jnlpSlaveImg can by upstream jenkinsci/jnlp-slave:2.62-alpine or any other which you customized

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Jan 29, 2017, 12:15:01 PM1/29/17
to jenkinsc...@googlegroups.com

I have removed the shared-secrets volume from the example, as it won't work out of the bat. You can see the error in your "describe"

Warning		FailedMount	MountVolume.SetUp failed for volume "kubernetes.io/secret/80020c1e-e45c-11e6-9dc3-005056aa2e0b-volume-0" (spec.Name: "volume-0") pod "80020c1e-e45c-11e6-9dc3-005056aa2e0b" (UID: "80020c1e-e45c-11e6-9dc3-005056aa2e0b") with: secrets "shared-secrets" not found

Now, if you describe the pods created in your pipeline, do you get error messages in the events section ?
Also check kubectl logs pods/(your pod name) jnlp for errors

mkumatag@in.ibm.com (JIRA)

unread,
Feb 1, 2017, 1:29:01 AM2/1/17
to jenkinsc...@googlegroups.com

Removed the secret volume and ran the job, hitting with the problem mentioned in the description, "Build a Maven project" stage is failing. Here is the complete build console output:

Started by user admin
 > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to g...@github.ibm.com:mkumatag/test-kube-pipeline.git
 > git config remote.origin.url g...@github.ibm.com:mkumatag/test-kube-pipeline.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/master
Seen 1 remote branch
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url g...@github.ibm.com:mkumatag/test-kube-pipeline.git # timeout=10
Fetching upstream changes from g...@github.ibm.com:mkumatag/test-kube-pipeline.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress g...@github.ibm.com:
mkumatag/test-kube-pipeline.git +refs/heads/*:refs/remotes/origin/*
Checking out Revision 916212bda350d9ea81c1419c2501f5177e396a8b (master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 916212bda350d9ea81c1419c2501f5177e396a8b
 > git rev-list 916212bda350d9ea81c1419c2501f5177e396a8b # timeout=10
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Running on kubernetes-3f499c55e0fb4feea46c66e78e82ded3-70682873cd6d3 in /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA
[Pipeline] {
[Pipeline] stage (Get a Maven project)
Using the ‘stage’ step without a block argument is deprecated
Entering stage Get a Maven project
Proceeding
[Pipeline] git
Cloning the remote Git repository
Cloning repository https://github.com/jenkinsci/kubernetes-plugin.git
 > git init /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA # timeout=10
Fetching upstream changes from https://github.com/jenkinsci/kubernetes-plugin.git
 > git --version # timeout=10
 > git fetch --tags --progress https://github.com/jenkinsci/kubernetes-plugin.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url https://github.com/jenkinsci/kubernetes-plugin.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/jenkinsci/kubernetes-plugin.git # timeout=10
Fetching upstream changes from https://github.com/jenkinsci/kubernetes-plugin.git
 > git fetch --tags --progress https://github.com/jenkinsci/kubernetes-plugin.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 8078e125c4e2241814ce70a129b8fb7ab4abe81a (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 8078e125c4e2241814ce70a129b8fb7ab4abe81a
 > git branch -a -v --no-abbrev # timeout=10
 > git checkout -b master 8078e125c4e2241814ce70a129b8fb7ab4abe81a
 > git rev-list 8078e125c4e2241814ce70a129b8fb7ab4abe81a # timeout=10
[Pipeline] container
[Pipeline] {
[Pipeline] stage (Build a Maven project)
Using the ‘stage’ step without a block argument is deprecated
Entering stage Build a Maven project
Proceeding
[Pipeline] sh
[test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA] Running shell script
Executing shell script inside container [maven] of pod [kubernetes-3f499c55e0fb4feea46c66e78e82ded3-70682873cd6d3]
Executing command: sh -c echo $$ > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/pid'; jsc=durable-d2db8e2edcfe3ddf1127c78a3c7156e6; JENKINS_SERVER_COOKIE=$jsc '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/script.sh' > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/jenkins-result.txt' 
cd /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA
sh -c echo $$ > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/pid'; jsc=durable-d2db8e2edcfe3ddf1127c78a3c7156e6; JENKINS_SERVER_COOKIE=$jsc '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/script.sh' > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/jenkins-result.txt' 
exit
/home/jenkins # cd /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQ

LCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA
/bin/sh: cd: can't cd to /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA
/home/jenkins # sh -c echo $$ > '/home/jenkins/workspace/test-kube-pipeline_mast

er-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/pid

'; jsc=durable-d2db8e2edcfe3ddf1127c78a3c7156e6; JENKINS_SERVER_COOKIE=$jsc '/ho

me/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2

C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/script.sh' > '/home/jenkins/workspace/t

est-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tm

p/durable-b11ca984/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/workspace/tes

t-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/

durable-b11ca984/jenkins-result.txt' 
/bin/sh: can't create /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/pid: Permission denied
/bin/sh: can't create /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/jenkins-log.txt: Permission denied
/bin/sh: can't create /home/jenkins/workspace/test-kube-pipeline_master-IUIW3TJVYLQLCZOGWHIM6BOJZ3VXUBKJ2C2L4YNTBE4GL52NRMEA@tmp/durable-b11ca984/jenkins-result.txt: Permission denied
/home/jenkins # exit
command terminated with non-zero exit code: Error executing in Docker Container: 1[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
 
                                                            

I don't see any surprise in jnlp pod log:

[root@kube-master kubernetes]# ./cluster/kubectl.sh logs kubernetes-3f499c55e0fb4feea46c66e78e82ded3-70682873cd6d3 jnlp
Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: kubernetes-3f499c55e0fb4feea46c66e78e82ded3-70682873cd6d3
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://jenkins-master:8080]
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to jenkins-master:4420
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Protocol JNLP3-connect is not enabled, skipping
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP2-connect
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
Feb 01, 2017 6:19:05 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
[root@kube-master kubernetes]#

I tried maven logs but couldn't get any logs, I suspect that while bringing while getting into maven containers workspace it is getting some permission issues and failing the job. Not really sure with what permissions this shared jenkins workspace with created which is creating the problem here!

mkumatag@in.ibm.com (JIRA)

unread,
Feb 1, 2017, 1:31:02 AM2/1/17
to jenkinsc...@googlegroups.com
Manjunath Kumatagi edited a comment on Bug JENKINS-41418
Removed the secret volume and ran the job, hitting with the problem mentioned in the description, "Build a Maven project" stage is failing. Here is the complete build console output:


{code:java}
{code}



I don't see any surprise in jnlp pod log:


{code:java}

[root@kube-master kubernetes]# ./cluster/kubectl.sh logs kubernetes-3f499c55e0fb4feea46c66e78e82ded3-70682873cd6d3 jnlp
Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: kubernetes-3f499c55e0fb4feea46c66e78e82ded3-70682873cd6d3
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://jenkins-master:8080]
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to jenkins-master:4420
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Protocol JNLP3-connect is not enabled, skipping
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP2-connect
Feb 01, 2017 6:18:44 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
Feb 01, 2017 6:19:05 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
[root@kube-master kubernetes]#
{code}


I tried maven logs but couldn't get any logs, I suspect that while
bringing while getting into maven containers workspace it is getting some permission issues and failing the job. Not really sure with what permissions this shared jenkins workspace with created which is creating the problem here!

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Feb 12, 2017, 5:59:02 AM2/12/17
to jenkinsc...@googlegroups.com

What version of kubernetes are you using?
The only reason I can think this would fail is if containers were using different permissions, because they are all accessing the same emptyVolume

Can you try exec'ing into the containers and list the permissions in /home/jenkins/workspace and subdirs and possibly trying to write a file in there from the 3 containers to see if it works or fails ?

mkumatag@in.ibm.com (JIRA)

unread,
Mar 5, 2017, 11:55:03 PM3/5/17
to jenkinsc...@googlegroups.com
Manjunath Kumatagi closed an issue as Cannot Reproduce
 
Change By: Manjunath Kumatagi
Status: Open Closed
Resolution: Cannot Reproduce
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

mkumatag@in.ibm.com (JIRA)

unread,
Mar 5, 2017, 11:55:03 PM3/5/17
to jenkinsc...@googlegroups.com
Manjunath Kumatagi commented on Bug JENKINS-41418
 
Re: Permission denied while accessing workspace

After trying with all latest - kubernetes, jenkins plugin I'm not seeing this issue anymore. Will report a new issue or reopen this if I hit this issue again, -Thanks.

ashok.mohanty@oracle.com (JIRA)

unread,
Jul 10, 2019, 8:50:03 AM7/10/19
to jenkinsc...@googlegroups.com

I am getting same permission issue (but its in-frequent) when using different user with uid:1000. Will it help by changing to uid:10000 !! I have Jenkins - 2.121.3 and Kubernetes Plugin - 1.12.7 . 

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

madhuramd7@gmail.com (JIRA)

unread,
Mar 31, 2020, 5:17:04 AM3/31/20
to jenkinsc...@googlegroups.com

Hi I have a similar issue on reading a shell script from jenkins it says Permission denied. 

Im using a user as root  ('-net=host -v /var/run/docker.sock:/var/run/docker.sock:rw entrypoint="" -user root')
> git rev-parse refs/remotes/origin/alva-6308^{commit} # timeout=10*14:18:55* > git rev-parse refs/remotes/origin/origin/alva-6308^{commit} # timeout=10*14:18:55* > git config core.sparsecheckout # timeout=10*14:18:55* > git checkout -f 25ac94a8cf190640ef0c6375f923aac17e07a9ab # timeout=10*14:18:55* > git rev-list --no-walk 595cc8a05be707ec2f50d156f331f17f65919656 # timeout=10[Pipeline] readYaml[Pipeline] stage[Pipeline] { (Read and execute terraform modules)[Pipeline] script[Pipeline] {[Pipeline] dir*14:18:56* Running in /home/jenkins/workspace/alva/newrelic_terraform_testing/dev/terraform/newrelic/container_policies[Pipeline] {[Pipeline] withCredentials*14:18:56* Masking supported pattern matches of $MCS_NONPROD_CORP[Pipeline] {[Pipeline] sh*14:18:56* + ./terraform-newrelic-init.sh ****

14:18:56 /home/jenkins/workspace/alva/newrelic_terraform_testing/dev/terraform/newrelic/container_policies@tmp/durable-1125f127/script.sh: line 2: ./terraform-newrelic-init.sh: Permission denied
 
Can someone suggest on this? I am blocked with this. Where can I set permissions to read shell script?

            

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

madhuramd7@gmail.com (JIRA)

unread,
Mar 31, 2020, 5:20:03 AM3/31/20
to jenkinsc...@googlegroups.com
Madhura Dhananjaya edited a comment on Bug JENKINS-41418
Hi I have a similar issue on reading a shell script from jenkins it says Permission denied. 

Im using a user as root   ('--net=host -v /var/run/docker.sock:/var/run/docker.sock:rw --entrypoint="" --user root')
> git rev-parse refs/remotes/origin/alva-6308^\{commit} # timeout=10*14:18:55*
   > git rev-parse refs/remotes/origin/origin/alva-6308^\{commit} # timeout=10*14:18:55*

   > git config core.sparsecheckout # timeout=10*14:18:55*

   > git checkout -f 25ac94a8cf190640ef0c6375f923aac17e07a9ab # timeout=10*14:18:55*

   > git rev-list --no-walk 595cc8a05be707ec2f50d156f331f17f65919656 # timeout=10

[Pipeline] readYaml readYam

l
[Pipeline] stage

[Pipeline] { (Read and execute terraform modules)

[Pipeline] script

[Pipeline]

{[Pipeline] dir

*14:18:56*  Running in /home/jenkins/workspace/alva/newrelic_terraform_testing/dev/terraform/newrelic/container_policies[Pipeline]

{[Pipeline] withCredentials

*14:18:56*  Masking supported pattern matches of $MCS_NONPROD_CORP

[Pipeline]

{[Pipeline] sh*14:18:56*  + ./terraform-newrelic-init.sh ****


*14:18:56*  */home/jenkins/workspace/alva/newrelic_terraform_testing/dev/terraform/newrelic/container_policies@tmp/durable-1125f127/script.sh: line 2: ./terraform-newrelic-init.sh: Permission denied*

 
Can someone suggest on this? I am blocked with this. Where can I set permissions to read shell script?

            

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Mar 31, 2020, 5:23:03 AM3/31/20
to jenkinsc...@googlegroups.com

please do not ask questions in closed issues. Use the jenkins-user mailing list

madhuramd7@gmail.com (JIRA)

unread,
Apr 1, 2020, 1:07:14 AM4/1/20
to jenkinsc...@googlegroups.com
Madhura Dhananjaya updated an issue
 
Change By: Madhura Dhananjaya
Comment:
Hi I have a similar issue on reading a shell script from jenkins it says Permission denied. 

Im using a user as root 
> git rev-parse refs/remotes/origin/alva-6308^\{commit} # timeout=10*14:18:55*

> git rev-parse refs/remotes/origin/origin/alva-6308^\{commit} # timeout=10*14:18:55*

> git config core.sparsecheckout # timeout=10*14:18:55*

> git checkout -f 25ac94a8cf190640ef0c6375f923aac17e07a9ab # timeout=10*14:18:55*

> git rev-list --no-walk 595cc8a05be707ec2f50d156f331f17f65919656 # timeout=10

[Pipeline] readYam


l[Pipeline] stage

[Pipeline] { (Read and execute terraform modules)

[Pipeline] script

[Pipeline]

{[Pipeline] dir

*14:18:56* Running in /home/jenkins/workspace/alva/newrelic_terraform_testing/dev/terraform/newrelic/container_policies[Pipeline]

{[Pipeline] withCredentials

*14:18:56* Masking supported pattern matches of $MCS_NONPROD_CORP

[Pipeline]

{[Pipeline] sh*14:18:56* + ./terraform-newrelic-init.sh ****

*14:18:56* */home/jenkins/workspace/alva/newrelic_terraform_testing/dev/terraform/newrelic/container_policies@tmp/durable-1125f127/script.sh: line 2: ./terraform-newrelic-init.sh: Permission denied*
 
Can someone suggest on this? I am blocked with this. Where can I set permissions to read shell script?

            
Reply all
Reply to author
Forward
0 new messages