ClearCase Shared VCS Root + Snapshot dependency = sharing violation?

I'm using TeamCity 7.1 EAP (build 23373).  We use ClearCase for VCS.  I'm probably misunderstanding how snapshot dependencies work, so hopefully someone can see what I'm doing wrong.

My goal is to share source code between two builds.  One build needs the code from the other.

  • We have two builds:  A and B.
  • A and B share a VCS root (for the common code)
  • VCS Checkout Mode = Automatically on server
  • B depends on A (via snapshot dependency)
  • I can run build A successfully alone.


When I try to run build B, it fails to even start because the dependency build (A) fails with the following error message:

Failed to start build
Failed to collect changes, error: java.io.IOException: Error executing [update, -force, -rename, -log, teamcity.clearcase.update.result.log]:
cleartool: Error: Unable to open file "teamcity.clearcase.update.result.log": Permission denied.

Running Process Monitor on the TeamCity server indicates that TeamCity is trying to create the file 'teamcity.clearcase.update.result.log' in the Shared VCS Root, which results in a Sharing Violation; this is reported through the TeamCity UI as the aforementioned 'Permission Denied' error, and the build chain fails.

My original thinking was that I could share source code by simply defining a snapshot dependency, but this doesn't work (the common code is not transferred to the dependent build).  So I defined a Shared VCS root for the common code AND created a snapshot dependency.  It seems that using a Shared VCS root with TeamCity configured for "VCS checkout mode" = "Automatically on Server" results in the attempt to create two teamcity.clearcase.update.result.log files in the same location, which fails.  

How is this supposed to be configured?  Do I need to use Agent side checkout so TeamCity doesn't try to create the update log in the same location?  Or doesn't this matter?

Thanks,
Bryan

1 comment
Comment actions Permalink

Hi Bryan,

Your description of the setup looks fine.

The error you get does not seem to be related to the TeamCity snapshot dependneices, but is probably caused by some other misconfiguration.

It seems that even if you just run A, it will fail with the same error.
Can you pelase look into the error and the root cause of why TeamCity cannot write the file mentioned?

I'd check that TeamCIty agent runs under the user who have full write permissinos to the used directories.

0

Please sign in to leave a comment.