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

Publish Over CIFS doesn't use default buffer size (fallback)

    XMLWordPrintable

Details

    Description

      Jenkins version: 2.101

      publish-over-cifs version: 0.6

       

      After update to version 0.6 publish step doesn't fallback to default buffer size if no buffer size is configured. Job gets stuck during copy operation (see console log below).

       

      sample pipeline script:

      pipeline {
      agent {
      label "master"
      }
      
      options {
      buildDiscarder(logRotator(
      daysToKeepStr: '30',
      numToKeepStr: '-1',
      artifactDaysToKeepStr: '7',
      artifactNumToKeepStr: '7'))
      timestamps()
      }
      
      stages {
      stage('Create file') { 
      steps {
      fileOperations([fileCreateOperation(fileContent: 'file content', fileName: 'test_file.txt')])
      }
      }
      stage('Copy file') {
      steps {
      script {
      def file = findFiles(glob: '**/test_file.txt')[0]
      def targetFilename = file.name.split("\\.txt")[0]
      def timestamp = new Date().format('yyyyMMddHHmm')
      targetFilename = targetFilename + "_" + timestamp + "_" + env.BUILD_NUMBER + ".txt"
      
      fileOperations([fileRenameOperation(destination: targetFilename, source: installerFile.name)])
      
      def targetDir = 'test'
      
      cifsPublisher(
      alwaysPublishFromMaster: false,
      masterNodeName: "master",
      continueOnError: false,
      failOnError: true,
      publishers: [[configName : 'test_share',
      label : [label: 'label'],
      transfers : [[cleanRemote : false,
      remoteDirectory : targetDir,
      remoteDirectorySDF: false,
      removePrefix : '',
      sourceFiles : targetFilename]],
      usePromotionTimestamp : true,
      useWorkspaceInPromotion: false,
      verbose : true]])
      }
      }
      }
      }
      }
      
      

      Console log:

      ...
      [Pipeline] {
      [Pipeline] timestamps
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Create file)
      [Pipeline] fileOperations
      07:07:41.791 File Create Operation:
      07:07:41.792 Creating file: {workspace}\test_file.txt
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Copy file)
      [Pipeline] script
      [Pipeline] {
      [Pipeline] findFiles
      [Pipeline] fileOperations
      07:07:42.187 File Rename Operation:
      [Pipeline] cifsPublisher
      07:07:42.285 CIFS: Connecting from host [{host}]
      07:07:42.286 CIFS: Connecting with configuration [test_share] ...
      07:07:42.286 CIFS: Removing WINS from name resolution
      07:07:42.286 CIFS: Setting response timeout [30,000]
      07:07:42.286 CIFS: Setting socket timeout [35,000]
      07:07:42.286 CIFS: Setting buffer size to: [0] Bytes
      07:07:42.295 CIFS: copy [smb://{test_share}/test_file_201801180707_10.txt]
      

      Attachments

        Issue Links

          Activity

            johanneszinn Johannes Zinn created issue -
            johanneszinn Johannes Zinn made changes -
            Field Original Value New Value
            Component/s publish-over-cifs-plugin [ 15850 ]
            Component/s cifs-plugin [ 15770 ]
            johanneszinn Johannes Zinn made changes -
            Description Jenkins version: 2.101

            publish-over-cifs version: 0.6

             

            After update to version 0.6 publish step doesn't use buffer size configured in global configuration "CIFS Share" section. Job gets stuck during copy operation (see console log below).

             

            sample pipeline script:
            {code:java}
            pipeline {
            agent {
            label "master"
            }

            options {
            buildDiscarder(logRotator(
            daysToKeepStr: '30',
            numToKeepStr: '-1',
            artifactDaysToKeepStr: '7',
            artifactNumToKeepStr: '7'))
            timestamps()
            }

            stages {
            stage('Create file') {
            steps {
            fileOperations([fileCreateOperation(fileContent: 'file content', fileName: 'test_file.txt')])
            }
            }
            stage('Copy file') {
            steps {
            script {
            def file = findFiles(glob: '**/test_file.txt')[0]
            def targetFilename = file.name.split("\\.txt")[0]
            def timestamp = new Date().format('yyyyMMddHHmm')
            targetFilename = targetFilename + "_" + timestamp + "_" + env.BUILD_NUMBER + ".txt"

            fileOperations([fileRenameOperation(destination: targetFilename, source: installerFile.name)])

            def targetDir = 'test'

            cifsPublisher(
            alwaysPublishFromMaster: false,
            masterNodeName: "master",
            continueOnError: false,
            failOnError: true,
            publishers: [[configName : 'test_share',
            label : [label: 'label'],
            transfers : [[cleanRemote : false,
            remoteDirectory : targetDir,
            remoteDirectorySDF: false,
            removePrefix : '',
            sourceFiles : targetFilename]],
            usePromotionTimestamp : true,
            useWorkspaceInPromotion: false,
            verbose : true]])
            }
            }
            }
            }
            }

            {code}
            Console log:
            {code:java}
            ...
            [Pipeline] {
            [Pipeline] timestamps
            [Pipeline] {
            [Pipeline] stage
            [Pipeline] { (Create file)
            [Pipeline] fileOperations
            07:07:41.791 File Create Operation:
            07:07:41.792 Creating file: {workspace}\test_file.txt
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] stage
            [Pipeline] { (Copy file)
            [Pipeline] script
            [Pipeline] {
            [Pipeline] findFiles
            [Pipeline] fileOperations
            07:07:42.187 File Rename Operation:
            [Pipeline] cifsPublisher
            07:07:42.285 CIFS: Connecting from host [{host}]
            07:07:42.286 CIFS: Connecting with configuration [test_share] ...
            07:07:42.286 CIFS: Removing WINS from name resolution
            07:07:42.286 CIFS: Setting response timeout [30,000]
            07:07:42.286 CIFS: Setting socket timeout [35,000]
            07:07:42.286 CIFS: Setting buffer size to: [0] Bytes
            07:07:42.295 CIFS: copy [smb://{test_share}/test_file_201801180707_10.txt]
            {code}
            Jenkins version: 2.101

            publish-over-cifs version: 0.6

             

            After update to version 0.6 publish step doesn't fallback to default buffer size if no buffer size is configured. Job gets stuck during copy operation (see console log below).

             

            sample pipeline script:
            {code:java}
            pipeline {
            agent {
            label "master"
            }

            options {
            buildDiscarder(logRotator(
            daysToKeepStr: '30',
            numToKeepStr: '-1',
            artifactDaysToKeepStr: '7',
            artifactNumToKeepStr: '7'))
            timestamps()
            }

            stages {
            stage('Create file') {
            steps {
            fileOperations([fileCreateOperation(fileContent: 'file content', fileName: 'test_file.txt')])
            }
            }
            stage('Copy file') {
            steps {
            script {
            def file = findFiles(glob: '**/test_file.txt')[0]
            def targetFilename = file.name.split("\\.txt")[0]
            def timestamp = new Date().format('yyyyMMddHHmm')
            targetFilename = targetFilename + "_" + timestamp + "_" + env.BUILD_NUMBER + ".txt"

            fileOperations([fileRenameOperation(destination: targetFilename, source: installerFile.name)])

            def targetDir = 'test'

            cifsPublisher(
            alwaysPublishFromMaster: false,
            masterNodeName: "master",
            continueOnError: false,
            failOnError: true,
            publishers: [[configName : 'test_share',
            label : [label: 'label'],
            transfers : [[cleanRemote : false,
            remoteDirectory : targetDir,
            remoteDirectorySDF: false,
            removePrefix : '',
            sourceFiles : targetFilename]],
            usePromotionTimestamp : true,
            useWorkspaceInPromotion: false,
            verbose : true]])
            }
            }
            }
            }
            }

            {code}
            Console log:
            {code:java}
            ...
            [Pipeline] {
            [Pipeline] timestamps
            [Pipeline] {
            [Pipeline] stage
            [Pipeline] { (Create file)
            [Pipeline] fileOperations
            07:07:41.791 File Create Operation:
            07:07:41.792 Creating file: {workspace}\test_file.txt
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] stage
            [Pipeline] { (Copy file)
            [Pipeline] script
            [Pipeline] {
            [Pipeline] findFiles
            [Pipeline] fileOperations
            07:07:42.187 File Rename Operation:
            [Pipeline] cifsPublisher
            07:07:42.285 CIFS: Connecting from host [{host}]
            07:07:42.286 CIFS: Connecting with configuration [test_share] ...
            07:07:42.286 CIFS: Removing WINS from name resolution
            07:07:42.286 CIFS: Setting response timeout [30,000]
            07:07:42.286 CIFS: Setting socket timeout [35,000]
            07:07:42.286 CIFS: Setting buffer size to: [0] Bytes
            07:07:42.295 CIFS: copy [smb://{test_share}/test_file_201801180707_10.txt]
            {code}
            Summary Publish Over CIFS doesn't use buffer size of configured cifs connection Publish Over CIFS doesn't use default buffer size (fallback)
            johanneszinn Johannes Zinn made changes -
            Priority Blocker [ 1 ] Major [ 3 ]
            slide_o_mix Alex Earl made changes -
            Link This issue is duplicated by JENKINS-49104 [ JENKINS-49104 ]
            slide_o_mix Alex Earl made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

            People

              slide_o_mix Alex Earl
              johanneszinn Johannes Zinn
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: