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">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
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"$>" />
12 <title>Status for Andrew DeFaria: September 12, 2004 - September 18, 2004 Archives</title>
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" />
18 <body class="layout-one-column">
20 <div id="container-inner" class="pkg">
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>
30 <div id="pagebody-inner" class="pkg">
32 <div id="alpha-inner" class="pkg">
34 <p class="content-nav">
35 <a href="http://defaria.com/blogs/Status/archives/week_2004_09_05.html">« 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 »</a>
43 <h2 class="date-header">September 16, 2004</h2>
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">
51 <li>Investigated the group structure to document that is it not really heirarchical. We need to get it more tree like</li>
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>
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>
68 <h2 class="date-header">September 15, 2004</h2>
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">
76 <li>Worked mainly on a script to backfill and populate users into the TOOLS database</li>
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>
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>
93 <h2 class="date-header">September 14, 2004</h2>
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>
102 <li>Configure Clearquest using installutil</li>
104 <li>Verify connection to Clearquest</li>
106 <li>Connect to the TOOLS database and verify that the user exists there</li>
108 <li>Verify the user is in the proper Clearcase Active Directory group</li>
110 <li>Set CLEARCASE_PRIMARY_GROUP and CLEARCASE_GROUPS properly for the user based on the users TOOLS record</li>
112 <li>Set the Clearcase region as per the user's TOOLS record</li>
114 <li>Configure user's Clearquest email settings</li>
116 <li>Add registry entry to execute PMO-CM.cmd</li>
118 <li>Add registry entry indicating the version of this script that was used</li>
120 <li>Update the following fields in the user's record in the TOOLS database:
123 <li>machineName (set to hostname if machineName was blank or set to "My Computer" or "Unknown")</li>
125 <li>machineName2 (set to hostname if machineName was NOT blank or set to "My Computer" or "Unknown")</li>
127 <li>idAddedtoCC (if #4 succeeds)</li>
129 <li>isDeployed (if no other errors occur)</li>
131 <li>isAddedtoCQ (if #3 succeeds)</li>
134 <li>Runs cmverify to verify that all is OK</li>
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>
148 <h2 class="date-header">September 13, 2004</h2>
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>
157 <li>Set up Clearquest configuration parameters (installutil)</li>
159 <li>Set up Clearcase configuration parameters (as per the logged in user) (setccconf.vbs)</li>
161 <li>Verify the installation (cmverify.cmd)</li>
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>
168 $ <u>type setenv_var.vbs</u>
169 Set sh = WScript.CreateObject ("WScript.Shell")
170 Set env = sh.Environment ("USER")
173 $ <u>type senenv_var.cmd</u>
176 $ <u>echo foo = %foo%</u>
178 $ <u>cscript setenv_var.vbs</u>
179 $ <u>echo foo = %foo%</u>
181 $ <u>call setenv_var.cmd</u>
182 $ <u>echo foo = %foo%</u>
184 $ <u>cmd /c echo foo = %foo%</u>
189 <p>Why it works for a .cmd script but not for a .vbs script I don't know.</p>
191 <p>So I will change cmconfig.cmd to do #1 and #2 above but skip #3. This means two things:</p>
194 <li>Customers will have to run cmconfig.cmd first, then cmverify.cmd second</li>
196 <li>The running of cmverify.cmd must be done in a separate, new cmd session</li>
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>
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>
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>
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>