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

Some final output is missing in Jenkins Pipeline when using the Ansible Plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When using the Ansible Plugin with jenkins Pipeline,
      I can't see the entire log on Jenkins PIpeline build output - Some output is missing at the end of the Ansible play.
      The output looks fine on a terminal - if I'll SSH to the server and run the ansible-playbook command from the command line.

      • This issue started about a month ago..

      Here is a screenshot of how the output look like now:
      https://imgur.com/waX7XcM

      Ansible Plugin:
      https://jenkins.io/doc/pipeline/steps/ansible/

      This is the Pipeline code that uses the Ansible Pipeline Plugin:

              stage('running something') {
                  steps {
                      script {
                          dir('my/path/here') {
                              ansiblePlaybook([
                                      inventory   : 'hosts',
                                      playbook    : 'main.yml',
                                      installation: 'ansible',
                                      sudoUser    : null,
                                      colorized   : true,
                                      extraVars   : [
                                              blah   : "${params.blah}",
                                              some_var       : "${params.some_var}"
                                      ]
                              ])
                          }
                      }
                  }
              }
      

        Attachments

        1. ansible-plugin.PNG
          ansible-plugin.PNG
          39 kB
        2. ansible-plugin-blue-ocean.PNG
          ansible-plugin-blue-ocean.PNG
          50 kB
        3. ansible-plugin-moved-output.PNG
          ansible-plugin-moved-output.PNG
          37 kB
        4. image-2019-01-07-13-55-02-950.png
          image-2019-01-07-13-55-02-950.png
          62 kB
        5. image-2019-01-07-13-55-28-725.png
          image-2019-01-07-13-55-28-725.png
          19 kB
        6. Screen Shot 2018-12-04 at 11.09.00 AM.png
          Screen Shot 2018-12-04 at 11.09.00 AM.png
          153 kB
        7. Selection_026.jpg
          Selection_026.jpg
          94 kB
        8. waX7XcM.png
          waX7XcM.png
          103 kB

          Issue Links

            Activity

            Hide
            maneken Ruslan Bondarau added a comment -

            I also have the same issue

            Ansible Pipeline plugin Version 1.0
            Jenkins version 2.138.2
            Pipeline: Declarative 1.3.4

             

            Show
            maneken Ruslan Bondarau added a comment - I also have the same issue Ansible Pipeline plugin Version 1.0 Jenkins version 2.138.2 Pipeline: Declarative  1.3.4  
            Hide
            trowdark Benjamin Debotte added a comment -

            Same issue here.

             

            Ansible plugin 1.0

            Ansible 2.5.6

             

            Jenkins Blue output:

            Local session:

            Show
            trowdark Benjamin Debotte added a comment - Same issue here.   Ansible plugin 1.0 Ansible 2.5.6   Jenkins Blue output: Local session:
            Hide
            pablosan Pablo Sanchez added a comment -

            I am seeing the same, hardcoded Ansible commands shows proper output but the plugin doesn't

            Show
            pablosan Pablo Sanchez added a comment - I am seeing the same, hardcoded Ansible commands shows proper output but the plugin doesn't
            Hide
            h0neybadger honey badger added a comment -

            Hello,

            We are facing the same issue on our jenkins.

            We checked many versions and the bug is visible from the version LTS 2.138.1.

            • 2.138.4 nok
            • 2.138.3 nok
            • 2.138.2 nok
            • 2.138.1 nok
            • 2.121.3 ok

            Another interesting fact is that the bug is not present on pipeline ran from the master. It only affects remote executions.

             

            This issue may be related to the following fix:

            https://github.com/jenkinsci/jenkins/commit/ebd71116c15b97fd3e855a738fbfdef387cd6e3c

            I reverted the commit and recompiled the latest version and now I'am able to see the full log (but some logs remain overwritten by the ssh-agent).

            I do not know if this FIX JENKINS-52729 is directly involved to our bug. Maybe Jesse Glick could help on that issue.

            Show
            h0neybadger honey badger added a comment - Hello, We are facing the same issue on our jenkins. We checked many versions and the bug is visible from the version LTS 2.138.1. 2.138.4 nok 2.138.3 nok 2.138.2 nok 2.138.1 nok 2.121.3 ok Another interesting fact is that the bug is not present on pipeline ran from the master. It only affects remote executions.   This issue may be related to the following fix: https://github.com/jenkinsci/jenkins/commit/ebd71116c15b97fd3e855a738fbfdef387cd6e3c I reverted the commit and recompiled the latest version and now I'am able to see the full log (but some logs remain overwritten by the ssh-agent). I do not know if this FIX  JENKINS-52729 is directly involved to our bug. Maybe Jesse Glick could help on that issue.
            Hide
            jglick Jesse Glick added a comment -

            Not familiar with this plugin so cannot give details, but in general if you have a Callable (or FileCallable) running on an agent that has been passed a serialized TaskListener, it will need to flush before returning.

            Show
            jglick Jesse Glick added a comment - Not familiar with this plugin so cannot give details, but in general if you have a Callable (or FileCallable ) running on an agent that has been passed a serialized TaskListener , it will need to flush before returning.

              People

              • Assignee:
                sirot Jean-Christophe Sirot
                Reporter:
                nimitack Adam Delarosa
              • Votes:
                8 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated: