Migrating colocated views from 6.0 -> 7.0

I performed a test of my snapshot view p6258c_SIMCQ00000392_intview. This view is a colocated view and exists in my home directory (~p6258c). Clearcase administration of the registry can be tricky - you need to get several things correct before it will work.

Here's what the view looks like:

$ ct lsview -l -full -properties
p6258c_SIMCQ00000392_intview 
  Tag: p6258c_SIMCQ00000392_intview
   Global path: /net/cclinux/export/home/p6258c/p6258c_SIMCQ00000392_intview/.view.stg
   Server host: seast1
   Region: cclinux
   Active: NO
   View tag uuid:90c8b0d3.d9c311dc.92fe.00:09:3d:14:f4:70
  View on host: seast1
  View server access path: /home/p6258c/p6258c_SIMCQ00000392_intview/.view.stg
  View uuid: 90c8b0d3.d9c311dc.92fe.00:09:3d:14:f4:70
  View attributes: snapshot,ucmview
  View owner: rantest/p6258c

  Created 2008-02-12T16:31:00-07 by p6258c.cclinux@ranlin04
  Last modified 2008-03-28T13:53:02-07 by p6258c.cclinux@raneast
  Last accessed 2008-03-28T13:53:02-07 by p6258c.cclinux@raneast
  Last read of private data 2008-03-28T13:53:02-07 by
p6258c.cclinux@raneast
  Last config spec update 2008-03-28T13:22:18-07 by
p6258c.cclinux@raneast
  Last view private object update 2008-03-28T13:53:02-07 by
p6258c.cclinux@raneastText mode: unix
  Properties: snapshot ucmview readwrite
  Owner: rantest/p6258c : rwx (all)
  Group: rantest/cclinux : r-x (read)
  Other: : r-x (read)
  Additional groups: rantest/east

Here's what I did

  • cd'ed into this snapshot view ~p6258c/p6258c_SIMCQ00000392_intview/vobs/simdev/bin
  • Checked out a script named east.
  • cd'ed out of the snapshot view to my home directory.

We now have a colocated snapshot view created on CC 6.0 and hosted by seast1. The storage (my home directory) oddly enough is served by cclinux...

  • Moved the view database over to cclinux under it's gdviews partition:
    Cclinux:mv /home/p6258c/p6258c_SIMCQ00000392_intview/.view.stg \
    > /gdviews/p6258c/p6258c_SIMCQ00000392_intview.vws
    
    Note:
    • In the above command we also renamed .view.stg -> <viewname>.vws.
    • We did a mv instead of cp. I suspect that if you are in the snapshot view storage area and you perform a Clearcase operation, cleartool will notice the .view.stg directory at the snapshot view's root and not bother to attempt to contact the registry server to find out where the view database is. Instead it just says "Well the view database is right here". This would allow a disconnected, but colocated snapshot view to be able to perform Clearcase operations while disconnected.
  • Reregistered the view:
    Cclinux:ct register -view -replace -host cclinux \
    > -hpath /gdviews/p6258c/p6258c_SIMCQ00000392.vws \
    > /net/cclinux/gdviews/p6258c/p6258c_SIMCQ00000392.vws
    
    Note:
    • The -host changed from seast1 -> cclinux
    • The -hpath changed to be relative to /gdviews (where we moved the .view.stg)
  • Retaged the view:
  • Cclinux:ct mktag -replace -view -tag p6258c_SIMCQ00000392_intview \
    > -host cclinux \
    > -gpath /net/cclinux/gdviews/p6258c/p6258c_SIMCQ00000392_intview.vws \
    > /net/cclinux/gdviews/p6258c/p6258c_SIMCQ00000392_intview.vws
    
    Note:
    • Again the -host changed from seast1 -> cclinux
    • The -gpath changed to a global path to /gdviews

  • Stop the view server:
  • Cclinux:ct endview -server p6258c_SIMCQ00000392_intview
    
  • Set the config spec to current since the compiled config spec still thinks it's on the old server. Note this will involve a ct update too. Also, we need to cd to the snapshot view storage area:
  • Cclinux:cd ~/p6258c_SIMCQ00000392_intview
    Cclinux:ct setcs -current > /dev/null 2>&1
    

Now we have the following view:

$ ct lsview -l -full -properties p6258c_SIMCQ00000392_intview
  Tag: p6258c_SIMCQ00000392_intview
   Global path: /net/cclinux/gdviews/p6258c/p6258c_SIMCQ00000392_intview.vws
   Server host: cclinux
   Region: cclinux
   Active: NO
   View tag uuid:90c8b0d3.d9c311dc.92fe.00:09:3d:14:f4:70
  View on host: cclinux
  View server access path:
/gdviews/p6258c/p6258c_SIMCQ00000392_intview.vws
  View uuid: 90c8b0d3.d9c311dc.92fe.00:09:3d:14:f4:70
  View attributes: snapshot,ucmview
  View owner: rantest/p6258c

  Created 2008-02-12T16:31:00-07 by p6258c.cclinux@ranlin04
  Last modified 2008-03-28T14:32:44-07 by p6258c.cclinux@ranlin04
  Last accessed 2008-03-28T14:32:44-07 by p6258c.cclinux@ranlin04
  Last read of private data 2008-03-28T14:32:44-07 by
p6258c.cclinux@ranlin04
  Last config spec update 2008-03-28T14:32:42-07 by
p6258c.cclinux@ranlin04
  Last view private object update 2008-03-28T14:32:44-07 by
p6258c.cclinux@ranlin04
  Text mode: unix
  Properties: snapshot ucmview readwrite
  Owner: rantest/p6258c : rwx (all)
  Group: rantest/cclinux : r-x (read)
  Other: : r-x (read)
  Additional groups: rantest/east

Which is clearly on cclinux now.

Further, we can see that east is still checked out, we can modify it and even unco thus showing that our newly relocated snapshot view on cclinux works, from seast1, like it did before:

[p6258c@seast1 p6258c]$ cd p6258c_SIMCQ00000392_intview/vobs/simdev/bin
[p6258c@seast1 bin]$ ct ls east
  east@@/main/simdev_integration/east_scripts_build1_integration/CHECKEDOUT from
/main/simdev_integration/east_scripts_build1_integration/0               Rule: CHECKEDOUT
  [p6258c@seast1 bin]$ echo "A change" >> east
  [p6258c@seast1 bin]$ ct unco east
  Save private copy of "east"?  [yes]
  Private version of "east" saved in "east.keep".
  Loading "vobs/simdev/bin/east" (353 bytes).
  ClearTrigger removing empty branch
"/home/p6258c/p6258c_SIMCQ00000392_intview/vobs/simdev/bin/east@@/main/simdev_integration/east_scripts_build1_integration"...Updating
web view with
(/home/p6258c/p6258c_SIMCQ00000392_intview/vobs/simdev/bin/east)...
  Loading "vobs/simdev/bin/east" (353 bytes).
  Done loading "/vobs/simdev/bin/east" (1 objects, copied 0 KB).
  Checkout cancelled for "east".
  [p6258c@seast1 bin]$

It would not be that difficult to cook up a script to migrate all snapshot views...