[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen commented on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 
This is also happening in a Freestyle shell step: 


shell script

 

docker run -t -v $(pwd):$(pwd):rw -w $(pwd) -u $(id -u):$(id -g) buildpack-deps:jessie-scm bash -c 'pwd; touch derpstylze; ls -alF'
 

 


freestyle results

 

Started by user Jacob Blain Christen
Building remotely on build-51a6c63e (swarm build docker) in workspace /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell
[jenkins-docker-freestyle-shell] $ /bin/sh -xe /tmp/hudson5400900401427204197.sh
+ pwd
+ pwd
+ pwd
+ id -u
+ id -g
+ docker run -t -v /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell:/var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell:rw -w /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell -u 1000:1000 buildpack-deps:jessie-scm bash -c pwd; touch derpstylze; ls -alF
/var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell
touch: cannot touch 'derpstylze': Permission denied
total 8
drwxr-xr-x 2 root root 4096 Apr 13 07:23 ./
drwxr-xr-x 3 root root 4096 Apr 13 07:23 ../
Finished: SUCCESS
 

 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jen

[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 This is also happening in a Freestyle shell step:{code:title= freestyle shell script}docker run -t -v $(pwd):$(pwd):rw -w $(pwd) -u $(id -u):$(id -g) buildpack-deps:jessie-scm bash -c 'pwd; touch derpstylze; ls -alF'{code}{code:title=freestyle results}Started by user Jacob Blain ChristenBuilding remotely on build-51a6c63e (swarm build docker) in workspace /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell[jenkins-docker-freestyle-shell] $ /bin/sh -xe /tmp/hudson5400900401427204197.sh+ pwd+ pwd+ pwd+ id -u+ id -g+ docker run -t -v /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell:/var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell:rw -w /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shell -u 1000:1000 buildpack-deps:jessie-scm bash -c pwd; touch derpstylze; ls -alF/var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-freestyle-shelltouch: cannot touch 'derpstylze': Permission deniedtotal 8drwxr-xr-x 2 root root 4096 Apr 13 07:23 ./drwxr-xr-x 3 root root 4096 Apr 13 07:23 ../Finished: SUCCESS{code} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen commented on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 


slave Dockerfile

 

FROM java:8-jdk

MAINTAINER Jacob Blain Christen //github.com/dweomer, https://twitter.com/dweomer>

ARG DOCKER_VERSION=1.10.3
ARG GOSU_VERSION=1.7
ARG TINI_VERSION=0.8.4

LABEL   "ARG:DOCKER_VERSION"="${DOCKER_VERSION}" \
"ARG:GOSU_VERSION"="${GOSU_VERSION}" \
"ARG:TINI_VERSION"="${TINI_VERSION}"

ENV JENKINS_GROUP=jenkins \
JENKINS_HOME=/var/lib/jenkins \
JENKINS_USER=jenkins

RUN set -x \
 && export DEBIAN_FRONTEND=noninteractive \
 && apt-get update \
### Install netstat to allow connection health check with `netstat -tan | grep ESTABLISHED`
 && apt-get install -y \
curl \
git \
net-tools \
wget \
### Install Docker
 && curl -fsSL --create-dirs --output /usr/local/bin/docker \
"https://get.docker.com/builds/$(uname -s)/$(uname -m)/docker-${DOCKER_VERSION}" \
 && chmod -v +x /usr/local/bin/docker \
### Install Gosu
 && curl -fsSL --create-dirs --output /usr/local/bin/gosu \
"https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture)" \
 && chmod -v +x /usr/local/bin/gosu \
### Install Tini
 && curl --create-dirs -sSLo /usr/local/bin/tini \
"https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static" \
 && chmod -v +x /usr/local/bin/tini \
### Create Jenkins User
 && groupadd ${JENKINS_GROUP} \
 && useradd -c "Jenkins Swarm Agent" -d ${JENKINS_HOME} -g ${JENKINS_GROUP} -m ${JENKINS_USER} \
### Cleanup
 && apt-get clean \
 && rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*

COPY rootfs /
ENTRYPOINT ["/jenkins-swarm-slave.sh"]

RUN set -x \
 && chmod -v +x /jenkins-swarm-slave.sh \
 && find /jenkins-swarm-slave* -type f

WORKDIR ${JENKINS_HOME}
VOLUME ${JENKINS_HOME}
 

 


slave docker-compose.yml (snippet)

 

version: '2'

networks:
  jenkins:
driver: overlay

services:
  build:
command: "-name build -executors 2 -labels 'docker build' -master http://jenkins-master:8080 -mode normal -username jenkins -password jenkins1"
cpu_shares: 2
environment:
  - "constraint:jenkins==build"
  - "JAVA_OPTS=-Djava.awt.headless=true -Duser.timezone=America/Phoenix"
image: jenkins-swarm-slave
networks:
  - jenkins
restart: "on-failure:10"
volumes:
  - /var/lib:/var/lib:rw
  - /var/run:/var/run:rw
 

 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 

[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 {code:title=slave Dockerfile}FROM java:8-jdkMAINTAINER Jacob Blain Christen ARG DOCKER_VERSION=1.10.3ARG GOSU_VERSION=1.7ARG TINI_VERSION=0.8.4LABEL   "ARG:DOCKER_VERSION"="${DOCKER_VERSION}" \"ARG:GOSU_VERSION"="${GOSU_VERSION}" \"ARG:TINI_VERSION"="${TINI_VERSION}"ENV JENKINS_GROUP=jenkins \JENKINS_HOME=/var/lib/jenkins \JENKINS_USER=jenkinsRUN set -x \ && export DEBIAN_FRONTEND=noninteractive \ && apt-get update \### Install netstat to allow connection health check with `netstat -tan | grep ESTABLISHED` && apt-get install -y \curl \git \net-tools \wget \### Install Docker && curl -fsSL --create-dirs --output /usr/local/bin/docker \"https://get.docker.com/builds/$(uname -s)/$(uname -m)/docker-${DOCKER_VERSION}" \ && chmod -v +x /usr/local/bin/docker \### Install Gosu && curl -fsSL --create-dirs --output /usr/local/bin/gosu \"https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture)" \ && chmod -v +x /usr/local/bin/gosu \### Install Tini && curl --create-dirs -sSLo /usr/local/bin/tini \"https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static" \ && chmod -v +x /usr/local/bin/tini \### Create Jenkins User && groupadd ${JENKINS_GROUP} \ && useradd -c "Jenkins Swarm Agent" -d ${JENKINS_HOME} -g ${JENKINS_GROUP} -m ${JENKINS_USER} \### Cleanup && apt-get clean \ && rm -rf \/tmp/* \/var/lib/apt/lists/* \/var/tmp/*COPY rootfs /ENTRYPOINT ["/jenkins-swarm-slave.sh"]RUN set -x \ && chmod -v +x /jenkins-swarm-slave.sh \ && find /jenkins-swarm-slave* -type fWORKDIR ${JENKINS_HOME}VOLUME ${JENKINS_HOME}{code}{code:title=slave docker-compose.yml (snippet)}version: '2'networks:  jenkins:driver: overlayservices:  build:command: "-name build -executors  2  1  -labels 'docker build' -master http://jenkins-master:8080 -mode normal -username jenkins -password  jenkins1  derp " cpu_shares: 2 environment:  - "constraint:jenkins==build"  - "JAVA_OPTS=-Djava.awt.headless=true -Duser.timezone=America/Phoenix"image: jenkins-swarm-slavenetworks:  - jenkinsrestart: "on-failure:10"volumes:  - /var/lib:/var/lib:rw  - /var/run:/var/run:rw{code} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
 

[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jacob Blain Christen 
 
 
 

Environment:
 
 Ubuntu 14.04.4, Jenkins 1.642.2 (workflow/pipeline 1.15, docker-workflow 1.2), Jenkins 1.642.4 (workflow/pipeline 2.x, docker-workflow 1. 5 4 ), swarm 2.0 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 I believe that this is happening in the {{hudson.Launcher .ProcStarter }} implementation, gonna try and setup a local workspace and poke around. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen commented on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 
Well, this is embarrassing. Neglected to match the path of the VOLUME from the container. Testing... 


swarm container docker inspect

 

[
{
"Id": "8dcf8118ebe64973c50c49599f72750960cf023eaa5076629c5f11c45526c310",
"Created": "2016-04-13T05:29:20.571482012Z",
"Path": "/jenkins-swarm-slave.sh",
"Args": [
"-name",
"build",
"-executors",
"1",
"-labels",
"docker build",
"-master",
"http://jenkins-master:8080",
"-mode",
"normal",
"-username",
"jenkins",
"-password",
"derp"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 24473,
"ExitCode": 0,
"Error": "",
"StartedAt": "2016-04-13T08:07:21.13390774Z",
"FinishedAt": "2016-04-13T08:07:20.61867963Z"
},
"Image": "sha256:6b2499a8274a28875144c8547a6f783fa74621c0a6c4dd99ca8ea6d759f0c859",
"ResolvConfPath": "/var/lib/docker/containers/8dcf8118ebe64973c50c49599f72750960cf023eaa5076629c5f11c45526c310/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/8dcf8118ebe64973c50c49599f72750960cf023eaa5076629c5f11c45526c310/hostname",
"HostsPath": "/var/lib/docker/containers/8dcf8118ebe64973c50c49599f72750960cf023eaa5076629c5f11c45526c310/hosts",
"LogPath": "/var/lib/docker/containers/8dcf8118ebe64973c50c49599f72750960cf023eaa5076629c5f11c45526c310/8dcf8118ebe64973c50c49599f72750960cf023eaa5076629c5f11c45526c310-json.log",
"Name": "/jenkins_build_8",
"RestartCount": 1,
"Driver": "aufs",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"e6790efed69bac5ce78b2aee98beea46abf6be9ac0b9fc586a6ca184639ecf07:/var/lib/jenkins:rw",
"/var/run:/var/run:rw",
"/var/lib:/var/lib:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {
"max-file": "10",
"max-size": "10m"
}
},
"NetworkMode": "jenkins_jenkins",
"PortBindings": {},
"RestartPolicy": {
"Name": "on-failure",
"MaximumRetryCount": 10
},
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"ShmSize": 67108864,
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 512,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioW

[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 Yep, the {{/var/lib/jenkins}}  volume declaration  was the problem. Sorry for this one, /sigh 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jacob Blain Christen 
 
 
 

Priority:
 
 Major Trivial 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen commented on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 
Yep, the /var/lib/jenkins was the problem. Sorry for this one, /sigh 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen closed an issue as Not A Defect 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
PEBKAC 
 
 
 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jacob Blain Christen 
 
 
 

Status:
 
 Open Closed 
 
 
 

Resolution:
 
 Not A Defect 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-20 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jesse Glick reopened an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
Do not like Closed status… 
 
 
 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jesse Glick 
 
 
 

Resolution:
 
 Not A Defect 
 
 
 

Status:
 
 Closed Reopened 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-20 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jesse Glick updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jesse Glick 
 
 
 

Labels:
 
 docker  pipeline  workflow 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-20 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jesse Glick resolved as Not A Defect 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jesse Glick 
 
 
 

Status:
 
 Reopened Resolved 
 
 
 

Resolution:
 
 Not A Defect 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Assignee:
 
 Jesse Glick 
 
 
 

Components:
 

 docker-workflow-plugin, durable-task-plugin 
 
 
 

Created:
 

 2016/Apr/13 7:15 AM 
 
 
 

Environment:
 

 Ubuntu 14.04.4, Jenkins 1.642.2 (workflow/pipeline 1.15, docker-workflow 1.2), Jenkins 1.642.4 (workflow/pipeline 2.x, docker-workflow 1.5), swarm 2.0   
 
 
 

Labels:
 

 docker workflow pipeline 
 
 
 

Priority:
 
  Major 
 
 
 

Reporter:
 
 Jacob Blain Christen 
 
 
 
 
 
 
 
 
 
 
It appears that Jenkins is running within a jail under swarm and/or workflow (running in a docker container with `/var/lib/jenkins` and `/var/run/docker.sock` bind-mounted from host) which is preventing bind mounts from working as expected from both `docker.image().inside` and `sh` workflow steps. 
PLEASE NOTE: this is also happening when simply running docker from `sh` (see script/results below) 
Script, results, and plugins below: 
  

[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jacob Blain Christen 
 
 
 
 
 
 
 
 
 
 It appears that Jenkins is running within a jail under swarm and/or workflow (running in a docker container with  `  {{ /var/lib/jenkins ` }}  and  `  {{ /var/run/docker.sock ` }}  bind-mounted from host) which is preventing bind mounts from working as expected from both `docker.image().inside` and  `  {{ sh ` }}  workflow steps.*PLEASE NOTE*: this is also happening when simply running docker from `sh` (see script/results below)Script, results, and plugins below:{code:title=workflow/pipeline script}node ('build && docker') {wrap([$class: 'TimestamperBuildWrapper']) {sh 'hostname'sh 'docker version'echo 'DOCKER (as jenkins)'sh 'docker run -t -u 1000:1000 -v $(pwd):$(pwd):rw -w $(pwd) buildpack-deps:jessie-scm bash -c \'pwd; touch herp; ls -alF\''echo 'DOCKER (as root)'sh 'docker run -t -u 0:0 -v $(pwd):$(pwd):rw -w $(pwd) buildpack-deps:jessie-scm bash -c \'pwd; touch herp; ls -alF\''echo 'BASH'sh 'pwd; touch derp; ls -alF'docker.image('buildpack-deps:jessie-scm').inside {sh 'bash -c \'pwd; touch inside; ls -alF\''}}}{code}{code:title=workflow/pipeline results}Started by user Jacob Blain Christen[Pipeline] Allocate node : StartRunning on build-c8c3e683 in /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug[Pipeline] node {[Pipeline] General Build Wrapper : Start[Pipeline] wrap {[Pipeline] sh23:44:47 [jenkins-docker-workflow-bug] Running shell script23:44:47 + hostname23:44:47 8dcf8118ebe6[Pipeline] sh23:44:47 [jenkins-docker-workflow-bug] Running shell script23:44:47 + docker version23:44:48 Client:23:44:48  Version:  1.10.323:44:48  API version:  1.2223:44:48  Go version:   go1.5.323:44:48  Git commit:   20f81dd23:44:48  Built:Thu Mar 10 21:49:11 201623:44:48  OS/Arch:  linux/amd6423:44:48 23:44:48 Server:23:44:48  Version:  1.10.223:44:48  API version:  1.2223:44:48  Go version:   go1.5.323:44:48  Git commit:   c3959b123:44:48  Built:Mon Feb 22 21:37:01 201623:44:48  OS/Arch:  linux/amd64[Pipeline] echo23:44:48 DOCKER (as jenkins)[Pipeline] sh23:44:48 [jenkins-docker-workflow-bug] Running shell script23:44:49 + pwd23:44:49 + pwd23:44:49 + pwd23:44:49 + docker run -t -u 1000:1000 -v /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug:/var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug:rw -w /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug buildpack-deps:jessie-scm bash -c pwd; touch herp; ls -alF23:44:49 /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug23:44:49 touch: cannot touch 'herp': Permission denied23:44:49 total 823:44:49 drwxr-xr-x 2 root root 4096 Apr 13 06:39 ./23:44:49 drwxr-xr-x 3 root root 4096 Apr 13 06:45 ../[Pipeline] echo23:44:49 DOCKER (as root)[Pipeline] sh23:44:49 [jenkins-docker-workflow-bug] Running shell script23:44:50 + pwd23:44:50 + pwd23:44:50 + pwd23:44:50 + docker run -t -u 0:0 -v /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug:/var/lib/jenkins/workspace/

[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 I believe that this is happening in the  `  {{ hudson.Launcher.ProcStarter ` }}  implementation, gonna try and setup a local workspace and poke around. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen commented on  JENKINS-34194 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 
 
I believe that this is happening in the `hudson.Launcher.ProcStarter` implementation, gonna try and setup a local workspace and poke around. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34194) docker volume mounts not working as expected when run from within swarm container

2016-04-13 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34194 
 
 
 
  docker volume mounts not working as expected when run from within swarm container  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jacob Blain Christen 
 
 
 
 
 
 
 
 
 
 It appears that Jenkins is running within a jail under swarm and/or workflow (running in a docker container with {{/var/lib/jenkins}} and {{/var/run/docker.sock}} bind-mounted from host) which is preventing bind mounts from working as expected from both  `  {{ docker.image().inside ` }}  and {{sh}} workflow steps.*PLEASE NOTE*: this is also happening when simply running docker from `sh` (see script/results below)Script, results, and plugins below:{code:title=workflow/pipeline script}node ('build && docker') {wrap([$class: 'TimestamperBuildWrapper']) {sh 'hostname'sh 'docker version'echo 'DOCKER (as jenkins)'sh 'docker run -t -u 1000:1000 -v $(pwd):$(pwd):rw -w $(pwd) buildpack-deps:jessie-scm bash -c \'pwd; touch herp; ls -alF\''echo 'DOCKER (as root)'sh 'docker run -t -u 0:0 -v $(pwd):$(pwd):rw -w $(pwd) buildpack-deps:jessie-scm bash -c \'pwd; touch herp; ls -alF\''echo 'BASH'sh 'pwd; touch derp; ls -alF'docker.image('buildpack-deps:jessie-scm').inside {sh 'bash -c \'pwd; touch inside; ls -alF\''}}}{code}{code:title=workflow/pipeline results}Started by user Jacob Blain Christen[Pipeline] Allocate node : StartRunning on build-c8c3e683 in /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug[Pipeline] node {[Pipeline] General Build Wrapper : Start[Pipeline] wrap {[Pipeline] sh23:44:47 [jenkins-docker-workflow-bug] Running shell script23:44:47 + hostname23:44:47 8dcf8118ebe6[Pipeline] sh23:44:47 [jenkins-docker-workflow-bug] Running shell script23:44:47 + docker version23:44:48 Client:23:44:48  Version:  1.10.323:44:48  API version:  1.2223:44:48  Go version:   go1.5.323:44:48  Git commit:   20f81dd23:44:48  Built:Thu Mar 10 21:49:11 201623:44:48  OS/Arch:  linux/amd6423:44:48 23:44:48 Server:23:44:48  Version:  1.10.223:44:48  API version:  1.2223:44:48  Go version:   go1.5.323:44:48  Git commit:   c3959b123:44:48  Built:Mon Feb 22 21:37:01 201623:44:48  OS/Arch:  linux/amd64[Pipeline] echo23:44:48 DOCKER (as jenkins)[Pipeline] sh23:44:48 [jenkins-docker-workflow-bug] Running shell script23:44:49 + pwd23:44:49 + pwd23:44:49 + pwd23:44:49 + docker run -t -u 1000:1000 -v /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug:/var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug:rw -w /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug buildpack-deps:jessie-scm bash -c pwd; touch herp; ls -alF23:44:49 /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug23:44:49 touch: cannot touch 'herp': Permission denied23:44:49 total 823:44:49 drwxr-xr-x 2 root root 4096 Apr 13 06:39 ./23:44:49 drwxr-xr-x 3 root root 4096 Apr 13 06:45 ../[Pipeline] echo23:44:49 DOCKER (as root)[Pipeline] sh23:44:49 [jenkins-docker-workflow-bug] Running shell script23:44:50 + pwd23:44:50 + pwd23:44:50 + pwd23:44:50 + docker run -t -u 0:0 -v /var/lib/jenkins/workspace/USERS/JCHRISTEN/jenkins-docker-workflow-bug:/var/lib/jenkins/workspace/USERS/JCHRISTEN/