• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins: 2.204.5
      Job Configuration History Plugin: 2.26

      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.

          [JENKINS-62281] Exclude of node config does not work

          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.

          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.

          xZanon none added a comment -

          Hi, 

          We have a similar issue with EC2 Plugin creating and destroying thousands of nodes. 
          So far I didn't found a magic regexp to exclude nodes .  "nodes.*config\.xml" "nodes/EC2" .... or even "nodes" does not work.

          Do we have any estimate when this will be fixed ? 

          Thanks 

          xZanon none added a comment - Hi,  We have a similar issue with EC2 Plugin creating and destroying thousands of nodes.  So far I didn't found a magic regexp to exclude nodes .  "nodes.*config\.xml" "nodes/EC2" .... or even "nodes" does not work. Do we have any estimate when this will be fixed ?  Thanks 

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

              Created:
              Updated: