Closed Bug 309402 Opened 19 years ago Closed 19 years ago

Whine.pl Cron jobs are noisey if shutdownhtml is set

Categories

(Bugzilla :: Bugzilla-General, defect, P2)

2.20

Tracking

()

RESOLVED DUPLICATE of bug 309796

People

(Reporter: bugreport, Assigned: bugreport)

Details

Attachments

(1 file, 1 obsolete file)

In whine.pl and collectstats, shutdownhtml gets sent to stdout when it is
present.  It should quit silently.
Assignee: general → bugreport
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.22
This is a regression after 2.20 it seems
Attachment #196860 - Flags: review?(erik)
For 2.21 the problem is...
Shutdown message goes to stdout from cron jobs

For 2.20, collectstats is noisey if shutdownhtml is in effect (new database)
[Tue Sep 20 17:44:37 2005] duplicates.cgi: Use of uninitialized value in pattern
match (m//) at (eval 26) line 4.
[Tue Sep 20 17:44:37 2005] duplicates.cgi: Use of uninitialized value in pattern
match (m//) at (eval 26) line 4.

Assignee: bugreport → general
Flags: blocking2.20?
Summary: Shutdown message goes to stdout from cron jobs → Cron jobs are noisey if shutdownhtml is set
Target Milestone: Bugzilla 2.22 → Bugzilla 2.20
Version: 2.21 → 2.20
Attachment #196860 - Attachment description: Let whine and collectstats silently exit if shutdown → Let whine and collectstats silently exit if shutdown (for 2.21)
Whiteboard: need patch for 2.20
collectstats.pl should probably print a warning and exit (so that it does show
up in the mail from cron).  It should probably be something like
"Collectstats.pl is aborting because Bugzilla is currently shut down" rather
than the contents of shutdownhtml, though.  The reason for this is it's
dataloss, since the stats and series data collection for that day have now been
lost, and it should be brought to the admin's attention so they can run it
manually once Bugzilla is up.

whine.pl can probably safely just silently exit.
Comment on attachment 196860 [details] [diff] [review]
Let whine and collectstats silently exit if shutdown (for 2.21)

This patch doesn't make sense to me. In Bugzilla.pm, you allow collectstats.pl
to go through, but you explicitly want to exit in collectstats.pl if
shutdownhtml is on. Either you allow the .pl script to run independently of
shutdownhtml and you only add it to the list of allowed script in Bugzilla.pm,
or you want to prevent collectstats.pl from running and you don't add it to the
list of allowed scripts.

Moreover, we have a nice test in Bugzilla.pm which uses i_am_cgi() to determine
the right output format, precisely for .pl scripts. I see no problem to display
this message in all cases, including collectstats.pl.

So this bug is not a bug, and doesn't block 2.20.
Attachment #196860 - Flags: review-
In 2.20, collectstats tries to run in spite of shutdownhtml but generates noise

In 2.21, both generate noise.  Justdave's point is that collectstats should make
the (daily) noise it makes.  Whine.pl should silently exit.

The reason for the desired behavior being different is that collectastats will
miss a day if it misses a daily run.  Whine will send whinemail out a few
minutes late if it misses one of its runs and, if permitted to be noisey, will
send mail every few minutes.
Comment on attachment 196860 [details] [diff] [review]
Let whine and collectstats silently exit if shutdown (for 2.21)

>Index: Bugzilla.pm
>+    'whine.pl',

Looks fine on this end, though.  Not that there's much to go wrong.
Attachment #196860 - Flags: review?(erik)
OK...  we just need to keep whine.pl from getting noise from Bugzilla.pm
Flags: blocking2.20?
Summary: Cron jobs are noisey if shutdownhtml is set → Whine.pl Cron jobs are noisey if shutdownhtml is set
Whiteboard: need patch for 2.20
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Attached patch Just silence Bugzilla.pm β€” β€” Splinter Review
Assignee: general → bugreport
Attachment #196860 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #196995 - Flags: review?
Comment on attachment 196995 [details] [diff] [review]
Just silence Bugzilla.pm

>Index: Bugzilla.pm

>     'doeditparams.cgi',
>     'editparams.cgi',
>     'checksetup.pl',
>+    'whine.pl',


Looks good to me. I will let erik review it.

Nit unrelated to this bug: erik, shouldn't whine.pl exit before doing all these
calls to dbh->prepare()?
> 
> Nit unrelated to this bug: erik, shouldn't whine.pl exit before doing all these
> calls to dbh->prepare()?
> 

Yes.  I'll write another bug for that.  
Comment on attachment 196995 [details] [diff] [review]
Just silence Bugzilla.pm

Uh yeah.  worksforme.  r+
Attachment #196995 - Flags: review? → review+
Flags: approval?
Flags: approval? → approval+
Bug 309706 is the right way to do this and it will fix this more fully.


*** This bug has been marked as a duplicate of 309796 ***
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Flags: approval+
Resolution: --- → DUPLICATE
Target Milestone: Bugzilla 2.22 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: