Clearcase server move with IP change - Clearcase client views with fix IP

73 Views Asked by At

The ClearCase server was moved to another building, host name the same, IP changed. Also, the ClearCase client was moved, host name the same, new IP.

The problem is now that some of the views cannot find the ClearCase server, because the views have the old IP in the file .view, not the host name of the server.

How can this be fixed?

Note: I tried and changed the old IP in the view file to the host name: no success.

2

There are 2 best solutions below

7
VonC On

Changed the old IP in the view file to the host name, no success

But did you reboot, or at least restart ClearCase? (net stop albd on Windows, /etc/init.d/atria stop on Linux)

Check if updating vob/view tags is enough (validate that you can access NEW_HOST_PATH with a simple dir/ls):

cleartool mktag -vob -replace -host NEW_HOSTNAME -hpath NEW_HOST_PATH -gpath NEW_GLOBAL_PATH VOB_TAG_NAME
cleartool mktag -view -replace -host NEW_HOSTNAME -hpath NEW_HOST_PATH -gpath NEW_GLOBAL_PATH VIEW_TAG_NAME

But generally, official procedures like "Moving a view to a host with a different architecture" would require cleartool rmtag –view –all + cleartool unregister –view for all views, before registering them and tagging them again.

Those commands are run on the ClearCase server, with:

  • NEW_HOSTNAME refers to the hostname of the system where the VOB or view storage is located. That is generally the ClearCase server's hostname.
  • NEW_HOST_PATH refers to the location of the VOB or view storage on the host system. That would be the path on the ClearCase server where the VOB or view storage resides.
    For example, if your VOB storage is located at /net/storage/vobs/myvob.vbs on the server, then NEW_HOST_PATH would be /net/storage/vobs/myvob.vbs.
  • NEW_GLOBAL_PATH refers to the network-accessible location of the VOB or view storage, which can be accessed from any client machine. It might be a UNC path (for Windows) or an NFS path (for Unix) that points to the VOB or view storage location on the server.
    For instance, if clients access the VOB storage using a network path like \\server_name\net\storage\vobs\myvob.vbs, then NEW_GLOBAL_PATH would be \\server_name\net\storage\vobs\myvob.vbs.
  • VOB_TAG_NAME and VIEW_TAG_NAME refer to the tag names associated with your VOB and view respectively. Tags are aliases that are used to reference the VOBs and views in ClearCase commands.

Example

cleartool mktag -vob -replace -host server_name -hpath /net/storage/vobs/myvob.vbs -gpath \\server_name\net\storage\vobs\myvob.vbs myvob_tag

cleartool mktag -view -replace -host server_name -hpath /net/storage/views/myview.vws -gpath \\server_name\net\storage\views\myview.vws myview_tag

Where:

  • server_name is the hostname of the ClearCase server.
  • /net/storage/vobs/myvob.vbs and /net/storage/views/myview.vws are the host paths to the VOB and view storages on the server.
  • \\server_name\net\storage\vobs\myvob.vbs and \\server_name\net\storage\views\myview.vws are the global paths accessible from the client machines.
  • myvob_tag and myview_tag are the VOB and view tag names respectively.

The OP Tom Rossi adds in the comments:

To connect the CC server is not the problem, only IP changed the name is still the same.
One of the users create manually a snap view and entered the IP of the client, not the hostname of the client.

We have 1 client with the Jenkins plug in, on this client the IP changed, and on this client there are some views which points to the old client IP.

for /f %%x in ('hostname') do 
   set HOSTNAME=%%x 
   for /d %%x in (.vws) do 
      cleartool register -replace -view %%x 
   for /d %%x in (.vbs) do cleartool mktag -view -replace -tag %%~nx \\%HOSTNAME%\viewshare\%%x
6
Brian Cowan On

How many hosts are there in this environment? What I've done in the past when I moved VOBs wholesale (or had my registry get "lost" during a "clean" CC install or reinstall) was run a short script like this:

Command Prompt version while in parent directory of .vbs directories:

for /f %%x in ('hostname') do set HOSTNAME=%%x
for /d %%x in (*.vbs) do cleartool register -replace -vob %%x
for /d %%x in (*.vbs) do cleartool mktag -vob -replace -tag \%%~nx \\%HOSTNAME%\vobshare\%%x

For public VOBs, add -public -password {registry password} before the \%HOSTNAME...

Command prompt version while in parent directory of vws directories:

for /f %%x in ('hostname') do set HOSTNAME=%%x
for /d %%x in (*.vws) do cleartool register -replace -view %%x
for /d %%x in (*.vbs) do cleartool mktag -view -replace -tag %%~nx \\%HOSTNAME%\viewshare\%%x

This assumes that the server host can talk to the registry server. You may need to confirm the registry server address in the CC control panel before doing it. You will want to SHIFT-RIGHT-CLICK on the control panel applet and select "run as administrator" if you want to be able to make changes that "stick."

Since you're ALSO not getting license errors, that issue was at least straightened out beforehand.

Reregistering and retagging the views will update the .view files.