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

Master labels is disappeared in case system configuration has been changed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Windows 8 x64, jenkins 1.573

      Steps to reproduce

      1. Assign some labels to master node
      2. Got to Manage Jenkins -> Configure System -> click save button
      3. Check master node settings, labels is disappeared

          [JENKINS-23966] Master labels is disappeared in case system configuration has been changed

          Oleg Nenashev added a comment -

          This issue is not related to label-verifier plugin. Label save/load operations are implemented in the core

          Oleg Nenashev added a comment - This issue is not related to label-verifier plugin. Label save/load operations are implemented in the core

          Maxim Kopeyka added a comment -

          This issue appears in case you don't have any slaves, otherwise it works fine.

          Maxim Kopeyka added a comment - This issue appears in case you don't have any slaves, otherwise it works fine.

          Daniel Beck added a comment -

          Probably because labels are pretty useless without slaves. (Yes, I know, swarm plugin.)

          Daniel Beck added a comment - Probably because labels are pretty useless without slaves. (Yes, I know, swarm plugin.)

          Oleg Nenashev added a comment -

          Forgot to remove the assignment

          Oleg Nenashev added a comment - Forgot to remove the assignment

          Dominique Brice added a comment - - edited

          The "usage" setting is also affected.
          The reason is that Jenkins is not consistent with regards to labels & usage setting for the master node in the Configure System page and in the master node Configure page.
          In the first case the settings are controlled by a condition (!app.slaves.isEmpty() || !app.clouds.isEmpty()), in the other case they are not.
          I think the simplest way to solve this is to remove the condition from MasterBuildConfiguration/config.grovvy. At worse it doesn't harm anything since these settings are accessible via another page, and at best it solves the problem described here (which by the way was very annoying when I was working on the Label Link Jobs plugin).
          Note that the !app.clouds.isEmpty() was introduced to solve JENKINS-11100. Removing the condition altogether would not make a difference for this resolution.

          Another solution would be to NOT display master's node specific settings on Jenkins global configuration, and delegate this to where it belongs, on the master's node Configure page (by having MasterBuildConfiguration not extends GlobalConfiguration ?). I'm less sure about the implication of this approach.

          Dominique Brice added a comment - - edited The "usage" setting is also affected. The reason is that Jenkins is not consistent with regards to labels & usage setting for the master node in the Configure System page and in the master node Configure page. In the first case the settings are controlled by a condition (!app.slaves.isEmpty() || !app.clouds.isEmpty()), in the other case they are not. I think the simplest way to solve this is to remove the condition from MasterBuildConfiguration/config.grovvy. At worse it doesn't harm anything since these settings are accessible via another page, and at best it solves the problem described here (which by the way was very annoying when I was working on the Label Link Jobs plugin ). Note that the !app.clouds.isEmpty() was introduced to solve JENKINS-11100 . Removing the condition altogether would not make a difference for this resolution. Another solution would be to NOT display master's node specific settings on Jenkins global configuration, and delegate this to where it belongs, on the master's node Configure page (by having MasterBuildConfiguration not extends GlobalConfiguration ?). I'm less sure about the implication of this approach.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3860
          JENKINS-23966 Master labels disappear when system configuration is updated (Revision 60c2071a301ec6310e6e71b2c98df1b6cade9c90)

          Result = SUCCESS
          dominiquebrice : 60c2071a301ec6310e6e71b2c98df1b6cade9c90
          Files :

          • core/src/main/resources/jenkins/model/MasterBuildConfiguration/config.groovy
          • test/src/test/java/jenkins/model/MasterBuildConfigurationTest.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3860 JENKINS-23966 Master labels disappear when system configuration is updated (Revision 60c2071a301ec6310e6e71b2c98df1b6cade9c90) Result = SUCCESS dominiquebrice : 60c2071a301ec6310e6e71b2c98df1b6cade9c90 Files : core/src/main/resources/jenkins/model/MasterBuildConfiguration/config.groovy test/src/test/java/jenkins/model/MasterBuildConfigurationTest.java

            Unassigned Unassigned
            lazymax Maxim Kopeyka
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: