Tuesday, October 16, 2007

Base to UCM - creating component problem

In one of the VOBs, I got problem creating components.

M:\qinl_base> cd MidTier
M:\qinl_base\MidTier>cleartool mkcomp -root HostInt MidTier_HostInt@\CBFEProjects
Processing subdirectory elements...
Done processing subdirectory elements.
Created component "MidTier_HostInt".

M:\qinl_base\MidTier>cleartool mkcomp -root Srv MidTier_Srv@\CBFEProjects
Processing subdirectory elements...
cleartool: Error: Element "M:\qinl_base\MidTier\HostInt\docs\schema\base24es\IFX.xsd@@" is a member of another component.
cleartool: Error: Unable to create component.

This is a known issue when converting Base ClearCase to UCM. If some of the elements have been moving between two future component directories, UCM gets confused and cannot convert the second component. There are no solutions to the issue. To workaround the problem, you can either:

1. rmelem the elements and lose the histories.

2. convert to component at the VOB level, instead of the top directory level.
cleartool mkcomp -root . MidTier@\CBFEProjects

3. find out all the directory versions that reference to the element in the second component. rmver all the versions, so the reference to the elements is no longer there.

4. instead of converting, create new CVOBs, do clearexport_ccase/clearimport. By doing export, the history versions of directories are lost. This can workaround the mkcomp issue. and it can be good or bad depends on whether you want to shrink the size of the VOB or want the whole history.

How to delete ^M at the end of line in UNIX

Saw this in another post. It is useful and easy to do.

^M is DOS line break character which shows up in UNIX files when uploaded from a windows file system in ascii format.

To remove this, open your file in vi editor and type

:%s/(ctrl-v)(ctrl-m)//g

and press Enter key.

Important!! - press (Ctrl-v) (Ctrl-m) combination to enter ^M character, dont use “^” and M.

cleartool error: Not a vob object when recommending a baseline

When creating a baseline for a stream, it reported the following error message and failed. The cause is that the recommend baseline is removed and the stream cannot find it.

M:\qinl_NewMainline_int>cleartool chstream -rec NewMainline_10_12_2007.1228 NewMainline_i@\CBFEProjects
cleartool: Error: Not a vob object: "291fb10e.71e711dc.8fad.00:01:83:f9:3b:ad".
cleartool: Error: Unable to get current recommended foundation for stream "NewMainline_i".
cleartool: Error: Unable to set the recommended baselines for stream "NewMainline_i".
cleartool: Error: Unable to change all streams.


Solution. un-recommend baseline in the stream, and recommend a good baseline.

M:\qinl_NewMainline_int>cleartool chstream -nrec NewMainline_i@\CBFEProjects
Changed stream "NewMainline_i@\CBFEProjects".

M:\qinl_NewMainline_int>cleartool chstream -rec NewMainline_10_12_2007.1228 NewMainline_i@\CBFEProjects
Changed stream "NewMainline_i@\CBFEProjects".

fetch cleartext error - No permission match

After restore VOBs to another ClearCase server, some VOBs reported the following error message when trying to access (read) the contents.
...
fetch cleartext view=BUILD_CBFE13.3_d vob=/vobs/MidTier dbid=0x16f - No permission match
fetch cleartext view=BUILD_CBFE13.3_d vob=/vobs/MidTier dbid=0x173 - No permission match
fetch cleartext view=BUILD_CBFE13.3_d vob=/vobs/MidTier dbid=0xdf - No permissi match
...

A "cleartool desc" command found out that the original additional group cbfedev disappeared. To add the additional group, "cleartool protectvob -add_group" command ran without error. However the result showed that the additional group was not added to the VOB.

Solution.

$ cd /ccstorage/vobs/MidTier.vob
$ cd .identity
$ ls
gid group.500 uid
$ rm group.500
rm: group.500: override protection 410 (yes/no)? y
$ cleartool protectvob -add cbfedev /vobs/MidTier


Run "cleartool desc" again, the result showed that the group had been added to the VOB. And the fetch cleartext error was gone as well.

$ cleartool desc -l vob:/vobs/MidTier
...
VOB ownership:
owner cbfedev.cibc.com/ccadmin
group cbfedev.cibc.com/clearcase_cbfe
Additional groups:
group cbfedev.cibc.com/cbfedev
...