Friday, October 24, 2008

Rebase Cannot be Cancelled

A developer got some problem with a rebase operation. After messing around, she ended up manually checked in all the versions in the rebase change set, only to find out later that the rebase could not be cancelled nor resumed. Okay, it was time to call ClearCase admin for help.

$ cleartool rebase -status -stream RP_WT_VER5.10@/vobs/Horizon_PVOB
cleartool: Error: The ClearCase version used to start the rebase operation in progress does not match the current version.
cleartool: Error: Unable to restore operation.
cleartool: Error: Unable to restore from pvar.

The activity contains an empty change set. But it cannot be removed.
$ cleartool rmact rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB
Remove activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB"? [no] y
cleartool: Error: Activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB" is set in view "".
cleartool: Error: Unable to remove activity r
ebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB.

C:\Li\tmp>cleartool setact -view RP_WT_VER5.10_DDV -none
cleartool: Error: View "RP_WT_VER5.10_DDV" is set activity to activity"rebase.RP_WT_VER5.10.20081022.172717" which is currently involved in anactive deliver or rebase operation. The set activity of this view may not bechanged until the operation has completed.
cleartool: Error: Unable to unset activity in view RP_WT_VER5.10_DDV.

$ cleartool dump stream:RP_WT_VER5.10@/vobs/Horizon_PVOB

RP_WT_VER5.10
oid=31df728b.324a44c0.a5b2.70:02:42:d0:06:dc dbid=74825 (0x12449)
mtype=activity name="RP_WT_VER5.10" type=85
usid=UNIX:UID-9150 gsid=UNIX:GID-8025
...
work items:
user=106 view=ff390327.2f8d4680.83d0.ac:04:d8:db:0a:08
user=106 view=65e7f7b0.fb494922.88bf.18:08:1c:40:01:26
user=106 view=cddce13f.ac9d41cf.acb4.0d:cd:f0:f5:e1:93
user=106 view=5ef30ee5.538b462b.9fa1.b7:6a:4f:41:5c:eb
user=106 view=8ebe7608.b1214e8f.9039.07:18:5c:ba:26:3e
user=106 view=e1e56bc4.5942465f.81a5.f5:80:cd:d0:74:51
user=106 view=5d0175d3.1c984f7e.940c.8a:49:cc:18:c4:21
Process variables:
name=SUM_CSPEC_ID value=0:5
name=UCM_STREAM_RECBLS value=oid:c328a47b.c0694013.b050.70:ec:52:d0:57:7a@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5oid:9c091eb4.c51b4791.a11a.a2:7e:5b:5b:ba:b8@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5oid:3546cb0f.09254d4f.bf59.0d:b7:cb:41:78:39@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5oid:42fc12cb.d1cf4666.9670.48:f1:02:dd:15:5b@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5
name=UCM_REBASE value=ver=3
owner=dantchev
start=1224710837
act=oid:e1d5538e.b9224182.913d.d7:93:21:a0:b0:4c@vobuuid:fc0b3963.655011dc.84f7.00:01:83:31:69:b5
view=ff390327.2f8d4680.83d0.ac:04:d8:db:0a:08
state=reprocess_merging
csid=kind:UCM.Stream

...

$ /opt/rational/clearcase/etc/utils/ucmutil
ucmutil> setpvar -pvar UCM_REBASE -none
stream:RP_WT_VER5.10@/vobs/Horizon_PVOB
You are about to modify internal data. Any mistake will damage the objects.
Do you want to continue? [no] y
Set UCM_REBASE = "" [cleared]

The rebase operation is cancelled and the stream is back to normal.
C:\Li\tmp>cleartool rebase -status -stream RP_WT_VER5.10@\Horizon_PVOB
No rebase in progress for stream "RP_WT_VER5.10".

But the activity is still at a intermediate status. It cannot be unset nor deleted.
% cleartool rmact rebase.RP_WT_VER5.10.20081022.17271
Remove activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB"? [no] y
cleartool: Error: Activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB" is set in view "".
cleartool: Error: Unable to remove activity rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB.


C:\Li\tmp>cleartool setact -view RP_WT_VER5.10_DDV -none
cleartool: Error: View "RP_WT_VER5.10_DDV" is set activity to activity
"rebase.RP_WT_VER5.10.20081022.172717" which is currently involved in an
active deliver or rebase operation. The set activity of this view may not be
changed until the operation has completed.
cleartool: Error: Unable to unset activity in view RP_WT_VER5.10_DDV.

One more variable to go.
% cleartool dump activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB

rebase.RP_WT_VER5.10.20081022.172717
oid=e1d5538e.b9224182.913d.d7:93:21:a0:b0:4c dbid=88924 (0x15b5c)
mtype=activity name="rebase.RP_WT_VER5.10.20081022.172717" type=73
usid=UNIX:UID-9150 gsid=UNIX:GID-8025
master replica dbid=3
title="rebase RP_WT_VER5.10 on 10/22/2008 05:27:17 PM."
process definition uuid=fc0b3a7f.655011dc.84f7.00:01:83:31:69:b5
state dbid=64
role dbid=52
user dbids: 105
view=""
planned effort=0.00
actual start=10/22/08 17:22:21
priority=50
dtsm=1224710541
mod count=0
flags=0x4, Setwork
parent dbid=74832
work items:
user=105 view=ff390327.2f8d4680.83d0.ac:04:d8:db:0a:08
Process variables:
name=UCM_INTEGRATION_ACTIVITY value=ver=1
state=1

ucmutil> setpvar -pvar UCM_INTEGRATION_ACTIVITY -none activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB
You are about to modify internal data. Any mistake will damage the objects.
Do you want to continue? [no] y
Set UCM_INTEGRATION_ACTIVITY = "" [cleared]

C:\Li\tmp>cleartool setact -view RP_WT_VER5.10_DDV -none
Cleared current activity from view RP_WT_VER5.10_DDV.

% cleartool rmact rebase.RP_WT_VER5.10.20081022.172717
Remove activity "activity:rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB"? [no] y
Removed activity "rebase.RP_WT_VER5.10.20081022.172717@/vobs/Horizon_PVOB".

Everything is back to normal.