Page MenuHomePhabricator

icinga-downtime script waiting forever if host already in downtime
Closed, ResolvedPublic

Assigned To
Authored By
Volans
Sep 9 2016, 11:38 AM
Referenced Files
None
Tokens
"Pirate Logo" token, awarded by Marostegui."Heartbreak" token, awarded by jcrespo.

Description

The modules/icinga/files/icinga-downtime script expects 2 lines of output from the Icinga log when applying the downtime.
If the host is already in scheduled dowtime and the purpose of the run is to extend it's downtime adding a second one, the Icinga log will have only one line printed, the second one will not happen if the host is already in scheduled downtime.

[1473416031] EXTERNAL COMMAND: SCHEDULE_HOST_DOWNTIME;mw2132;1473416026;1473423226;1;0;7200;marvin-bot;Reimaging: T143536
[1473416031] HOST DOWNTIME ALERT: mw2132;STARTED; Host has entered a period of scheduled downtime

Event Timeline

ema triaged this task as Medium priority.Feb 8 2018, 9:32 AM

Change 408989 had a related patch set uploaded (by Ema; owner: Ema):
[operations/puppet@production] icinga-downtime: do not wait for two log lines

https://gerrit.wikimedia.org/r/408989

Change 408989 merged by Dzahn:
[operations/puppet@production] icinga-downtime: do not wait for two log lines

https://gerrit.wikimedia.org/r/408989

ema claimed this task.
ema subscribed.

Fixed by https://gerrit.wikimedia.org/r/408989.

10:34:34 ema@einsteinium.wikimedia.org:~
$ sudo icinga-downtime -h cp1008 -d 40 -r 'test --ema'                                                                                                        
10:34:51 ema@einsteinium.wikimedia.org:~                                                                                                                      
$ sudo icinga-downtime -h cp1008 -d 60 -r 'test --ema'                                                                                                        
10:34:56 ema@einsteinium.wikimedia.org:~