Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2004_09_12.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: September 12, 2004 - September 18, 2004 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_2004_09_05.html" title="September  5, 2004 - September 11, 2004" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2004_09_19.html" title="September 19, 2004 - September 25, 2004" />
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_2004_09_05.html">&laquo; September  5, 2004 - September 11, 2004</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2004_09_19.html">September 19, 2004 - September 25, 2004 &raquo;</a>
38                      </p>
39                      
40                      
41                      
42
43                      <h2 class="date-header">September 16, 2004</h2>
44                      <a id="a000248"></a>
45                      <div class="entry" id="entry-248">
46                         <h3 class="entry-header">Finished up populate_groups.vbs</h3>
47                         <div class="entry-content">
48                            <div class="entry-body">
49                               <ul>
50
51 <li>Investigated the group structure to document that is it not really heirarchical. We need to get it more tree like</li>
52
53 <li>Finished up coding populate_groups.vbs. Code now will walk the tree (that is when we get a tree!) and add users to the TOOLS database including their groups, gathered from walking the tree. If we do not have a tree to walk then the groups will be incomplete. Similarly if we tell populate_groups to populate from a node in the tree then only the groups in that node down will be gathered properly.</li>
54
55 </ul>
56                               
57                               <p class="entry-footer">
58                                  <span class="post-footers">Posted by  at  7:43 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000248.html">Permalink</a>
59                                  
60                                  
61                               </p>
62                            </div>
63                         </div>
64                      </div>
65                      
66                      
67
68                      <h2 class="date-header">September 15, 2004</h2>
69                      <a id="a000247"></a>
70                      <div class="entry" id="entry-247">
71                         <h3 class="entry-header">Populate users</h3>
72                         <div class="entry-content">
73                            <div class="entry-body">
74                               <ul>
75
76 <li>Worked mainly on a script to backfill and populate users into the TOOLS database</li>
77
78 <li>View server acted up again. Rebooted it but then it didn't come up!  Got the server guys involved and they booted it to the <i>Last Known Good Configuration</i>. This means that the Server Heap Size registry tweaks have been backed out. This also means that we'll probably have the view server having problems again soon. We need to schedule a maintainance period to reboot the view server with the proper registry tweaks. I can't imagine that that setting caused a problem with rebooting as it's the same setting as rtnlprod01 which is the same hardware. I looked at the event log a little bit and I think that rtnlprod02's problems may be a failing NIC card. I guess time will tell...</li>
79
80 </ul>
81                               
82                               <p class="entry-footer">
83                                  <span class="post-footers">Posted by  at  8:57 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000247.html">Permalink</a>
84                                  
85                                  
86                               </p>
87                            </div>
88                         </div>
89                      </div>
90                      
91                      
92
93                      <h2 class="date-header">September 14, 2004</h2>
94                      <a id="a000245"></a>
95                      <div class="entry" id="entry-245">
96                         <h3 class="entry-header">Code complete for cmconfig.vbs</h3>
97                         <div class="entry-content">
98                            <div class="entry-body">
99                               <p>Working mainly on cmconfig.vbs. Solution for the env problem was to set both the user environment and the process environment then call cmverfiy.cmd from cmconfig.vbs. The code now does the folowing:</p>
100
101 <ol>
102   <li>Configure Clearquest using installutil</li>
103
104   <li>Verify connection to Clearquest</li>
105
106   <li>Connect to the TOOLS database and verify that the user exists there</li>
107
108   <li>Verify the user is in the proper Clearcase Active Directory group</li>
109
110   <li>Set CLEARCASE_PRIMARY_GROUP and CLEARCASE_GROUPS properly for the user based on the users TOOLS record</li>
111
112   <li>Set the Clearcase region as per the user's TOOLS record</li>
113
114   <li>Configure user's Clearquest email settings</li>
115
116   <li>Add registry entry to execute PMO-CM.cmd</li>
117
118   <li>Add registry entry indicating the version of this script that was used</li>
119
120   <li>Update the following fields in the user's record in the TOOLS database:
121
122   <ul>
123      <li>machineName (set to hostname if machineName was blank or set to "My Computer" or "Unknown")</li>
124
125     <li>machineName2 (set to hostname if machineName was NOT blank or set to "My Computer" or "Unknown")</li>
126
127     <li>idAddedtoCC (if #4 succeeds)</li>
128
129     <li>isDeployed (if no other errors occur)</li>
130
131     <li>isAddedtoCQ (if #3 succeeds)</li>
132   </ul>
133
134   <li>Runs cmverify to verify that all is OK</li>
135 </ul>
136                               
137                               <p class="entry-footer">
138                                  <span class="post-footers">Posted by  at  6:01 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000245.html">Permalink</a>
139                                  
140                                  
141                               </p>
142                            </div>
143                         </div>
144                      </div>
145                      
146                      
147
148                      <h2 class="date-header">September 13, 2004</h2>
149                      <a id="a000246"></a>
150                      <div class="entry" id="entry-246">
151                         <h3 class="entry-header">Env var problems</h3>
152                         <div class="entry-content">
153                            <div class="entry-body">
154                               <p>There is a slight problem with the "set everything and verify it" script cmconfig.cmd. The idea was that that one script would perform 3 separate actions:</p>
155
156 <ol>
157   <li>Set up Clearquest configuration parameters (installutil)</li>
158
159   <li>Set up Clearcase configuration parameters (as per the logged in user) (setccconf.vbs)</li>
160
161   <li>Verify the installation (cmverify.cmd)</li>
162 </ol>
163
164 <p>The problem is with #2 being VBScript and #3 happening as a result of executing from the cmconfig.cmd script. While setccconf.vbs does indeed set the proper configuration environment variables as soon as it ends those settings are no longer set anymore by the evoking script only. All other (new) processes know about the change to the environment variables. To illustrate this odd phenomena:</p>
165
166 <div class="code">
167 <pre>
168 $ <u>type setenv_var.vbs</u>
169 Set sh  = WScript.CreateObject ("WScript.Shell")
170 Set env = sh.Environment ("USER")
171
172 env ("foo") = "bar"
173 $ <u>type senenv_var.cmd</u>
174 @echo off
175 set foo=bar
176 $ <u>echo foo = %foo%</u>
177 foo = %foo%
178 $ <u>cscript setenv_var.vbs</u>
179 $ <u>echo foo = %foo%</u>
180 foo = %foo%
181 $ <u>call setenv_var.cmd</u>
182 $ <u>echo foo = %foo%</u>
183 foo = bar
184 $ <u>cmd /c echo foo = %foo%</u>
185 foo = bar
186 </pre>
187 </div>
188
189 <p>Why it works for a .cmd script but not for a .vbs script I don't know.</p>
190
191 <p>So I will change cmconfig.cmd to do #1 and #2 above but skip #3. This means two things:</p>
192
193 <ol>
194   <li>Customers will have to run cmconfig.cmd first, then cmverify.cmd second</li>
195
196   <li>The running of cmverify.cmd must be done in a separate, new cmd session</li>
197 </ol>
198
199 <p>The reason for #2 is that even after cmconfig.cmd is run environment variables such as CLEARCASE_PRIMARY_GROUP and CLEARCASE_GROUPS will not have been "exported" into that cmd's environment (unless somebody can tell me how to set the parent's environment variables from VBScript...).</p>
200
201 <p>For the point and click crowd this should be OK. The email message you send the customer should have two links: one to cmconfig.cmd and one to cmverify.cmd. If the customer clicks the cmconfig.cmd link then cmconfig.cmd should run, in it's own process, and go away. Subsequently if the user clicks on cmverify.cmd that will run in it's own cmd process and it should pick up the appropriate environment variable settings.</p>
202
203 <p>There have been many requests for enhancements to the configuration scripts including updating the TOOLS database on successful verification and performing additional checks such as "is this user really in the AD group". I believe I will only be able to solve the above problem by having the setccconf.vbs script actually envoke the cmverify.cmd directly so that the environment variables that setccconf.vbs just set are exported into the cmverify.cmd's environment.</p>
204                               
205                               <p class="entry-footer">
206                                  <span class="post-footers">Posted by  at  6:07 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000246.html">Permalink</a>
207                                  
208                                  
209                               </p>
210                            </div>
211                         </div>
212                      </div>
213                      
214                   </div>
215                </div>
216             </div>
217          </div>
218       </div>
219    </div>
220 </body>
221 </html>