1

Context

Within the context of Continuous Integration with Jenkins, I changed the location of my jobs from D:\workspace to D:\. The problem is that I missed to accordingly move the ClearCase views from D:\workspace\JOB_NAME\view to D:\JOB_NAME\view.

Since the view tags of my jobs are represented by Jenkins_${NODE_NAME}_${JOB_NAME}${DASH_WORKSPACE_NUMBER}, Jenkins reacted by creating a duplicate for each of my views:

  • D:\ClearCaseStorage\Views\COMPANY\user\Jenkins_Node1_JobName.vws
  • (no tag)
  • D:\ClearCaseStorage\Views\COMPANY\user\Jenkins_Node1_JobName.1.vws
  • (Jenkins_Node1_JobName).

Everything still works, but I now have many untagged views that pollute the server. Indeed, each view "stole" the view tag from its previous view. I want to remove these ghost views.

Problem

I can't remove an untagged view from the administration console. It says:

This operation requires a view tag.

This operation requires a view tag

I wish I could display the view information in order to get its uuid and then delete it but untagged views don't appear in the view list: cleartool lsview -long.

Questions

  • Is there a way I can delete these views myself without alerting the ClearCase server administrator? If no, how can the administrator delete these views?
  • In order to avoid this behavior to happen again, should I remove ${DASH_WORKSPACE_NUMBER} from the view tag of my jobs?

${DASH_WORKSPACE_NUMBER} is replaced by the number of the workspace if it isn't the primary workspace on the node. This allows to execute several concurrent builds of the same job on the same node.

Stéphane Bruckert
  • 21,706
  • 14
  • 92
  • 130
  • can you see view info, including uuid, with `cleartool desc -l vob: | grep "view_name"`? – eis Aug 05 '13 at 09:48
  • I am under Windows... – Stéphane Bruckert Aug 05 '13 at 09:49
  • grep is just for extracting the information, nothing prevents using windows methods for that instead. windows has "find", and you can install grep there, too. But you should be able to see the information even without it, see my answer. – eis Aug 05 '13 at 09:54

2 Answers2

1

If you have still access to the previous snapshot views root directory (like D:\workspace\JOB_NAME\view), the view.dat file will give you the view uid.

That is enough for you to unregister the view, and remove its former tag.

See "How to delete ClearCase views created by other users?" (or "Delete ClearCase Views Script).

cleartool rmtag -view theViewToRemove
cleartool unregister -view -uuid uuid_of_viewToRemove
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Great, it works! But unfortunately, there are some views for which I lost the `view.dat` file... In fact, it is not the first time that I have this issue. – Stéphane Bruckert Aug 05 '13 at 10:30
  • @StéphaneBruckert do you still have access to their view storage? (like `D:\ClearCaseStorage\Views\COMPANY\user\Jenkins_Slave1_JobName.vws`). You should find a file including the view uid there as well. – VonC Aug 05 '13 at 10:35
  • @StéphaneBruckert more specifically, the (`/.../myview.vws/`) **`.view` file** will contain the view uuid. – VonC Aug 05 '13 at 10:40
  • I don't personally have an access to the view storage, but I will now let the admin do that. At least, I have cleaned the most part of the untagged views by myself and that will always be useful in the future. I assume there is no way to remove the views without `view.dat` file without accessing the server, so it looks like my problem couldn't be better solved. Thank you @VonC! – Stéphane Bruckert Aug 05 '13 at 10:57
0

From this thread:

First figure out the UUID of the view by running:

% cleartool describe -long vob:vobtag
versioned object base "vobtag"
created 31-Dec-00.16:23:00 by ClearCase VOB admin account
(vobadm.staff)
VOB family feature level: 2
VOB storage hostathname "someplace"
VOB storage global pathname "someplace"
database schema version: 53
VOB ownership:
owner someone
group some group
Additional groups:
...
VOB holds objects from the following views:
? uuid c00c3821.f94411d4.ba94.00:01:80:a9:33:fe
...

You then can remove all the references to the non-existing view by running:

% cleartool rmview -force -avobs -uuid
c00c3821.f94411d4.ba94.00:01:80:a9:33:fe
Removing references ...
eis
  • 51,991
  • 13
  • 150
  • 199