" /> Status for Andrew DeFaria: September 2004 Archives

« August 2004 | Main | December 2004 »

September 22, 2004

gs.vbs/Backups

  • Coded up gs.vbs, which will dump out the group heirarchy, whenever that arrives
  • Resolved the lockvobs.pl for backup issue - now working!
  • Spoke with server guy about new server's configuirations. Rtnlprod04 & 5 should be available by Monday!
  • Worked with Adam trying to get his login working

September 21, 2004

Group structure/View Server Problems

  • Finished designing group structure - about to make AD requests
  • View server had a problem again. More and more it seems to be a problem with the NIC card on rtnlprod02. Managed to log into rtnlprod02 and look around. Couldn't see any processes at all in the TaskManager even though the 4 CPUs were 70-90% busy! Couldn't look at the Network tab - said there was no network adapter. Additionally the following appeared in the System event log:

    Event Type:	Error
    Event Source:	NIC Agents
    Event Category:	Service 
    Event ID:	1285
    Date:		9/21/2004
    Time:		2:07:32 PM
    User:		N/A
    Computer:	RTNLPROD02
    Description:
    NIC Agent: Connectivity has been lost for the NIC in slot 0, port 1. [SNMP TRAP: 18006 in CPQNIC.MIB]
    Data:
    0000: 00 00 06 00 00 00 00 00   ........
    0008: 01 00                     ..      
    

September 20, 2004

cmconfig.vbs

Held code review for cmconfig.vbs. Spent the rest of the day implementing changes. Some changes were minor while a few others were good catches of possible problems.

September 16, 2004

Finished up populate_groups.vbs

  • Investigated the group structure to document that is it not really heirarchical. We need to get it more tree like
  • 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.

September 15, 2004

Populate users

  • Worked mainly on a script to backfill and populate users into the TOOLS database
  • 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 Last Known Good Configuration. 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...

September 14, 2004

Code complete for cmconfig.vbs

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:

  1. Configure Clearquest using installutil
  2. Verify connection to Clearquest
  3. Connect to the TOOLS database and verify that the user exists there
  4. Verify the user is in the proper Clearcase Active Directory group
  5. Set CLEARCASE_PRIMARY_GROUP and CLEARCASE_GROUPS properly for the user based on the users TOOLS record
  6. Set the Clearcase region as per the user's TOOLS record
  7. Configure user's Clearquest email settings
  8. Add registry entry to execute PMO-CM.cmd
  9. Add registry entry indicating the version of this script that was used
  10. Update the following fields in the user's record in the TOOLS database:
    • machineName (set to hostname if machineName was blank or set to "My Computer" or "Unknown")
    • machineName2 (set to hostname if machineName was NOT blank or set to "My Computer" or "Unknown")
    • idAddedtoCC (if #4 succeeds)
    • isDeployed (if no other errors occur)
    • isAddedtoCQ (if #3 succeeds)
  11. Runs cmverify to verify that all is OK

September 13, 2004

Env var problems

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:

  1. Set up Clearquest configuration parameters (installutil)
  2. Set up Clearcase configuration parameters (as per the logged in user) (setccconf.vbs)
  3. Verify the installation (cmverify.cmd)

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:

$ type setenv_var.vbs
Set sh  = WScript.CreateObject ("WScript.Shell")
Set env = sh.Environment ("USER")

env ("foo") = "bar"
$ type senenv_var.cmd
@echo off
set foo=bar
$ echo foo = %foo%
foo = %foo%
$ cscript setenv_var.vbs
$ echo foo = %foo%
foo = %foo%
$ call setenv_var.cmd
$ echo foo = %foo%
foo = bar
$ cmd /c echo foo = %foo%
foo = bar

Why it works for a .cmd script but not for a .vbs script I don't know.

So I will change cmconfig.cmd to do #1 and #2 above but skip #3. This means two things:

  1. Customers will have to run cmconfig.cmd first, then cmverify.cmd second
  2. The running of cmverify.cmd must be done in a separate, new cmd session

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...).

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.

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.

September 9, 2004

Server Heap Size/Comment PINE code

  • Investigated why the view server keeps needing a reboot. Found out that the server heap size was never increased. Fixed that.
  • Coded up a new trigger called COMMENT_PINE_CODE

September 8, 2004

Fixed corrupted SQL files for BUCS

  • Fixed corrupted SQL files for BUCS

September 2, 2004

setccconf

Found that there are situations where one needs to have CLEARCASE_PRIMARY_GROUP set. Worked with Mike to implement groups in the TOOLS database. Spent a large part of today implementing setccconfig.vbs. This command will replace setregion and sets 3 things:

  • Region
  • CLEARCASE_PRIMARY_GROUP
  • CLEARCASE_GROUPS (if required)

In order to do this the username is used to retrieve information from the TOOLS database. If the username is found then we get the project record and obtain the region. Next we check CC Primary Group and CC Groups. These fields will not always be filled in (previous entries lacked them but future entries should have them filled in. We then set CLEARCASE_PRIMARY_GROUP and CLEARCASE_GROUPS if there are any.

CC Groups in the TOOLS database will contain all Clearcase groups that the user belongs to - including their Primary group. In a lot of cases the user's CC Groups will be only one and equal to the Primary group. In that case CLEARCASE_GROUPS is not set. If the user is a member of more than one group then it will be their Primary group and additional groups in the CC Groups field. In that case Primary group is removed from that list and the rest are set into CLEARCASE_GROUPS.

September 1, 2004

CLEARCASE_PRIMARY_GROUP

Worked on setccconf.vbs