Search code examples
hudsonjenkinsclearcasehudson-pluginsclearcase-ucm

Jenkins UCM ClearCase plugin fails due to rights


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.


Solution

  • 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.