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

Performance graph does not appear if the slave node is offline

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • performance-plugin
    • None
    • Jenkins v1.565.3
      performance-plugin v1.13

      We have a nightly Jenkins job that uses a slave to run JMeter and publish the results using the performance plugin.

      The slave that we use is a VM and is reset every night.
      In the Jenkins configuration for the node:

      Availability: 'Take this slave on-line when in demand and off-line when idle'
      In demand delay: 1 (minute)
      Idle delay: 60 (minutes)
      

      It is observed that when the job is completed the graph is shown (as expected). However, after the idle delay is elapsed, the slave is disconnected and goes offline and the performance graph disappears.

      Only by bring the node online again will the graph be available.

      I am not sure if this is a unique problem that affect all plugins. Could something be done to 'cache' the information on the server, similar to how the artifact, trends, etc are available even if the slave is offline?

        1. PerformanceTrend1.PNG
          PerformanceTrend1.PNG
          76 kB
        2. PerformanceTrend2.PNG
          PerformanceTrend2.PNG
          43 kB
        3. TrendMissing01.PNG
          TrendMissing01.PNG
          124 kB
        4. TrendMissing02.PNG
          TrendMissing02.PNG
          85 kB

          [JENKINS-27245] Performance graph does not appear if the slave node is offline

          I too faced same issue today. During my debugging i found that this will happen if jobs are configured to run on short-lived slaves (Cloud instances ) .

          This is due to below piece of code in PerformanceProjectAction.java
          this.project.getSomeBuildWithWorkspace().getRootDir()

          getSomeBuildWithWorkspace checks for a live work space for any build and this causes issues if none of the previous builds have live workspace.
          Temporary and ugly work-around is to run the job on jenkins master once.

          I will try to submit pull request for this.

          suresh nallamilli added a comment - I too faced same issue today. During my debugging i found that this will happen if jobs are configured to run on short-lived slaves (Cloud instances ) . This is due to below piece of code in PerformanceProjectAction.java this.project.getSomeBuildWithWorkspace().getRootDir() getSomeBuildWithWorkspace checks for a live work space for any build and this causes issues if none of the previous builds have live workspace. Temporary and ugly work-around is to run the job on jenkins master once. I will try to submit pull request for this.

          won't be able to contribute in next couple of weeks , if some one else can pick it up.. thats great

          suresh nallamilli added a comment - won't be able to contribute in next couple of weeks , if some one else can pick it up.. thats great

          Paul Cosma added a comment -

          manolo

          I have the same issue for the jobs that are running tests using docker container slaves (with docker plugin) as it is a short-lived slave.

          Paul Cosma added a comment - manolo I have the same issue for the jobs that are running tests using docker container slaves (with docker plugin) as it is a short-lived slave.

          Cannot reproduce as of 3.15 version.

          Slave offline, still graphs are displayed.
          Closing

          Philippe Mouawad added a comment - Cannot reproduce as of 3.15 version. Slave offline, still graphs are displayed. Closing

          Paul Cosma added a comment - - edited

          I can still reproduce it on
          Jenkins ver. 2.150.3, Performance Plugin vers. 3.15

          using ephemeral docker build slaves.

          Docker plugin
          https://plugins.jenkins.io/docker-plugin
          jenkins ssh slave
          https://hub.docker.com/r/jenkins/ssh-slave

          Please inspect attachments.

          The graphs will work only if you perform the workaround suggested by @suresh nallamilli

          Paul Cosma added a comment - - edited I can still reproduce it on Jenkins ver. 2.150.3, Performance Plugin vers.  3.15 using ephemeral docker build slaves. Docker plugin https://plugins.jenkins.io/docker-plugin jenkins ssh slave https://hub.docker.com/r/jenkins/ssh-slave Please inspect attachments. The graphs will work only if you perform the workaround suggested by @suresh nallamilli

            manolo Manuel Carrasco
            charleswhchan Charles Chan
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: