Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59443

Kubernetes plugin volumeMount turns backslashes to forward slashes

XMLWordPrintable

      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.

       

       

       

            Unassigned Unassigned
            nogdose Jan Lindstam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: