[JIRA] (JENKINS-59443) Kubernetes plugin volumeMount turns backslashes to forward slashes

2 views
Skip to first unread message

jan.lindstam@tieto.com (JIRA)

unread,
Sep 19, 2019, 6:04:02 AM9/19/19
to jenkinsc...@googlegroups.com
Jan Lindstam created an issue
 
Jenkins / Bug JENKINS-59443
Kubernetes plugin volumeMount turns backslashes to forward slashes
Issue Type: Bug Bug
Assignee: Unassigned
Components: kubernetes-plugin
Created: 2019-09-19 10:03
Labels: Windows volumes
Priority: Minor Minor
Reporter: Jan Lindstam

Having successfully configured a Windows server jnlp image and able to run builds on it, now then trying to add ability to use the slave for building docker images.  Problem is this:

if i define a HostPath volume in the configuration Ui with following values ( both fields same value) :  

 

\\.\pipe\docker_engine
\\.\pipe\docker_engine

 

the outcome is 

Error: Error response from daemon: invalid volume 

specification: '\\.\pipe\docker_engine:c://./pipe/docker_engine'  

reason for this is that in volumemount the backslashes have turned direction. Hosts portion of volume is correct:

 

 volumeMounts:
    - mountPath: //./pipe/docker_engine
      name: volume-0
 
...
 volumes:
  - hostPath:
      path: \\.\pipe\docker_engine
 
 

Now if i take the pod yaml out, modify the mountpaths forward slashes to backslashes, and run it in with kubectl,  the pod starts successfully.

Assuming that its the kubernetes plugin which  "fixes" the slashes.

i believe this could be easily repeatable, even with linux slaves. point is that it should not change whatever is inserted in the field.

 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages