Bug 435667

Summary: Bugzilla data cleanup - bugs.rep_platform data cleanup
Product: [Community] Bugzilla Reporter: Tony Fu <tfu>
Component: Bugzilla GeneralAssignee: Tony Fu <tfu>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: devel   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-29 00:42:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 431402    
Attachments:
Description Flags
change bugs.rep_platform's value from "PC" to "i386" dkl: review+

Comment 1 David Lawrence 2008-03-04 16:18:57 UTC
Tony, for these just go to the three bugs in question on the live site and
change the rep_platform values to the following:

arm -> arm7
PC -> i386

Since there are only three then it is easy just to change the bugs.
And then close this out.

Thanks
Dave

Comment 2 Tony Fu 2008-03-05 06:21:21 UTC
Dave,

I have updated three bugs that have arm as rep_platform value.

There are 433 bugs that have PC as rep_platform value and we can use the
following sql query to change them to i386

UPDATE bugs SET rep_platform='i386' WHERE rep_platform='pc';


Tony

Comment 3 David Lawrence 2008-03-05 15:41:04 UTC
(In reply to comment #2)
> Dave,
> 
> I have updated three bugs that have arm as rep_platform value.
> 
> There are 433 bugs that have PC as rep_platform value and we can use the
> following sql query to change them to i386
> 
> UPDATE bugs SET rep_platform='i386' WHERE rep_platform='pc';

Hmm, I didn't realize there were so many. We will need to write a script that
does the bugs table update as you mention but I think we also need to insert the
changes into the bugs_activity log. I originally thought there were only a few
which we could have just changed through the UI which does the activity for us.

Tony, can you create a script for this?

Thanks
Dave



Comment 4 Tony Fu 2008-03-11 05:14:01 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Dave,
> > 
> > I have updated three bugs that have arm as rep_platform value.
> > 
> > There are 433 bugs that have PC as rep_platform value and we can use the
> > following sql query to change them to i386
> > 
> > UPDATE bugs SET rep_platform='i386' WHERE rep_platform='pc';
> 
> Hmm, I didn't realize there were so many. We will need to write a script that
> does the bugs table update as you mention but I think we also need to insert the
> changes into the bugs_activity log. I originally thought there were only a few
> which we could have just changed through the UI which does the activity for us.
> 
> Tony, can you create a script for this?
> 
> Thanks
> Dave
> 
> 

Please see attachment for the script.

Thanks,
Tony

Comment 5 Tony Fu 2008-03-11 05:14:59 UTC
Created attachment 297560 [details]
change bugs.rep_platform's value from "PC" to "i386"

Comment 6 David Lawrence 2008-03-17 03:52:39 UTC
Comment on attachment 297560 [details]
change bugs.rep_platform's value from "PC" to "i386"

Code looks good Tony. Please run on bz-db1-test.devel.redhat.com 'bugs2'
database and verify that data is proper converted. Also look through some
sample bug reports on bz-web1-test.devel.redhat.com. If it looks good, then
check the script into redhat directory in CVS. Put this bug into MODIFIED state
and we will schedule it to be ran on live for Thursday.

Thanks
Dave

Comment 7 Tony Fu 2008-03-18 01:49:34 UTC
(In reply to comment #6)
> (From update of attachment 297560 [details] [edit])
> Code looks good Tony. Please run on bz-db1-test.devel.redhat.com 'bugs2'
> database and verify that data is proper converted. Also look through some
> sample bug reports on bz-web1-test.devel.redhat.com. If it looks good, then
> check the script into redhat directory in CVS. Put this bug into MODIFIED state
> and we will schedule it to be ran on live for Thursday.
> 
> Thanks
> Dave
> 

I have tested this script against bugs2 db on bz-db1-test.devel.redhat.com and
it looked good.

checked this script into redhat directory in CVS repository.

Tony

Comment 8 David Lawrence 2008-05-28 17:18:11 UTC
Tony, I cannot remember, was this ran on production during one of our thursday
updates? If yes, please close this as CURRENTRELEASE/2.18

Thanks
Dave

Comment 9 Tony Fu 2008-05-29 00:41:26 UTC
(In reply to comment #8)
> Tony, I cannot remember, was this ran on production during one of our thursday
> updates? If yes, please close this as CURRENTRELEASE/2.18
> 
> Thanks
> Dave

Dave,

I think we have done it on production server.

mysql> select count(bug_id) from bugs where rep_platform='arm';
+---------------+
| count(bug_id) |
+---------------+
|             0 | 
+---------------+
1 row in set (0.30 sec)

mysql> select count(bug_id) from bugs where rep_platform='pc';
+---------------+
| count(bug_id) |
+---------------+
|             0 | 
+---------------+
1 row in set (0.30 sec)

Close this bug.

Tony