Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2005_11_06.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml"$>" />
11
12    <title>Status for Andrew DeFaria: November  6, 2005 - November 12, 2005 Archives</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/week_2005_10_30.html" title="October 30, 2005 - November  5, 2005" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2005_11_13.html" title="November 13, 2005 - November 19, 2005" />
17 </head>
18 <body class="layout-one-column">
19    <div id="container">
20       <div id="container-inner" class="pkg">
21
22          <div id="banner">
23             <div id="banner-inner" class="pkg">
24                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
25                <h2 id="banner-description">Searchable status reports and work log</h2>
26             </div>
27          </div>
28
29          <div id="pagebody">
30             <div id="pagebody-inner" class="pkg">
31                <div id="alpha">
32                   <div id="alpha-inner" class="pkg">
33                      
34                      <p class="content-nav">
35                         <a href="http://defaria.com/blogs/Status/archives/week_2005_10_30.html">&laquo; October 30, 2005 - November  5, 2005</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2005_11_13.html">November 13, 2005 - November 19, 2005 &raquo;</a>
38                      </p>
39                      
40                      
41                      
42
43                      <h2 class="date-header">November 12, 2005</h2>
44                      <a id="a000476"></a>
45                      <div class="entry" id="entry-476">
46                         <h3 class="entry-header">Several PQA Fixes</h3>
47                         <div class="entry-content">
48                            <div class="entry-body">
49                               <ul>
50   <li>Added Exit Sub/Function to several validation and initialization functions in order to allow TransferState to work</li>
51
52   <li>Fixed some bugs with Fixed_In_SW_Version and OS values of "Novell 6 Pack Beta 3 ". Not sure how this got by before with the trailing space but it raised it's ugly head in TransferStates</li>
53
54   <li>Change pqamerge to treat the Submit state like the Assigned state</li>
55
56   <li>With implementation of ID equality, I have to constantly regenerate the database from scratch. Experienced some problems with this and had to change the schema by allowing admin to submit. This may have been a different problem in that I now need to subscribe all users and groups to Cont database and Upgrade the database each time I create it a new</li>
57
58   <li>Transitioning through states have reveal some fields that where not initially tranfered from the TO database. The fields missed were ResolvedBy, ResolveNote and VerifyNote</li>
59 </ul>
60                               
61                               <h2>Additional Schema Action Hook Changes</h2>
62
63 <p>In order to set State properly pqamerge needs to transition through states to get to the desired end state. For eample, many defects in Prod are in the Closed state. But when pqamerge first creates the defect in Cont it will be in the Assigned state. In order to get to the Closed state pqamerge need to apply the Resolve, Verify and Close actions. As such it triggers state change action hook code.</p>
64
65 <p>For example, in order to transition to the Verified state the Verify action must be applied. When the Verify action happens the action hooks for Verify are run. Part of what they do is initalize owner to blank. It is expected that the user exectuting the Verify action will fill that in. But that messes us up since we are not a person and we already have the "correct" data. Investigating this further reveals other places where, for example, the current date is put into a field such as Resolve_Date and calculations are made in other fields such TimeFromSubmitToResolve. We don't want any of that happening!</p>
66
67 <p>To resolve these issues the following Action Hooks have an Exit Sub or Exit Function placed at the beginning of the subroutine or function call so as to avoid the incorrect updating of data fields and so that email is not send out (the other thing many of these Action Hooks do):</p>
68
69 <ul>
70   <li>Submit: Validation</li>
71
72   <li>Assign: Notification</li>
73
74   <li>Resolve: Initialization; Validation; Notification</li>
75
76   <li>Verify: Initialization; Validation; Notification</li>
77
78   <li>Re-Open: Notification</li>
79
80   <li>Close: Initialization; Notification</li>
81
82   <li>Modify: Notification</li>
83
84   <li>Unassign: Notification</li>
85
86   <li>DoesNotVerify: Initialization; Validation; Notification</li>
87
88   <li>VerifiedPendingCustVerify: Notification</li>
89
90   <li>CustomerVerified: Notification</li>
91
92   <li>Data_Pending: Notification</li>
93 </ul>
94
95 <p>I should have just done all of them or perhaps tried to change the Actions table from use Basic script to script None but the above set seems to be working.</p>
96
97 <h2>Data Issue</h2>
98
99 <p>Ran the merge and now it's taking 6 hours 54 minutes 39 seconds. This is due to running through the various states to obtain the appropriate state and "burning" IDs so that the IDs match. One remaining problem that I don't know how to fix: Defect Prod00012546 is in the closed state yet lacks any VerifyNote. When transfered to Cont pqamerge tries to go through the states and gets stuck trying to transition this defect from Resolved -> Verify due to the lack of a VerifyNote. I do not know how this happened in the Prod database. The only thing I can think of is that somebody modified Prod00012546 <strong>after</strong> it passed the Verified state blanking out VerifyNote.</p>
100
101 <p>I'm running check_attachments now and I expect that to result is 0 differences in attachments.</p>
102
103 <div class="code"><pre>
104 vobadm@P4TEST /dev/d/PQA
105 $ cqperl W:/it_scm/adm/cq/check_attachments -v
106 Grand total (old): 2955822684
107 Grand total (new): 2955822684
108 </pre></div>
109
110
111                               
112                               <p class="entry-footer">
113                                  <span class="post-footers">Posted by  at 12:17 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000476.html">Permalink</a>
114                                  
115                                  
116                               </p>
117                            </div>
118                         </div>
119                      </div>
120                      
121                      
122
123                      <h2 class="date-header">November 11, 2005</h2>
124                      <a id="a000475"></a>
125                      <div class="entry" id="entry-475">
126                         <h3 class="entry-header">Final PQA fixes</h3>
127                         <div class="entry-content">
128                            <div class="entry-body">
129                               <ul>
130   <li>Implemented TransferStates</li>
131
132   <li>Found final problem with attachments and fixed it</li>
133
134   <li>Implemented ID number equality</li>
135 </ul>
136                               
137                               <p class="entry-footer">
138                                  <span class="post-footers">Posted by  at  1:54 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000475.html">Permalink</a>
139                                  
140                                  
141                               </p>
142                            </div>
143                         </div>
144                      </div>
145                      
146                      
147
148                      <h2 class="date-header">November 10, 2005</h2>
149                      <a id="a000474"></a>
150                      <div class="entry" id="entry-474">
151                         <h3 class="entry-header">Finding the missing 261,285,366 bytes</h3>
152                         <div class="entry-content">
153                            <div class="entry-body">
154                               <ul>
155   <li>Fixed bug in pqamerge that caused some attachments to not transfer</li>
156 </ul>
157                               
158                               <p>I think I've figured out where that missing data went to. As you know the total of the attachment sizes of the old databases compared to the new database was still off but a relatively substantial amount (261,285,366 bytes - see https://defaria.com/blogs/Status/archives/000471.html#more).</p>
159
160 <p>I changed check_attachments to help me find where the missing data was. The basic idea was to read all Cont records, total up the attachment size, then use Cont: old_id to locate the old record and total it. With those two figures I could find which records didn't convert correctly.</p>
161
162 <p>Turns out:</p>
163
164 <div class="code"><pre>
165  # At this point we don't have any info about whether we are
166  # coming from Prod or TO, however, there are the following fields:
167  #
168  #          TO               Prod              Cont
169  # ----------------------- ----------------------- ----------------
170  # Attachments        Attachments        Attachments
171  # AttachmentsBRCM        AttachmentBRCM        AttachmentsBRCM
172  #
173  # You may notice that Prod: AttachmentBRCM is missing the "s".
174  # Therefore:
175  $field_name = "AttachmentsBRCM" if $field_name eq "AttachmentBRCM";
176 </pre></div>
177
178 <p>Remerging and will run check_attachments again.</p>
179                               
180                               <p class="entry-footer">
181                                  <span class="post-footers">Posted by  at 11:55 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000474.html">Permalink</a>
182                                  
183                                  
184                               </p>
185                            </div>
186                         </div>
187                      </div>
188                      
189                      
190
191                      <h2 class="date-header">November  9, 2005</h2>
192                      <a id="a000473"></a>
193                      <div class="entry" id="entry-473">
194                         <h3 class="entry-header">Removing DBs from a Schema/Email link concerns</h3>
195                         <div class="entry-content">
196                            <div class="entry-body">
197                               <ul>
198   <li>Investigated how to remove databases from a CQ Schema</li>
199
200   <li>Created template files for Clearquest Web Login page to swap in for Phase I and Phase II onto the production web server (under C:\Temp\PQA)</li>
201
202   <li>Discussed the email link problem with Rational. While they can't say definitively what is supported they have stated that the old email link URL will not work in the new schema</li>
203 <ul>
204                               
205                               <h2>Databases contained in a Clearquest Schema Database</h2>
206
207 <p>A Clearquest connection profile connects to a Clearquest schema database. This schema database defines many things, one of which is which user databases this schema database covers. So with the old 2001 schema all of Prod, TO and NAS is defined in there. The Clearquest Designer has Delete Database and Undelete Database to remove and re-add databases to the schema. This is a misnomer. The schema database has a table, master_dbs, which lists all the user databases that this schema database knows about. What is really happening when you Delete Database is simply that Clearquest Designer is toggling the is_deleted field in master_dbs for this database to 1 meaning it's "deleted". Undelete database merely toggles it back to 0. Being marked deleted means that it will no longer show up as a database to select for Clearquest Windows Clients and the web server. The web server, however, needs to be restarted to notice the change.</p>
208
209 <h2>Another Email URL link issue</h2>
210
211 <p>With the concept of having multiple Schema repositories and database you are right to be concern about the user being confused when clicking on an email link. Normally the email link is of the format:</p>
212
213 <blockquote>
214 http://<<em>server</em>>/cqweb/url/default.asp?id=<<em>id</em>>
215 </blockquote>
216
217 <p>If the user is logged into CQ Web then they will go directly to the detail defect. If not they will make a brief stop at the login screen. With multiple Schema repositories the user will have to select the proper schema repository and database during login. However you can add on additional parameters to set the default schema repository and database like so:</p>
218
219 <blockquote>
220 http://<<em>server</em>>/cqweb/url/default.asp?id=<<em>id</em>>&dbset=<<em>dbset</em>>&db=<<em>db</em>>
221 </blockquote>
222
223 <p>For example:</p>
224
225 <blockquote>
226  http://pcsjca-ccrmt03/cqweb/url/default.asp?id=Cont00009460&dbset=2005.02.00&db=Cont
227 </blockquote>
228                               
229                               <p class="entry-footer">
230                                  <span class="post-footers">Posted by  at  3:52 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000473.html">Permalink</a>
231                                  
232                                  
233                               </p>
234                            </div>
235                         </div>
236                      </div>
237                      
238                      
239
240                      <h2 class="date-header">November  8, 2005</h2>
241                      <a id="a000472"></a>
242                      <div class="entry" id="entry-472">
243                         <h3 class="entry-header">Web Server Configuration and documentation</h3>
244                         <div class="entry-content">
245                            <div class="entry-body">
246                               <ul>
247   <li>Installed Clearquest 2001A.04.00 and verified that it can access Cont</li>
248
249   <li>Figured out how to modify the login page (Clearquest/Web/logon/default_content.asp) and created default_content1.asp and default_content2.asp</li>
250
251   <li>Wrote <a href="http://intranet.broadcom.com/%7Eadefaria/Clearquest/NewCQProfile.php">How to update my Clearquest Profile to access the new Cont database</a>
252 <ul>
253                               
254                               <p class="entry-footer">
255                                  <span class="post-footers">Posted by  at  7:54 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000472.html">Permalink</a>
256                                  
257                                  
258                               </p>
259                            </div>
260                         </div>
261                      </div>
262                      
263                      
264
265                      
266                      <a id="a000471"></a>
267                      <div class="entry" id="entry-471">
268                         <h3 class="entry-header">More on attachments</h3>
269                         <div class="entry-content">
270                            <div class="entry-body">
271                               <ul>
272   <li>Enhanced check_attachments to log better</li>
273 </ul>
274                               
275                               <p>Well it's better and didn't take as long as I thought. This time it took 4 hours 34 minutes 49 seconds. Not too bad. And the attachments size is closer. The total attachments for Cont is still &lt; the sum of the attachments from Prod and TO:</p>
276
277 <table align="center" border="1" cellpadding="2" cellspacing="0"
278  width="75%">
279   <tbody>
280     <tr>
281       <td valign="top">Prod total attachment size<br>
282       </td>
283       <td align="right" valign="top"> 2,683,569,547</td>
284     </tr>
285     <tr>
286       <td valign="top">TO total attachment size<br>
287       </td>
288       <td align="right" valign="top"> 272,253,137</td>
289     </tr>
290     <tr>
291       <td valign="top"><b>Total Prod + TO attachment size<br>
292       </b></td>
293       <td align="right" valign="top"><b> 2,955,822,684</b></td>
294     </tr>
295     <tr>
296       <td valign="top">Cont total attachment size<br>
297       </td>
298       <td align="right" valign="top"> 2,694,537,318</td>
299     </tr>
300     <tr>
301       <td valign="top"><b>Difference</b><br>
302       </td>
303       <td align="right" valign="top"><font color="#ff0000"><b>
304 261,285,366</b></font></td>
305     </tr>
306   </tbody>
307 </table>
308
309 <p>I'm not sure how to account for that difference.</p>
310                               
311                               <p class="entry-footer">
312                                  <span class="post-footers">Posted by  at 10:33 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000471.html">Permalink</a>
313                                  
314                                  
315                               </p>
316                            </div>
317                         </div>
318                      </div>
319                      
320                      
321
322                      <h2 class="date-header">November  7, 2005</h2>
323                      <a id="a000470"></a>
324                      <div class="entry" id="entry-470">
325                         <h3 class="entry-header">check_attachments</h3>
326                         <div class="entry-content">
327                            <div class="entry-body">
328                               <ul>
329   <li>Worked out a plan for how to perform the PQA Merge this weekend</li>
330
331   <li>Concerned about the size discrepancy in the database I wrote a little utility, check_attachments, to total up the size of all attachments in all the databases. This turned up a bug in pqamerge which I fixed. Reperforming pqamerge</li>
332
333   <li>There is a problem with using clearprompt to prompt for list input for bin_merge - You can only have one line of prompting text and only 50 characters in that line. It's gonna be hard to describe a binary merge situation in 50 characters or less. Investigated making a PerlTk list dialog. In theory it can be done as ccperl does support PerlTk.</li>
334
335   <li>Discussed with Naga the <i>email link</i> issue with PQA</li>
336 </ul>
337                               
338                               <h3>TransferAttachments</h3>
339
340 <p>I knew there was a good reason why this was eating at me. There is indeed a bug. My attachments transfer routine was not getting called at all for Prod! I wrote a small Perl script to check this and it yielded:<p>
341
342 <div class="code"><pre>
343 $ cqperl check_attachments
344 Totaling attachments in TO...
345 Totaling</span> attachments in Prod...
346 Totaling</span> attachments in Cont...
347 Total attachment size for TO = 272253137
348 Total attachment size for Prod = 2683569547
349 Total attachment size for Cont = 272253137
350 </pre></div>
351
352 <p>Notice that the size of the attachments for TO matches the size of attachments for Cont! IOW no Prod attachments got transferred at all!</p>
353
354 <p>Turns out I was only calling TransferAttachments when the field name was AttachmentsBRCM (and TransferAttachments then did all the attachments - both Attachments and AttachmentsBRCM). However, in Prod the field is named AttachmentBRCM - note the
355 singularity here! I tell ya my eyes are going.</p>
356
357 <p>I'm changing my code not be dependent on the field name and to just call TransferAttachments for each record. TransferAttachments doesn't need to know the field name - it just does all of them.</p>
358
359 <p>Unfortunately this means that I have to delete all of the records currently in the Cont database on p4test. And it also means that the approximate 4 hour running time will probably increase. However this does explain the discrepancy in the database sizes.</p>
360
361 <h3>Out of Disk Space</h3>
362
363 Shivdutt Jha wrote:
364 <blockquote type=cite>
365 Good job Andrew, another mystery is solved.
366 </blockquote>
367
368 <p>What is more telling is that we have 2.6 Gig of attachments!</p>
369
370 <p>In any event my merge failed with out of disk space. The pqamerge script uses the current directory to temporarily hold the attachments as the are transfered from one DB to the other. Turns out that Prod00010818 has two very large attachments, one 328485466 bytes and another 219095209 bytes. Unfortunately I was running in ~vobadm/My Documents and that disk filled. So another lesson learned - run pqamerge in a directory on a disk with lots of disk space! Alas this means I have to start this process over again (I'm trying to get a clean run and a timing of how long to expect the merge to run. pqamerge outputs how long it takes to do it work).</p>
371                               
372                               <p class="entry-footer">
373                                  <span class="post-footers">Posted by  at  6:54 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000470.html">Permalink</a>
374                                  
375                                  
376                               </p>
377                            </div>
378                         </div>
379                      </div>
380                      
381                   </div>
382                </div>
383             </div>
384          </div>
385       </div>
386    </div>
387 </body>
388 </html>