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

Exclude of node config does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins: 2.204.5
      Job Configuration History Plugin: 2.26
    • Similar Issues:

      Description

      Hi,

      because currently history of changed nodes is wrong, I tried to exclude nodes from history.
      ( JENKINS-62239, JENKINS-58125 )

      I used different regular expressions at "Configuration exclude file pattern".
      Not even "config.xml" worked. Plugin stopped to save history for jobs but not for nodes.

        Attachments

          Issue Links

            Activity

            Hide
            pjdarton pjdarton added a comment - - edited

            I've just encountered this same problem myself - changes to Nodes do not take any notice of the exclusionFilter.

            I traced the code and I've found the underlying cause:
            hudson.plugins.jobConfigHistory.ComputerHistoryListener's 4 methods onAdd, onRename, onChange and onRemove all call its private method boolean isTracked(Node node) BUT this method does not take the exclusionFilter into consideration.

            What it does do is assume that the plugin can safely ignore any Nodes that are instanceof AbstractCloudSlave or instanceof EphemeralNode ... and that everything else needs to have its history recorded.

            Unfortunately, not all nodes that users don't care about meet these criteria, e.g. the docker-plugin's DockerTransientNode.
            ...and if there's a lot of them then that can fill up the filesystem and cause problems like JENKINS-66533
            ...and you can't exclude them using e.g. |nodes/docker| inside the exclusion filter as that's ignored for nodes.

            IMO the isTracked method should also check the exclusion filter and see if it matches the Node's config.xml before deciding.

            Show
            pjdarton pjdarton added a comment - - edited I've just encountered this same problem myself - changes to Nodes do not take any notice of the exclusionFilter. I traced the code and I've found the underlying cause: hudson.plugins.jobConfigHistory.ComputerHistoryListener 's 4 methods onAdd , onRename , onChange and onRemove all call its private method boolean isTracked(Node node) BUT this method does not take the exclusionFilter into consideration. What it does do is assume that the plugin can safely ignore any Nodes that are instanceof AbstractCloudSlave or instanceof EphemeralNode ... and that everything else needs to have its history recorded. Unfortunately, not all nodes that users don't care about meet these criteria, e.g. the docker-plugin's DockerTransientNode. ...and if there's a lot of them then that can fill up the filesystem and cause problems like JENKINS-66533 ...and you can't exclude them using e.g. |nodes/docker| inside the exclusion filter as that's ignored for nodes. IMO the isTracked method should also check the exclusion filter and see if it matches the Node's config.xml before deciding.

              People

              Assignee:
              stefanbrausch Stefan Brausch
              Reporter:
              hjhafner Hans-Juergen Hafner
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: