Tuesday, May 24, 2011

Synergy error 'Cannot lock project' upon reconfigure (update)

Somehow this page disappeared from IBM site so replicating it here. Historical number below hints that it was created during Telelogic days.

Message 'Cannot lock project' while doing a reconfigure or reconcile

Technote (FAQ)

Question

I am getting the message 'Cannot lock project' while doing a reconfigure or reconcile. How can I resolve this?

Answer

When you initiate an operation which modifies the project members, such as reconfigure, the projectis locked. If the operation terminates abnormally, the lock may not be cleaned up and subsequent actions may fail and result in a 'Cannot lock project' message. For example, if a user terminated their client during a large reconfigure, rather than waiting for the operation to finish.

If all actions took place using the same client, restart the client and this will usually resolve the issue. This is normally the case for a working project.

If however multiple clients are accessing the project it may be more difficult to resolve the issue. This may be the case for prep and shared projects.

The solution for this should be to run:

ccm monitor -showlocks

ccm monitor -removelock XXX


...where XXX is the full line returned from showlocks.

If this still does not resolve the situation, then you will need to shutdown the entire database with the 'ccmdb shutdown' command, to ensure all connections are terminated.

Should the problem persist even after a 'ccmdb shutdown' then you should run:

onstat -k > locks.txt


and contact IBM Rational Client Support for further assistance and specific steps for your environment.

Once the onstat command has been performed then you can also restart Informix, as this should release the locks effecting the operation.

Historical Number

KB7898

Synergy groups: setting up read-only access to sources of specific project that come from specific releases only

Assume a role of group_mgr:

$ ccm set role group_mgr

Note: if you do not have a group_mgr role assume the role of ccm_admin and add yourself the group_mgr role. End the session and start over.

Verify:

$ ccm set role

group_mgr

Create group:

$ ccm groups -c mygroup

This will open the vi (or any other text editor you have set as a default) session where you should write all the names of the users to be members of the group, in a single line, space-delimited.

Once you are done adding the users save the file and close editor session. The group will be created.

Do not bother sorting the names, next time you look at it via ccm groups -show mygroup you will see all the names sorted alphabetically. And they will be cut in several lines anyway.

List groups:

$ ccm query -i group

1) group/admin/mygroup/1 admin myuser admin <void> group <void>

List group attribute: (so we know what can be viewed or changed):

$ ccm attr -l @1

create_time (time) (local)

cvtype (string) (local)

is_asm (boolean) (local)

is_model (boolean) (local)

membership (text) (local)

modify_time (time) (local)

name (string) (local)

owner (string) (local)

status (string) (local)

subsystem (string) (local)

version (string) (local)

View group owner:

$ ccm attr -s owner @1

myuser

View group members:

$ ccm attr -s membership @1

OR

$ ccm groups -show mygroup

Change group membership:

$ ccm groups -e <group name>

e.g. ccm groups –e mygroup

Query for all the objects to assign to the group (all objects in the ABC_v721_00 project that belong to the ABC* releases):

$ ccm query "is_member_of('ABCAPP#V721_00') and is_associated_object_of(cvtype='task' and release match 'ABC*') and type !='dir'"

Assign ABCAPP#V721_00 721-only objects to the dp security group with read-deny access to others:

$ ccm groups -a -v mygroup:readsource @