2

I am using Jenkins with the source control plugin name UCM ClearCase.
It tries to create a view and fails with the error:

[onlysourcecode] $ cleartool mkview -snapshot -stream ROLE_Test_Project_DevSG@\Vobname -tag SYSTEM_master_Test_ROLE_001_hudson view
Selected Server Storage Location "Views".
cleartool: Error: unable to set access control list for \\server\viewstor\NT+AUTHORITY\SYSTEM\view.1.vws: Access is denied.
cleartool: Error: protection on \\server\viewstor\NT+AUTHORITY\SYSTEM\view.1.vws is out-of-synch with identity.sd and groups.sd
cleartool: Error: Failed to set identity on view: Permission denied
cleartool: Error: unable to set access control list for \\server\viewstor\NT+AUTHORITY\SYSTEM\view.1.vws: Access is denied.
cleartool: Error: \\server\viewstor\NT+AUTHORITY\SYSTEM\view.1.vws: Permission denied
cleartool: Error: Unable to create view "\\server\viewstor\NT+AUTHORITY\SYSTEM\view.1.vws".
FATAL: UCM ClearCase failed. exit code=1

Which basically means it does not have permissions to create a view. Now my questions:

  1. Any ideas on what exactly is the problem here?

  2. What ID is Jenkins using internally. Meaning I have a user ID on the DOMAIN controller where I log in to the machine and run Jenkins. If Jenkins uses that, then why this error as I can create views.

  3. If not, then what ID does it use and how do I get Jenkins to use my domain ID, or else maybe get the internal ID to be a part of the ClearCase AD group.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Pulak Agrawal
  • 2,481
  • 4
  • 25
  • 49

2 Answers2

2

I guess this is run on a Windows box as a service. Thus it is not run as a domain user.

It appears that jenkins is trying to create a view storage (.vws) in the default location, based on the clearcase configuration on the system.

Perhaps you should choose the Advanced... option in UCM Clearcase and explicitly specify the location for your view storage. There are

  • Windows view storage directory
  • Additional mkview arguments

I run jenkins on a linux box where I have specified an explicit location for the .vws file in Additional mkview arguments.

Raghuram
  • 51,854
  • 11
  • 110
  • 122
2

To add to Raghuram's answer, using the system account (NT+AUTHORITY) is tricky, because even if you specify a local view storage,:

  • that account won't have a CLEARCASE_PRIMARY_GROUP associated with its profile
  • even if it did, it wouldn't be part of the group referenced by CLEARCASE_PRIMATY_GROUP

That means it won't be able to access the vob storage of the Vob it will need to access within the view.

Anyway, at the very least you should try and configure Slave Service to Run as Domain User.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks.. I configured the service to ` Log On as ` and it worked. – Pulak Agrawal Dec 07 '11 at 08:06
  • @PulakAgrawal: the only downfall is that, in big corporations, your password will change every x months. Having a job defined that way is a great way to get your account locked one day. If you haven't that limitation however, that is a good solution. – VonC Dec 07 '11 at 08:12
  • I already realized that the hard way :( (yes, I am in a big corporation) so this was bound to happen but I have a special ID whose password does not expire (for build magmt), so I am safe using that now. Thanks – Pulak Agrawal Dec 09 '11 at 06:10