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

config.xml gets corrupted after changes and restart

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Environment:
      RHEL 7
      Jenkins 2.289.2/3
      ec2-plugin 1.62/1.63
    • Similar Issues:

      Description

      When we define Environment Variables for an EC2-Cloud the reference-value of comparator class="hudson.util.CaseInsensitiveComparator" of Views and GlobalNodeProperties-EnvironmentVariables is changed
      from reference="../../../../../../views/listView/jobNames/comparator"/ respectively reference="../../../listView/jobNames/comparator"/> into
      something like "../../../../../../../../../hudson.plugins.ec2.EC2Cloud..."

       
      config.xml before setting Environment Variables

       

      ...
      <listView>
            <owner class="hudson" reference="../../.."/>
            <name>Kai</name>
            <filterExecutors>false</filterExecutors>
            <filterQueue>false</filterQueue>
            <properties class="hudson.model.View$PropertyList"/>
            <jobNames>
              <comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../listView/jobNames/comparator"/>
            </jobNames>
      ...
      <globalNodeProperties>
          <hudson.slaves.EnvironmentVariablesNodeProperty>
            <envVars serialization="custom">
              <unserializable-parents/>
              <tree-map>
                <default>
                  <comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../../../../views/listView/jobNames/comparator"/>
                </default>
      		  
      ...
      

      config.xml after setting Environment Variables

      ...
      <clouds>
      ...
      <nodeProperties>
                  <hudson.slaves.EnvironmentVariablesNodeProperty>
                    <envVars serialization="custom">
                      <unserializable-parents/>
                      <tree-map>
                        <default>
                          <comparator class="hudson.util.CaseInsensitiveComparator"/>
      					OR SOMETIMES <comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../../../../../../../hudson.plugins.ec2.EC2Cloud/templates/hudson.plugins.ec2.SlaveTemplate[2]/nodeProperties/hudson.slaves.EnvironmentVariablesNodeProperty/envVars/tree-map/default/comparator"/>                  </default>
                        <int>1</int>
                        <string>DUMMY</string>
                        <string>dummy</string>
                      </tree-map>
                    </envVars>
      ...
      <listView>
            <owner class="hudson" reference="../../.."/>
            <name>Tommy</name>
            <filterExecutors>false</filterExecutors>
            <filterQueue>false</filterQueue>
            <properties class="hudson.model.View$PropertyList"/>
            <jobNames>
              <comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../../clouds/hudson.plugins.ec2.EC2Cloud/templates/hudson.plugins.ec2.SlaveTemplate[2]/nodeProperties/hudson.slaves.EnvironmentVariablesNodeProperty/envVars/tree-map/default/comparator"/>
            </jobNames>
      ...
      <globalNodeProperties>
          <hudson.slaves.EnvironmentVariablesNodeProperty>
            <envVars serialization="custom">
              <unserializable-parents/>
              <tree-map>
                <default>
                  <comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../../../../clouds/hudson.plugins.ec2.EC2Cloud/templates/hudson.plugins.ec2.SlaveTemplate[2]/nodeProperties/hudson.slaves.EnvironmentVariablesNodeProperty/envVars/tree-map/default/comparator"/>
      </default>
      ...
      

      As long as the config.xml isn't touched this is no problem, even after restart Jenkins. When we make changes in the config.xml and jenkins has to sort it at a restart, it gets corrupted...<views> and <clouds> are missing.
      E.g. a config.xml of 45 KB results in 11 KB.
      When we make changes to the config.xml and delete all reference="../../../../../../clouds/hudson.plugins.ec2.EC2Cloud/templates/hudson.plugins.ec2.SlaveTemplate everything works fine.

      Seems a bit similiar to the solved JENKINS-24938

       

        Attachments

          Activity

          torstenboelting Torsten Boelting created issue -
          jglick Jesse Glick made changes -
          Field Original Value New Value
          Component/s core [ 15593 ]
          Component/s ec2-plugin [ 15625 ]

            People

            Assignee:
            thoulen FABRIZIO MANFREDI
            Reporter:
            torstenboelting Torsten Boelting
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: