Home
Command  Home
Scalable Graphic

Soft - is your software and documentation
Asset - is something that must be protected
Management - is what we do
Enterprise - is the capability
Computing - is the power
Services - are what we provide


   

A.    This command transfers the mastership of one or more objects from one replica to another. Only the current replica is affected immediately; other replicas are notified of the mastership transfers through the normal exchange of update packets.To limit use of this command to a certain set of users, you can create triggers.


B.      Specifying a view context

The chmaster command requires a view context. If you are not in a set view or working directory view on Linux® and the UNIX system or in a view drive on Windows, you can specify a view on the command line, as shown in the following table. If you specify a dynamic view, it must be active on your host.

Note: A view you specify in the chmaster command takes precedence over your current set view, working directory view, or view drive.

ArgumentHow to specify a view

object-selector brtype-selector Use a view-extended pathname as the vob-selector portion of the argument.

For example:

lbtype:LABEL1@/view/jtg/vobs/samecs
brtype:v1.0_bugfix@/view/jtg/vobs/samecs
lbtype:LABEL1@s:\samecs
brtype:v1.0_bugfix@s:\devbranch-pname element-pname Specify branch-pname or element-pname as a view-extended pathname. For example:

/view/jtg/vobs/samecs/cmd.c@@
/view/jtg/vobs/samecs/cmd.c@@/main
s:\dev\cmd.c@@
s:\dev\cmd.c@@\main master-replica-selector (for the chmaster–all variant)

Use the –view option or use a view-extended pathname as the vob-selector portion of the argument.

 For example:

–view jtg replica:sydney@\samecs
replica:sydney@/view/jtg/vobs/samecs
replica:sydney@s:\samecs


C.    Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: –cqe). See the comments reference page.


D.    Restrictions

Identities: For all UCM objects except baselines, no special identity is required. For baselines and all non-UCM objects, you must have one of the following identities:

Object creator (except for replicas)

Object owner (except for replicas)

VOB owner

root (Linux and the UNIX system)

Member of the ClearCase administrators group (Windows)

Locks: Restrictions depend on the kind of object:

Object whose mastership is changing Locks on these objects cause the chmaster command to failElementElement, element type, VOBBranchBranch, branch type, VOBType objectType object, VOBHyperlinkHyperlink type, VOBBaselineBaseline, VOB, replica, components associated with the baselineStreamStream, activityComponentComponent, VOB, replicaMastership: Your current replica must master the object. Using both –all and –obsolete_replica overrides this restriction, but you must not use the –obsolete_replica option except in special circumstances. (See the description of the –all option.)

Other:

You cannot transfer mastership of a branch if either of these conditions exist:

There are reserved checkouts on that branch.

There are unreserved checkouts on that branch made without the –nmaster option.


E.    If branch-or-element-pname has the form of an object selector, you must include the –pname option to indicate that pname is a pathname.


F.    Transfers mastership of all objects in the replica specified with old-replica-selector to the master-replioca-selector


G.    Attempts to transfer mastership of objects whose mastership was not transferred during the original invocation of the command


H.    Lists the objects whose mastership is changing.


I.      master-replica-selector in the format:

[replica:]replica-name[@vob-selector]

Notes:

1. If you do not specify a vob-selector uses the current VOB

2. replica-name = the name of the replica display with lsreplica

3. vob-selector (VOB family of the replica: can be omitted if the current working directory is within the VOB. Specify vob-selector in the form [vob:]pname-in-vob where pname-in-vob (Pathname of the VOB tag (whether or not the VOB is mounted) or of any file system object with the VOB (if the VOB is mounted)


J.     Uses the specified view as the view  context.


K.    master-replica-selector in the format:

[replica:]replica-name[@vob-selector]

Notes:

1. If you do not specify a vob-selector uses the current VOB

2. replica-name = the name of the replica display with lsreplica

3. vob-selector (VOB family of the replica: can be omitted if the current working directory is within the VOB. Specify vob-selector in the form [vob:]pname-in-vob where pname-in-vob (Pathname of the VOB tag (whether or not the VOB is mounted) or of any file system object with the VOB (if the VOB is mounted)


L.     attribute-type-selector

[attype:]type-name[@vob-selector]

branch-type-selector

[brtype:]type-name[@vob-selector]

element-type-selector

[eltype:]type-name[@vob-selector]

hyperlink-type-selector

[hltype:]type-name[@vob-selector]

label-type-selector

[lbtype:]type-name[@vob-selector]

hlink-selector

[hlink:]hlink-id[@vob-selector]

oid-obj-selector

oid:object-oid[@vob-selector]

replica-selector

[replica:]replica-name[@vob-selector]

baseline-selector

[baseline:]baseline-name[@vob-selector]

component-selector

[component:]component-name[@vob-selector]


M.   A branch pathname takes the form element-name@@/branch..., for example, cmdsyn.c@@/main/bugfix, and an element pathname takes the form element-name@@, for example, cmdsyn.c@@. If branch-or-element-pname has the form of an object selector, you must include the –pname option to indicate that pname is a pathname.


N.    [stream:]stream-name[@vob-selector]


O.    In the form of an object-selector


P.    In the form of an object-selector

 

Table of Contents

Table of Contents. 2

How do I use the multitool chmaster command.. 2

1.       to transfer mastership of a label type to another replica.. 3

2.       to transfer mastership of an element to another replica.. 3

3.       to transfer mastership of a stream and its associated objects to another replica.. 3

4.       to make a replica self-mastering.. 3

5.       to transfer mastership of a branch to another replica.. 4

6.       to obsolete a replica and pass mastership of all the objects it masters to another replica.. 4

7.       to transfer mastership of all objects mastered by the current replica to another replica.. 4

8.       to list each object as mastership of all objects mastered by the current replica is transferred to another replica.. 4

9.       to return mastership of a branch to the replica that master the branch type.. 5

 

How do I use the multitool chmaster command

Note: Don’t forget you need to send and import the update packet to complete the transfer of any of operations listed below

At the sending replica site run:

            Multitool syncreplikca –export –fship <replica name>@<vob tag>

At the receiving replica site run:

            Multitool syncreplica –import -receive

1.   to transfer mastership of a VOB

At replica london transfer mastership of the samecs_dev VOB to the sydney replica.

 

multitool chmaster –c “transfer the mastership of samecs_dev VOB to the sydney replica” vob:/vobs/samecs_dev

2.   to transfer mastership of a label type to another replica

 

At replica london transfer mastership of label type V1.0_BUGFIX to the sydney replica.

multitool chmaster –c “transfer the mastership of the label type V1.0_BUGFIX to Sydney” sydney lbtype:V1.0_BUGFIX

Changed mastership of "V1.0_BUGFIX" to "sydney"

3.   to transfer mastership of an element to another replica

 

At replica london transfer mastership of the element list.c to the sydney replica.

multitool chmaster sydney list.c@@

Changed mastership of "list.c" to "sydney"

4.   to transfer mastership of a stream and its associated objects to another replica

 

At replica london, transfer mastership of the stream v2.1.bl5 and its associated objects to the sydney replica.

multitool chmaster –c “transfer the masteship of the v2.1.bl5 stream to the Sydney replica” –stream sydney@/vobs/dev stream:v2.1.bl5@/vobs/samecs

5.   to make a replica self-mastering

 

At the replica that is the master of replica sydney, make sydney self-mastering.

multitool chmaster sydney replica:sydney
Changed mastership of "sanfran_hub" to "sanfran_hub"

6.   to transfer mastership of a branch to another replica

 

At replica london, transfer mastership of branch cache.c@@/main/samecs_dev to sydney.

multitool chmaster boston_hub cache.c@@/main/samecs_dev

Changed mastership of branch "/vobs/dev/cache.c@@/main/v3_dev" to
"boston_hub"

7.   to obsolete a replica and pass mastership of all the objects it masters to another replica

At replica london, obsolete replica sydney and transfer mastership of all its objects to replica boston

multitool chmaster –all –c “Transfer mastership of all objects mastered by the sydney replica to the boston replica” –obsolete_replica sydney boston

Note: You must ensure that the replica at the Sydney site has been removed before running this command.

8.   to transfer mastership of all objects mastered by the current replica to another replica

For all objects mastered by the current replica, transfer mastership to sydney

multitool chmaster –all sydney

Changed mastership of all objects

9.   to list each object as mastership of all objects mastered by the current replica is transferred to another replica

Same as the preceding example, but have chmaster list each object whose mastership is changing, and specify a view context.

multitool chmaster –all –long sydney@/view/jtg/vobs/samecs_dev

Changed mastership of branch type sydney_main
Changed mastership of label type SYDNEY_V2.0
Changed mastership of replica sydney
Changed mastership of all objects

10.       to return mastership of a branch to the replica that master the branch type

Return mastership of a branch to the replica that masters the branch type and then remove its explicit mastership.

At the replica that masters the branch:

multitool describe –fmt "%[master]p\n" brtype:v3_bugfix

boston_hub@\dev
multitool chmaster boston_hub@\dev \dev\acc.c@@\main\v3_bugfix

Changed mastership of branch "\dev\acc.c@@\main\v3_bugfix" to
"boston_hub@\dev"
multitool syncreplica –export –fship boston_hub@\dev

Generating synchronization packet c:\Program Files\Rational
\ClearCase\var\shipping\ms_ship\outgoing
\sync_bangalore_19-Aug-02.09.33.02_3447_1
...

At the replica that masters the branch type:

multitool syncreplica –import –receive

Applied sync. packet
/var/adm/rational/clearcase/shipping/ms_ship/incoming/
sync_bangalore_19-Aug-02.09.33.02_3447_1
to VOB /net/minuteman/vobstg/dev.vbs
multitool chmaster –default brtype:v3_bugfix

Changed mastership of branch type "v3_bugfix" to "default"

This website is published "as is". There is no warranty of any kind (express or implied) as to the operation of our site, the accuracy of the information or the services or products referred to on it. All warranties are excluded as far as permitted at law. Neither we nor any third party will be liable for any losses or damage that may result from use of the website or as a consequence of any inaccuracies in, or any omissions from, the information which it contains.