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

Setting a node temporarily offline removes ENV settings

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • gradle-plugin
    • Windows 10, Jenkins 2.392, gradle-plugin 2.3
    • gradle-plugin 2.3.2

      We have a Jenkins node configured with an environment variable (MAVEN_OPTS).

      Everytime we set this node offline temporarily (using the markOffline function in Jenkins UI), and then restart the machines, after the restart, the environment variable is still there, but the value is empty. I'm not sure if it's the slave or the server reboot which is causing the issue, I can try to find out if it helps.

      Configuration History plugin shows that there is an Entry with source SYSTEM, which contains two Changes - the marking as offline (<temporaryOfflineCause class="hudson.slaves.OfflineCause$UserCause">), and the removal of this ENV value. If I don't restart while the node is set to offline, there is no issue. If I set it back online, then restart, there is no issue either.

      Please let me know what else information you need, it's probably a complex to follow issue.

      The false behavior started after the last update of jenkins core and our plugins. It's been correct before. It's less than two weeks old.

          [JENKINS-70692] Setting a node temporarily offline removes ENV settings

          Jens Beyer added a comment - - edited

          Could be related to JENKINS-69922

          Very likely related to JENKINS-70663

          Jens Beyer added a comment - - edited Could be related to JENKINS-69922 Very likely related to JENKINS-70663

          Basil Crow added a comment -

          The false behavior started after the last update of jenkins core and our plugins. It's been correct before. It's less than two weeks old.

          What are the steps to reproduce the problem from scratch? What is the last weekly release in which the scenario passes, and what is the first weekly release in which the scenario fails?

          Basil Crow added a comment - The false behavior started after the last update of jenkins core and our plugins. It's been correct before. It's less than two weeks old. What are the steps to reproduce the problem from scratch? What is the last weekly release in which the scenario passes, and what is the first weekly release in which the scenario fails?

          Jens Beyer added a comment -

          Sorry for the confusion. At the moment of writing, the last known good Jenkins was 2.390 or 2.391 (not sure, as written) with the plugins at that time, while the bad version was 2.392 + plugins as stated in the Environment section of this report.

          With the help of JENKINS-70663 I was able to pinpoint it to gradle-plugin 2.3. I changed the Component accordingly. With disabled gradle-plugin 2.3 the issue does not happen, with enabled gradle-plugin 2.2 it also does not happen. So it's definitely gradle-plugin 2.3 as in JENKINS-70663 .

          Jens Beyer added a comment - Sorry for the confusion. At the moment of writing, the last known good Jenkins was 2.390 or 2.391 (not sure, as written) with the plugins at that time, while the bad version was 2.392 + plugins as stated in the Environment section of this report. With the help of JENKINS-70663 I was able to pinpoint it to gradle-plugin 2.3. I changed the Component accordingly. With disabled gradle-plugin 2.3 the issue does not happen, with enabled gradle-plugin 2.2 it also does not happen. So it's definitely gradle-plugin 2.3 as in JENKINS-70663 .

          Basil Crow added a comment - https://github.com/jenkinsci/gradle-plugin/commit/2013899b93de4bb273a5474accf6383b1a9b10e3#commitcomment-103903989

          beyerj Thank you for reporting the issue! I've just released a new version 2.3.2 with the fix for this issue. Could you please try it?

          Alexey Venderov added a comment - beyerj Thank you for reporting the issue! I've just released a new version 2.3.2 with the fix for this issue. Could you please try it?

          Jens Beyer added a comment -

          Can confirm that after the update to 2.3.2 the issue is fixed. Thank you very much.

          Jens Beyer added a comment - Can confirm that after the update to 2.3.2 the issue is fixed. Thank you very much.

            avenderov Alexey Venderov
            beyerj Jens Beyer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: