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

On restart Jenkins rewrites some config.xml values

    XMLWordPrintable

Details

    Description

      I have been seeing this behavior for a while now. I have a standard ubuntu installation using the official package. Every time I reboot the jenkins process to update a plugin of a version my Views and Slave Port configuration are overridden.

      For instance my original config.xml includes the following.

      views>
      <hudson.model.AllView>
      <owner class="hudson" reference="../../.."/>
      <name>All</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
      </hudson.model.AllView>
      <listView>
      <owner class="hudson" reference="../../.."/>
      <name>iOS</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
      <jobNames>
      <comparator class="hudson.util.CaseInsensitiveComparator"/>
      </jobNames>
      <jobFilters/>
      <columns>
      <hudson.views.StatusColumn/>
      <hudson.views.WeatherColumn/>
      <hudson.views.JobColumn/>
      <hudson.views.LastSuccessColumn/>
      <hudson.views.LastFailureColumn/>
      <hudson.views.LastDurationColumn/>
      <hudson.views.BuildButtonColumn/>
      </columns>
      <includeRegex>(?i).IOS-.</includeRegex>
      <recurse>false</recurse>
      </listView>
      </views>
      <primaryView>All</primaryView>
      <slaveAgentPort>8098</slaveAgentPort>

      After a restart that section of the config.xml is reduced to.
      <views>
      <hudson.model.AllView>
      <owner class="hudson" reference="../../.."/>
      <name>All</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
      </hudson.model.AllView>
      </views>
      <primaryView>All</primaryView>
      <slaveAgentPort>0</slaveAgentPort>

      I have watched the jenkins.log file closely and seen no errors or warnings in regard to why these two things specifically are being reset. What is also strange is that the rest of the core config is persisted and remains unchanged.

      Attachments

        Issue Links

          Activity

            kearl Korey Earl added a comment -

            @Francis Upton
            Can you kindly explain why changing the fields to be transient will solve the issue?

            Cheers,
            Amber & Korey Pairing (Our old account got locked out).

            kearl Korey Earl added a comment - @Francis Upton Can you kindly explain why changing the fields to be transient will solve the issue? Cheers, Amber & Korey Pairing (Our old account got locked out).
            danielbeck Daniel Beck added a comment -

            Transient fields don't get serialized to XML on disk by Xstream.

            danielbeck Daniel Beck added a comment - Transient fields don't get serialized to XML on disk by Xstream.
            jjhughes57 Joseph Hughes added a comment -

            I have tested the fix and it works. Basically Xstream was not deserializing some values correctly and those values were not meant to be persisted in the first place.

            I have updated my masters with the patch and the fix works.

            jjhughes57 Joseph Hughes added a comment - I have tested the fix and it works. Basically Xstream was not deserializing some values correctly and those values were not meant to be persisted in the first place. I have updated my masters with the patch and the fix works.
            kearl Korey Earl added a comment -

            We have installed the EC2 plugin with these changes and we are not seeing this problem anymore!

            Thank you!

            kearl Korey Earl added a comment - We have installed the EC2 plugin with these changes and we are not seeing this problem anymore! Thank you!
            kearl Korey Earl added a comment -

            When will the next release of the Amazon EC2 plugin be available?

            kearl Korey Earl added a comment - When will the next release of the Amazon EC2 plugin be available?

            People

              francisu Francis Upton
              jjhughes57 Joseph Hughes
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: