• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Platform: All, OS: Windows XP
    • 2.267 and 2.277.1

      When preparing a heavily used hudson instance for shutdown, there are always
      questions about the "why, how long and what does it mean?". I could easily
      explain it upfront, if i could enter a message when starting the shutdown
      preparation that gets shown additional to the current text.

      Think of it like the "reason for shutdown" textfield on windows servers.

          [JENKINS-1877] Explanatory message at prepare for shutdown

          dlindner added a comment -

          Direct enhancement to issue 109

          dlindner added a comment - Direct enhancement to issue 109

          +1

          Can anyone resolve this issue?

          Pei-Tang Huang added a comment - +1 Can anyone resolve this issue?

          Linards L added a comment -

          I think this is irrevelant feature. For super-small teams - ok - you can do it, but from larger infrastructure/maintaice departments more important would be to allow some scripting assets as pre-shutdown events ... for example, to trigger backups and to perform some specific preparation ... or just connect JRockit instead of default JVM for debugging needs.

          -1

          Linards L added a comment - I think this is irrevelant feature. For super-small teams - ok - you can do it, but from larger infrastructure/maintaice departments more important would be to allow some scripting assets as pre-shutdown events ... for example, to trigger backups and to perform some specific preparation ... or just connect JRockit instead of default JVM for debugging needs. -1

          I somewhat disagree.

          In my opinion, the shutdown message is semantically incorrect. It says "Jenkins is going to shut down." when really just the flag that prevents new jobs from being executed is set. If you un-set the flag, nothing will happen in terms of shutdown.

          Maybe you don't see any benefit in a shutdown message. If we don't get the ability to set one at least the message should be set.

          I use the shutdown flag from time to time just to prevent Jenkins from doing anything while working on other tools (e.g. Sonar).

          Steffen Breitbach added a comment - I somewhat disagree. In my opinion, the shutdown message is semantically incorrect. It says "Jenkins is going to shut down." when really just the flag that prevents new jobs from being executed is set. If you un-set the flag, nothing will happen in terms of shutdown. Maybe you don't see any benefit in a shutdown message. If we don't get the ability to set one at least the message should be set. I use the shutdown flag from time to time just to prevent Jenkins from doing anything while working on other tools (e.g. Sonar).

          Linards L added a comment -

          Well, imho you use feature for what is is NOT designed, Steffen. The message in its current text makes you feel the shutdown itslef is due hadware maitnaince, not just to stop jobs execution.

          For managing queue, there are MILLION better ways. It is like you tamper build job execution flow in the way CI server has too much internal stress.

          But ... if it works for you ... well ... maybe I am getting to perfectional

          Linards L added a comment - Well, imho you use feature for what is is NOT designed, Steffen. The message in its current text makes you feel the shutdown itslef is due hadware maitnaince, not just to stop jobs execution. For managing queue, there are MILLION better ways. It is like you tamper build job execution flow in the way CI server has too much internal stress. But ... if it works for you ... well ... maybe I am getting to perfectional

          Okay, so tell me just one of those MILLION better ways: how to stop the build queue AND let users know what's happening?

          Steffen Breitbach added a comment - Okay, so tell me just one of those MILLION better ways: how to stop the build queue AND let users know what's happening?

          Linards L added a comment -

          EmailExt plugin had some support for custom messages. I don't want to rant your needs, but I doubt the way you want everyone to know the reason cannot be simply done by spam

          Linards L added a comment - EmailExt plugin had some support for custom messages. I don't want to rant your needs, but I doubt the way you want everyone to know the reason cannot be simply done by spam

          How exactly do I stop all Jobs on Jenkins with EmailExt plugin?!

          Steffen Breitbach added a comment - How exactly do I stop all Jobs on Jenkins with EmailExt plugin?!

          Linards L added a comment - - edited

          Sorry, "In conjuction with it", I meant.

          This looks like somewhat more robust way to do it: http://blog.cloudbees.com/2012/02/let-jenkins-hit-itself-in-head-without.html

          Linards L added a comment - - edited Sorry, "In conjuction with it", I meant. This looks like somewhat more robust way to do it: http://blog.cloudbees.com/2012/02/let-jenkins-hit-itself-in-head-without.html

          I just realised that we do exactly have the "Explanatory message at (prepare for) shutdown" functionality already.

          You can enter a comment when taking offline a slave. So why not have the same functionality when taking the master offline?!

          Steffen Breitbach added a comment - I just realised that we do exactly have the "Explanatory message at (prepare for) shutdown" functionality already. You can enter a comment when taking offline a slave. So why not have the same functionality when taking the master offline?!

          Fawzy Manaa added a comment -

          Has this been resolved yet? It doesn't seem like it.

          I see the explanatory prompt if I try to take down a slave, but not if I try to restart safely or prepare for shutdown of Jenkins itself.

          Fawzy Manaa added a comment - Has this been resolved yet? It doesn't seem like it. I see the explanatory prompt if I try to take down a slave, but not if I try to restart safely or prepare for shutdown of Jenkins itself.

          Kumar Mani added a comment -

          There is a workaround to use Lenient shutdown plugin https://wiki.jenkins-ci.org/display/JENKINS/Lenient+shutdown+plugin, which allows customized shutdown notification message.

          Kumar Mani added a comment - There is a workaround to use Lenient shutdown plugin https://wiki.jenkins-ci.org/display/JENKINS/Lenient+shutdown+plugin , which allows customized shutdown notification message.

          Thanks maniagnihotri, nice find!

          Steffen Breitbach added a comment - Thanks maniagnihotri , nice find!

          Cristian Uroz added a comment -

          Cristian Uroz added a comment - maniagnihotri +1

          Kumar Mani added a comment -

          Since the workaround is acceptable, marking the bug as resolved. Please reopen if you think otherwise.

          Kumar Mani added a comment - Since the workaround is acceptable, marking the bug as resolved. Please reopen if you think otherwise.

          Well, this is not a "Bug", it's an "Improvement".

          The lenient shutdown plugin has other caveats and I still feel this should find its way into Jenkins sooner or later, so I'm reopening this.

          Steffen Breitbach added a comment - Well, this is not a "Bug", it's an "Improvement". The lenient shutdown plugin has other caveats and I still feel this should find its way into Jenkins sooner or later, so I'm reopening this.

          There is a need for separate "Shutdown" and "Restart" messages. When an update requires a restart, there is the this usual brutal and un-friendly "Shutdown" message scarring my users. Jenkins should be able to make a difference between "shutdown" and "restart".

          Anders Hoglund added a comment - There is a need for separate "Shutdown" and "Restart" messages. When an update requires a restart, there is the this usual brutal and un-friendly "Shutdown" message scarring my users. Jenkins should be able to make a difference between "shutdown" and "restart".

          Tried the Lenient plugin. But that does not solve the case with "native" Jenkins restart message when for instance a plugin update forces a restart. Lenient is YAWOR (yet another way of restarting), separated from the built in. Not integrated with. Still the brutal "Jenkins is is going to shutdown".

          Anders Hoglund added a comment - Tried the Lenient plugin. But that does not solve the case with "native" Jenkins restart message when for instance a plugin update forces a restart. Lenient is YAWOR (yet another way of restarting), separated from the built in. Not integrated with. Still the brutal "Jenkins is is going to shutdown".

          Daniel Beck added a comment -

          Is the problem the wording of the default message, or that there's no easy way to add an explanation next to it?

          I.e. would changing the message to "Jenkins is quieting down in preparation for maintenance" or something similar work?

          Daniel Beck added a comment - Is the problem the wording of the default message, or that there's no easy way to add an explanation next to it? I.e. would changing the message to "Jenkins is quieting down in preparation for maintenance" or something similar work?

          All of above. Wording, hardcoded somewhere. And also no distinction made between shutdown and restart. Only a shutdown message.
          My users got scared thinking I would end the service. When all I did was update plugins.

          Anders Hoglund added a comment - All of above. Wording, hardcoded somewhere. And also no distinction made between shutdown and restart. Only a shutdown message. My users got scared thinking I would end the service. When all I did was update plugins.

          Steffen Breitbach added a comment - - edited

          Seconded.

          The worst part of the message is the "shutdown" part. I also got calls from users "why the Jenkins is shutting down" when this absolutely wasn't true...

          To me the best solution would be a default message (maybe the shutdown one) being displayed as long as not specified otherwise and the ability to override this somehow.

          Maybe the menu item shouldn't even read "Prepare for shutdown" but "Cease all operation" instead?

          Steffen Breitbach added a comment - - edited Seconded. The worst part of the message is the "shutdown" part. I also got calls from users "why the Jenkins is shutting down" when this absolutely wasn't true... To me the best solution would be a default message (maybe the shutdown one) being displayed as long as not specified otherwise and the ability to override this somehow. Maybe the menu item shouldn't even read "Prepare for shutdown" but "Cease all operation" instead?

          I agree, it would be wonderful if instead of displaying the built-in shutdown message it were possible to display a custom, user defined message like:

          Out of service from Monday, June 1, 2017 5:00 PM to 7:00 PM while ...

          Steven Christenson added a comment - I agree, it would be wonderful if instead of displaying the built-in shutdown message it were possible to display a custom, user defined message like: Out of service from Monday, June 1, 2017 5:00 PM to 7:00 PM while ...

          Fabien Rica added a comment -

          Hello,

          I need to restart Jenkins in 4 use cases:

          1. Plugins update: Message would contain the reason (ex: "plugins update") and a date/time when it will occur. Users will understand better that it's a minor inconvenience.
          2. General restart of Jenkins: Message would contain the reason (ex: "Performance issues") and the date/time. Users will understand that we are taking care of the complaints regarding general slowness.
          3. Reboot of the server: Message would contain the reason (ex: "OS updates")  and the date/time. No one really then discusses why it's needed, the OS have to be up-to-date to be in line with company security policy.
          4. Version update: Message would contain the reason (ex: "Jenkins version update")  and the date/time, several days in advance.

          In comparison: this feature exists in our company JIRA server and is extremely handy and well-perceived by the users.

          I don't understand why I see features requests created in from 2008/2009 (see also https://issues.jenkins-ci.org/browse/JENKINS-4967) and this is still not at least agreed that it is useful.

          I think it would be a great usability addition to Jenkins.

           

          Fabien Rica added a comment - Hello, I need to restart Jenkins in 4 use cases: Plugins update: Message would contain the reason (ex: "plugins update") and a date/time when it will occur. Users will understand better that it's a minor inconvenience. General restart of Jenkins: Message would contain the reason (ex: "Performance issues") and the date/time. Users will understand that we are taking care of the complaints regarding general slowness. Reboot of the server: Message would contain the reason (ex: "OS updates")  and the date/time. No one really then discusses why it's needed, the OS have to be up-to-date to be in line with company security policy. Version update: Message would contain the reason (ex: "Jenkins version update")  and the date/time, several days in advance. In comparison: this feature exists in our company JIRA server and is extremely handy and well-perceived by the users. I don't understand why I see features requests created in from 2008/2009 (see also https://issues.jenkins-ci.org/browse/JENKINS-4967 ) and this is still not at least agreed that it is useful. I think it would be a great usability addition to Jenkins.  

          Oleg Nenashev added a comment -

          snorky I think everybody agrees it's useful. Even more, it's not a big deal to implement it. So it just needs a contributor who is ready to deliver it.

          In my previous company we were just using a custom CSS via Simple Theme Plugin to make Jenkins Web UI red and to customize the header in order to warn about maintenance timeframe and the reasons. Then we just used System Groovy scripts to publish the announcements. It was working pretty fine.

          Oleg Nenashev added a comment - snorky I think everybody agrees it's useful. Even more, it's not a big deal to implement it. So it just needs a contributor who is ready to deliver it. In my previous company we were just using a custom CSS via Simple Theme Plugin to make Jenkins Web UI red and to customize the header in order to warn about maintenance timeframe and the reasons. Then we just used System Groovy scripts to publish the announcements. It was working pretty fine.

          Fabien Rica added a comment -

          oleg_nenashev I understand perfectly your point. It's just that when reading the thread I had the feeling some people were trying to minimize the need for it.

          Thanks for the workaround also.

          Fabien Rica added a comment - oleg_nenashev I understand perfectly your point. It's just that when reading the thread I had the feeling some people were trying to minimize the need for it. Thanks for the workaround also.

          Yes, I would like this feature just to prevent builds from happening at certain  times, such as when the LAN is down, and builds would just fail anyway.  Or we wish to suspend builds for an hour while we change a build process or something.  We would like to say have suspended Jenkins (i.e. is out of service temporarily), and it is not actually really going to shut down.

          Rick Patterson added a comment - Yes, I would like this feature just to prevent builds from happening at certain  times, such as when the LAN is down, and builds would just fail anyway.  Or we wish to suspend builds for an hour while we change a build process or something.  We would like to say have suspended Jenkins (i.e. is out of service temporarily), and it is not actually really going to shut down.

          Martin Jost added a comment - - edited

          I would like to see this inone of the next LTS releases. Would be really nice, Is there an official way to suggest this ?

          Martin Jost added a comment - - edited I would like to see this inone of the next LTS releases. Would be really nice, Is there an official way to suggest this ?

          Oleg Nenashev added a comment -

          It will be automatically included into a next LTS release baseline which is based on Jenkins 2.267 or above. With the current process this release would happen in early april

          Oleg Nenashev added a comment - It will be automatically included into a next LTS release baseline which is based on Jenkins 2.267 or above. With the current process this release would happen in early april

            austry Ilia Zasimov
            dlindner dlindner
            Votes:
            30 Vote for this issue
            Watchers:
            30 Start watching this issue

              Created:
              Updated:
              Resolved: