Project

General

Profile

Actions

Feature #364

closed

Enable "downtime" in Foreman

Added by Eric Shamow over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Reporting
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Enable a per-host "downtime" that would suppress the sending of error mails. Perhaps hosts in downtime could appear as a separate category in the regular Foreman report that's sent out.

This would allow users to perform maintenance on active Puppet machines without sending out a torrent of false alarms.


Files

enabledowntime.patch enabledowntime.patch 684 Bytes Patch to check host.enabled value before sending mail Eric Shamow, 08/23/2010 11:38 PM
20100823181036_add_enabled_to_hosts.rb 20100823181036_add_enabled_to_hosts.rb 189 Bytes Add enabled flag to hosts Eric Shamow, 08/23/2010 11:42 PM
displaydowntime.patch displaydowntime.patch 593 Bytes Display enabled flag on host page Eric Shamow, 08/23/2010 11:55 PM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #369: Problem with e-mail reports after "downtime" patch appliedClosedEric Shamow08/31/2010Actions
Actions #1

Updated by Eric Shamow over 13 years ago

Created db migration to generate the field:

class AddEnabledToHosts < ActiveRecord::Migration
def self.up
add_column :hosts, :enabled, :boolean, :default => 1
end

def self.down
remove_column :hosts, :enabled
end
end

Now working on report code to detect that enabled = false. Enabled = true results in message being sent through unchanged.

Actions #2

Updated by Eric Shamow over 13 years ago

Modified report_observer.rb to check flag status. Patch attached.

Actions #4

Updated by Eric Shamow over 13 years ago

Added a line to display enabled/disabled status on host page

Actions #5

Updated by Ohad Levy over 13 years ago

looks good, a few comments:

  1. consider using git, it makes this patching stuff much easier :)
  2. I would think that hosts that are disabled, should not appear in the dashboard - do you agree?
  3. it should be possible to toggle a host (enable / disable) - maybe a minor change in the host edit
  4. maybe it should also be considered to enable / disable multiple hosts at the same time (can be a separate feature request)
  5. filter hosts based on status (e.g. show all hosts which are disabled?)
Actions #6

Updated by Ohad Levy over 13 years ago

  • Category set to Reporting
  • Assignee set to Eric Shamow
  • Target version set to 0.1-6
Actions #7

Updated by Anonymous over 13 years ago

  • Status changed from New to Ready For Testing
  • % Done changed from 50 to 100
Actions #8

Updated by Ohad Levy over 13 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF