" /> Status for Andrew DeFaria: August 2007 Archives

« July 2007 | Main | September 2007 »

August 30, 2007

Building Oracle 10.x for Linux

  • Managed to get a 10.2 sqlplus client to talk to our 9.2 database server from Solaris. Regular expressions, however, do not work.
  • Since there is no 9.2 Oracle 64 bit client for Linux I decided to attempt to get the 10.2 Oracle 64 bit client installed. Managed to get a 10.2 sqlplus client to talk to our 9.2 database server from Linux! Went to build the Qt OCI portion and failed.
  • Building Qt OCI

    Pat, I managed to install the Oracle Client 10.x for Linux - Will had gotten a 64 bit version. I even managed to use sqlplus to connect to RANCQ_RANDBS from Linux!

    Now it's time to build Qt's OCI interface so that I can ultimately build the Linux version of ucmwb.

    Trolltech, makers of Qt, state:

    How to Build the OCI Plugin on Unix and Mac OS X

    For Oracle 10g, all you need is the "Instant Client Package - Basic" and "Instant Client Package - SDK". For Oracle prior to 10g, you require the standard Oracle client and the SDK packages.

    Oracle library files required to build the driver:

    • libclntsh.so (all versions)
    • libwtc9.so (only Oracle 9)

    Tell qmake where to find the Oracle header files and shared libraries and run make:

    For Oracle version 9:

    cd $QTDIR/src/plugins/sqldrivers/oci
    qmake -o Makefile "INCLUDEPATH+=$ORACLE_HOME/rdbms/public $ORACLE_HOME/rdbms/demo" "LIBS+=-L$ORACLE_HOME/lib -lclntsh -lwtc9" oci.pro
    make
      

    For Oracle version 10, we assume that you installed the RPM packages of the Instant Client Package SDK (you need to adjust the version number accordingly):

    cd $QTDIR/plugins/src/sqldrivers/oci
    qmake -o Makefile "INCLUDEPATH+=/usr/include/oracle/10.1.0.3/client/" "LIBS+=-L/usr/lib/oracle/10.1.0.3/client/lib" oci.pro
    make
      

    Unfortunately, after installing the Oracle client I didn't have a /usr/include/oracle... And I didn't have a /usr/lib/oracle either. Nor did I see an include directory under where I installed the Oracle client (/opt/oracle). Before I ask Trolltech support what the appropriate paths should be I thought I'd ask you. Perhaps I have not properly installed a portion of Oracle...

August 29, 2007

Installing... err... I mean building Oracle

  • Started building cqtalk, a Perl process to interact with Clearquest
  • Spent time attempting to install/build Oracle client for Linux

Installing/Building Oracle

We have an application, ucmwb, which uses Oracle to talk directly to our Clearquest databases. This application runs on Solaris and hopefully soon Linux. In particular it talks to RANCQ on RANDBS. AFAICT RANDBS is an Oracle 9.2 server.

I would love to go to Oracle 10.x because with 10.x comes regexs and they would help ucmwb tremendously. However I can't get a 10.x client to talk to this 9.x server.

Working on the Solaris side for now, I can use the 9.2 version of sqlplus to connect to our RANCQ database:

Randws016:echo $ORACLE_HOME
/usr/local/oracle/product/9.2
Randws016:$ORACLE_HOME/bin/sqlplus RAN_WB/RAN_WB@RANCQ_RANDBS
SQL*Plus: Release 9.2.0.1.0 - Production on Wed Aug 29 14:46:53 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production

SQL>

but I cannot use the 10.2 version of sqlplus to connect to RANCQ:

Randws016:echo $ORACLE_HOME
/home/p6258c/Solaris/10.2.0.3/instantclient_10_2
Randws016:$ORACLE_HOME/sqlplus RAN_WB/RAN_WB@RANCQ_RANDBS
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Aug 29 14:48:21 2007

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

Enter user-name:

Will had stated that he thought that 10.2 clients could talk to 9.2 servers. Is that true? If so why can't I run sqlplus and connect to RANCQ?

August 28, 2007

backBench.pl

  • Added link and createWor to backBench.pl

August 24, 2007

UCMWB: rebase/deliver cancelled

  • UCMWB assumes rebases/deliveries are completed. If not it gets confused. Implemented a way for UCMWB to determine such situations.

August 23, 2007

UCMWB Assistant

  • Rebuilt Qt 4.2.2 for Solaris to test Assistant

August 21, 2007

ucmwb 1.2.3

  • Fixed all ucmwb issues except for the Linux port - still waiting for Oracle Client Libraries and SDK for Linux

UCMWB 1.2.3

I've fixed several issues with ucmwb and feel that it might be time to release a new ucmwb. This has caused me to look into how ucmwb works out in the wild.. From what I can tell there are the following "bits":

  • ucmwb is invoked via /usr/local/bin/ucmwb, which is a simple tcsh script that calls /prj/muosran/bin/ucmwb

     #! /usr/bin/tcsh
    
    /prj/muosran/bin/ucmwb&
    
    exit
  • /prj/muosran/bin/ucmwb is a symlink to
    /cleartrig/ent/SNSD/muos/ccadm_tools/vobs/ranccadm/devtools/ucmWorkbench/build/ucmwb

With the advent of ucmwb for Linux we need to change things so that the script at /usr/local/bin/ucmwb is smart enough to invoke the correct executable. First I propose that we name the executable as ucmwb.$(uname -s). Next we replace /usr/local/bin/ucmwb with the following script:

#!/usr/bin/env bash
dir=/prj/muosran/bin
arch=$(uname -s)
ucmwb=$dir/ucmwb.$arch

if [ -x $ucmwb ]; then
  exec $ucmwb $@
else
  echo "Unable to find ucmwb for $arch"
  exit 1
fi

The following tickets have been addressed in this release:

# ID Headline
1 RANCQ00014268 UCMWB Save Activity List improvements
2 RANCQ00014402 UCMWB should unset activity before deleting the view
3 RANCQ00013782 ucmwb defect - does not delete view when rebase pending
4 RANCQ00012828 Fix shared stream view creation from UCM Workbench.
5 RANCQ00011424 UCM Workbench doesn't create the correct stream for Target WORs
6 RANCQ00011414 UCMWB create view with common target dev WOR incorrectly creates new stream
7 RANCQ00010523 UCM Workbench - View Browser - Copy View Privates - Preserve Modification Times
8 RANCQ00013592 Execute 'cade' command when opening Unix prompt from WorkBench
9 RANCQ00010457 Suggestion to improve UCM workbench to help with Rebase activity
10 RANCQ00014267 UCMWB should save Clearquest password so it doesn't need to be constantly specified

Notes:

  1. RANCQ00014268: Only part of Save Activities is fixed. If the user cancels the dialog box it no longer complains about not being able to write to a file. The part about adding .html is more problematic than initially anticipated.
  2. RANCQ00013782: When deleting a view, stderr from the cleartool rmview is now displayed if there were any errors. This covers both the rebase problem and deliver problem...
  3. RANCQ00013592: Decided not to implement this
  4. RANCQ00010457: This would be better handled by Tom's rebase trigger.
  5. RANCQ00014267: Clearquest password is saved for the duration of the ucmwb session. Storing the Clearquest password in preferences might be a security concern.

August 17, 2007

ucmwb/Purify

  • Implemented several ucmwb fixes
  • Spoke with Chad regarding Purify issues

August 15, 2007

Shared Stream View Creation

  • Investigated problem with Shared Stream View Creation
  • Investigated problems with Purify. Seems we're getting a little versionist...

Shared Stream View Creation

Here in GD the process is very driven off of WOR (Work Order Request). There are Collector WORs and Worker WORs (basically parent and child records). Additionally any one of the Worker WORs can be designated as the common development WOR. This means that while views can be made for any Worker WORs, only the common development WOR will have a stream and all Worker WORs will share that stream, hence the "shared stream" portion of Shared Stream View Creation.

Now this is all handled by the createView.pl script that creates views and Clearquest, having a Create View action, calls createView.pl properly when there is a hierarchy of WORs. But ucmwb does not sense this and thus, while it calls createView.pl for view creation, it fails to specify the "Target WOR" (AKA common development WOR).

August 14, 2007

ucmwb/Qt and other issues

  • Working with Anne Tsirfa of Trolltech and Troltech support
  • Working with Kevin Landers regarding ucmwb
  • Managed to implement fix to helpdesk ticket involving setting access/modify times on view private files copied outside of a view by ucmwb
  • Looked into issue with RoseRT versions selected as per switchConf.pl
  • Resolved ucmwb not displaying icons helpdesk ticket

August 8, 2007

ucmwb issues/Purify

  • Working with Kevin and others to resolve Qt issues.
  • Submitted PMR with IBM regarding usage of Purify and why it's taking so long to run

ucmwb issues

There are a number of issues WRT ucmwb running on Linux:

  • Whether to build 32-bit or 64-bit. 32-bit would be LCD yet I don't have a 32-bit Linux machine to build on
  • Differences in architectures (i.e. Intel vs. Opteron). I've seen differences WRT this...
  • Whether to build static or shared. Static would be better because then we wouldn't have to worry about getting the right shared libraries and the correct LD_LIBRARY_PATH setting
  • Connection to Oracle. In order for ucmwb to connect to Oracle directly it needs OCI. In order to have OCI one needs the commercial version of Qt. Got that. But also we need an Oracle Client (Development?) Installation in order to have the appropriate .h and .a files to build. With Oracle on Linux (which doesn't exist) we also need to address the appropriate 64 vs 32 bit'ness, Intel vs. Opteron, static vs. shared WRT Oracle itself...

Purify

Only a little is known at this time but it seems some development group is concerned because running Purify on 7500 had not finished in 10 days of running. Opened IBM/Rational PMR on this. IBM/Rational tells me that using Purify can slow the process by 15-20 times! Makes sense since the instrumented code is doing so much additional work. Need to find out how long the tests would take sans Purify

August 7, 2007

QT

  • Built ucmwb on Solaris
  • Downloaded, built and installed Qt-4.2.2 for Linux
  • Built ucmwb for Linux 64 bit! Doesn't connect to Clearquest properly yet

August 3, 2007

ssh

  • Helped Aaron with ssh

Adding ssh actions to CDE

Secure SHell or ssh is a more modern and secure way to access a remote system. You can add ssh actions to CDE by doing the following:

Add the following to ~/.dt/types:

ACTION Ssh
{
  LABEL           Secure shell
  ICON            Dtterm
  ARG_COUNT       0
  TYPE            COMMAND
  WINDOW_TYPE     NO_STDIO
  EXEC_STRING     ksh -c 'export _title="%"Starbase?"%";	  \
    /usr/dt/bin/dtterm -name $_title                              \
    -title "Opening hailing frequencies to starbase $_title..."   \
    -e ksh -c "ssh $_title; sleep 5;";'
  DESCRIPTION     The Secure shell action prompts the user for    \
                  the name of a system, opens a dtterm terminal   \
                  emulator window, and then performs an ssh to    \
                  that system.
}

ACTION SshUser
{
  LABEL           Secure shell
  ICON            Dtterm
  ARG_COUNT       0
  TYPE            COMMAND
  WINDOW_TYPE     NO_STDIO
  EXEC_STRING     ksh -c 'export _title="%"Starbase?"%";          \
    export _user="%"Username"%";                                  \
    /usr/dt/bin/dtterm -name $_title                              \
    -title                                                        \
      "Opening hailing frequencies to starbase $_user@$_title..." \
    -e ksh -c "ssh $_user@$_title; sleep 5;";'
  DESCRIPTION     The Secure shell action prompts the user for    \
                  the name of a system and a username and opens   \
                  a dtterm terminal emulator window, and then     \
                  performs an ssh to that system.
}

Then invoke the actions with:

$ dtaction Ssh
$ dtaction SshUser

or better yet put it into your Dtwm menus like:

    Menu Terminals
    {
      "Terminals"           f.title
      "Terminal"            f.action Dtterm
      "Remote Terminal"     f.action Ssh
      "Remote Terminal (user)"      f.action SshUser
      "X Terminal"          f.action Xterm
    }

Configuring ssh for passwordless but secure public key authentication

In order to do public key authentication you need to first generate a public key. You do this for ssh with ssh-keygen:

$ ssh-keygen -t rsa

Note you can also do -t dsa. There are RSA keys and DSA keys. I forget what the prompts are, something about a passphrase, etc. Enter no passphrase.

This should create a directory ~/.ssh with files in it. For example:

$ ssh-keygen -t rsa
Enter file in which to save the key(/home/p6258c/.ssh/id_rsa):
Generating public/private rsa key pair.
Enter passphrase(empty for no passphrase): 
$ ls -l ~/.ssh
total 32
-rw-------    1 p6258c   ccusers       226 Jun 15 13:28 authorized_keys
-rw-------    1 p6258c   ccusers       887 Jun 15 13:27 id_rsa
-rw-rw-r--    1 p6258c   ccusers       226 Jun 15 13:27 id_rsa.pub
-rw-r--r--    1 p6258c   ccusers      4082 Jul 31 15:05 known_hosts
$ ls -ld .
drwxr-xr-x   43 p6258c   ccusers      2048 Aug  3 10:28 ./
$

Then the task is to get the ~/.ssh/id_rsa.pub key added to the authorized_keys file (creating it if you need to). Here in GD that is easy. Siimply:

$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

Now, since all GD machines in the RAN subnet share your same home directory (automounted from the same common location) viola! You now have passwordless ssh access using public key authentication through the RAN (note this does not cross from RAN -> GD network due to firewall issues). Whenever you ssh to a new machine it will bother you about adding it to the known_hosts file but after that it should not prompt again.

Also note that if this were a different situation you'd have to get the contents of ~/.ssh/id_rsa.pub over to the remote machine. For example, I could generate my keys as described above then email the ~/.ssh/id_rsa.pub from here to my home Linux system, append it to my ~/.ssh/authorized_keys on my home Linux system then I could ssh from here to home. Normally I configure my house to only allow public key authenticated logins from the outside world. I can't do it here from GD because the firewall prohibits it (which is odd)!

Final note: Sometimes, if ssh is configured to by strict about permissions, you need to change your home directory to be 755 as shown above. Normally I'm a sharing kinda guy so I have my home directory set to 775 but with ssh strict permissions that'll cause passwordless ssh to not work anymore.

August 1, 2007

ranlin0[2|3] released

  • After resolving issue with cleartrig and fonts, released ranlin0[2|3] to production

New Linux workstations ranlin02 & 03 now ready

The new Linux workstations ranlin02 and ranlin03 are now ready for use. Clearcase and Clearquest have been installed on them and they have been properly configured into the RAN network.

There is a slight issue regarding problems with Clearquest and clearprompt (a dialog box tool used by our tools) and fonts. Sometimes this leads to dialog boxes that lack any text due to font rendering problems.

A fix had been implemented. For users who will be using these new Linux boxes (especially if they use Solaris desktops, will be remotely logging into these Linux boxes and displaying things back to their Solaris boxes running CDE) simply add the following "source" to their ~/.cshrc:

#ident  "@(#)local.cshrc        1.2     00/05/01 SMI"
umask 002
set path=(/bin /usr/bin /usr/ucb /etc /usr/sbin /usr/atria/etc
/usr/atria/bin /usr/openwin/bin /usr/dt/bin /usr/local/bin
/opt/hpnpl/bin .)
if ( $?prompt ) then
   set history=64              # previous commands to remember.
   set savehist=64             # number to save across sessions.
   setenv system `hostname`     # set hostname
   set prompt="[$system`pwd`] " # set prompt
   alias       cd      'cd \!*; set prompt="[$system`pwd`] "'
endif
alias ct /usr/atria/bin/cleartool
alias ll 'ls -l'
alias la 'ls -a'
alias cdd 'cd ..'
alias cddd 'cd ../..'
#alias shello /vobs/cello/civ/test_utilities/scripts/shello
source /prj/muosran/config/.cshrc.muosran
source /prj/muosran/config/.cshrc.linux