Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 310105 Details for
Bug 452447
modify the Whines check in the sanitycheck.cgi to work with our cron jobs
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
v1 modifying new whines check in sanitycheck
patch.diff (text/plain), 4.93 KB, created by
Noura El hawary
on 2008-06-24 05:04:00 UTC
(
hide
)
Description:
v1 modifying new whines check in sanitycheck
Filename:
MIME Type:
Creator:
Noura El hawary
Created:
2008-06-24 05:04:00 UTC
Size:
4.93 KB
patch
obsolete
>Index: sanitycheck.pl >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/sanitycheck.pl,v >retrieving revision 1.6 >diff -p -u -r1.6 sanitycheck.pl >--- sanitycheck.pl 24 Jun 2008 03:46:57 -0000 1.6 >+++ sanitycheck.pl 24 Jun 2008 04:58:37 -0000 >@@ -53,7 +53,8 @@ my @OptionDefs = ( > 'keyword_cache', 'general_bug_check', > 'control_values', 'unsent_emails', > 'flag_check', 'bugs_components', >- 'diff_report', 'bugs_activity_flag'); >+ 'diff_report', 'bugs_activity_flag', >+ 'whines_obsolete_target' ); > > # check options > my @Checks = qw( >@@ -66,6 +67,7 @@ my @Checks = qw( > flag_check > bugs_components > bugs_activity_flag >+ whines_obsolete_target > ); > > GetOptions(\%options, 'verbose', 'login=s', 'help|h|?', @OptionDefs); >@@ -289,6 +291,9 @@ Perform flag checks in bugs_activity.add > It looks flag names that are no longer valid flags since they may have been removed or > renamed in flags table. > >+=item B<--whines_obsolete_target> >+ >+Perform checking for scheduled whines with non-existent users or groups. > > =back > >Index: sanitycheck.cgi >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/sanitycheck.cgi,v >retrieving revision 1.8 >diff -p -u -r1.8 sanitycheck.cgi >--- sanitycheck.cgi 24 Jun 2008 03:46:57 -0000 1.8 >+++ sanitycheck.cgi 24 Jun 2008 04:58:54 -0000 >@@ -115,6 +115,7 @@ my @check_params = qw( > flag_check > bugs_components > bugs_activity_flag >+ whines_obsolete_target > ); > for my $chk (@check_params) { > if ($cgi->param($chk)){ >@@ -1204,30 +1205,34 @@ if ($cgi->param('bugs_activity_flag')) { > # REDHAT EXTENSION END 452193 > > ########################################################################### >-# Whines >+# Whines check > ########################################################################### >+if ($cgi->param('whines_obsolete_target')) { > >-Status('whines_obsolete_target_start'); >+ $cgi->param('output' , ''); > >-my $display_repair_whines_link = 0; >-foreach my $target (['groups', 'id', MAILTO_GROUP], >- ['profiles', 'userid', MAILTO_USER]) >-{ >- my ($table, $col, $type) = @$target; >- my $old = $dbh->selectall_arrayref("SELECT whine_schedules.id, mailto >- FROM whine_schedules >- LEFT JOIN $table >- ON $table.$col = whine_schedules.mailto >- WHERE mailto_type = $type AND $table.$col IS NULL"); >+ Status('whines_obsolete_target_start'); > >- if (scalar(@$old)) { >- Status('whines_obsolete_target_alert', {schedules => $old, type => $type}, 'alert'); >- $display_repair_whines_link = 1; >- } >-} >+ my $display_repair_whines_link = 0; >+ foreach my $target (['groups', 'id', MAILTO_GROUP], >+ ['profiles', 'userid', MAILTO_USER]) >+ { >+ my ($table, $col, $type) = @$target; >+ my $old = $dbh->selectall_arrayref("SELECT whine_schedules.id, mailto >+ FROM whine_schedules >+ LEFT JOIN $table >+ ON $table.$col = whine_schedules.mailto >+ WHERE mailto_type = $type AND $table.$col IS NULL"); > >-Status('whines_obsolete_target_fix') if $display_repair_whines_link; >+ if (scalar(@$old)) { >+ Status('whines_obsolete_target_alert', {schedules => $old, type => $type}, 'alert'); >+ $display_repair_whines_link = 1; >+ } >+ } > >+ Status('whines_obsolete_target_fix') if $display_repair_whines_link; >+ $cgi->param('whines_obsolete_target_report', $cgi->param('output')); >+} > ########################################################################### > # End > ########################################################################### >Index: config/sanitycheck.cron >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/config/sanitycheck.cron,v >retrieving revision 1.3 >diff -p -u -r1.3 sanitycheck.cron >--- config/sanitycheck.cron 15 Apr 2008 06:53:26 -0000 1.3 >+++ config/sanitycheck.cron 24 Jun 2008 04:59:11 -0000 >@@ -1,4 +1,4 @@ > # run 13 minutes past midnight every day > 13 0 * * * apache cd /var/www/html/bugzilla; perl ./sanitycheck.pl --foreign_keys --unsent_emails --diff_report --login 'bugzilla-owner@redhat.com' > # run 13 minutes past every friday midnight "weekly run" >-13 0 * * 5 apache cd /var/www/html/bugzilla; perl ./sanitycheck.pl --profile_loginnames --keyword_cache --general_bug_check --control_values --flag_check --bugs_components --diff_report --login 'bugzilla-owner@redhat.com' >+13 0 * * 5 apache cd /var/www/html/bugzilla; perl ./sanitycheck.pl --profile_loginnames --keyword_cache --general_bug_check --control_values --flag_check --bugs_components --bugs_activity_flag --whines_obsolete_target --diff_report --login 'bugzilla-owner@redhat.com'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dkl
: review+
Actions:
View
|
Diff
Attachments on
bug 452447
: 310105