• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • mail-watcher-plugin
    • None

      We enabled your plugin to notify an email account when the slaves go offline. When I restart the master because we installed a new plugin, we get spammed with slave node notification emails.

      I would like the plugin to be able to ignore when a master server gets restarted.

          [JENKINS-24847] Don't notify when master is rebooted

          Henrik Caesar added a comment -

          I have been looking into this as we also get spammed each time we restart Jenkins.

          During a Jenkins restart there is one email sent for the shutdown of the slave at the restart, and then another email when the slave is launched again when Jenkins has started.

          I have managed to stop the mails sent when Jenkins is terminating (see this commit) but not when Jenkins is starting again. One idea I had was to check the init level, and if it's not COMPLETED no emails should be sent. The starting of the slaves however happen in a later step, so the init level will already be COMPLETE.

          Jenkins.getInstance().getInitLevel() == InitMilestone.COMPLETED
          

          I have run out of ideas so any suggestions are welcome...

          Henrik Caesar added a comment - I have been looking into this as we also get spammed each time we restart Jenkins. During a Jenkins restart there is one email sent for the shutdown of the slave at the restart, and then another email when the slave is launched again when Jenkins has started. I have managed to stop the mails sent when Jenkins is terminating (see this commit ) but not when Jenkins is starting again. One idea I had was to check the init level, and if it's not COMPLETED no emails should be sent. The starting of the slaves however happen in a later step, so the init level will already be COMPLETE. Jenkins.getInstance().getInitLevel() == InitMilestone.COMPLETED I have run out of ideas so any suggestions are welcome...

          kpop added a comment -

          +1

          kpop added a comment - +1

            Unassigned Unassigned
            idapperdanman David Ishee
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: