[JIRA] (JENKINS-59611) Symlink target update fails when "noclobber" set

13 views
Skip to first unread message

kwirth@perforce.com (JIRA)

unread,
Oct 1, 2019, 10:39:09 AM10/1/19
to jenkinsc...@googlegroups.com
Karl Wirth created an issue
 
Jenkins / Improvement JENKINS-59611
Symlink target update fails when "noclobber" set
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: p4-plugin
Created: 2019-10-01 14:38
Environment: P4-Plugin 1.10.3
Jenkins 1.176.3
Priority: Major Major
Reporter: Karl Wirth

If the contents of the target of a symlink is updated and noclobber is set on the workspace the next sync fails. For example:

P4 Task: syncing files at change: 1980... p4 sync /var/lib/jenkins/workspace/Symlinks/...@1980
P4 Task: attempt: 1
ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
Can't clobber writable file /var/lib/jenkins/workspace/Symlinks/aLinux/target/F1

The permission on the target is OK. P4-Plugin does set the symlink permission to be 'w':

lrwxrwxrwx 1 jenkins jenkins   12 Oct  1 14:13 ./aLinux/links/F1_link -> ../target/F1
-r--r--r-- 1 jenkins jenkins   89 Oct  1 14:13 ./aLinux/target/F1

P4 command line would set the same permissions but will correctly sync the files with the same permission. For example:

$ ls -ld $(find .)
drwxr-xr-x 4 kwirth kwirth 4096 Jul  2 11:16 .
drwxr-xr-x 2 kwirth kwirth 4096 Oct  1 15:33 ./links
lrwxrwxrwx 1 kwirth kwirth   12 Oct  1 15:33 ./links/F1_link -> ../target/F1
drwxr-xr-x 3 kwirth kwirth 4096 Oct  1 15:34 ./target
-r--r--r-- 1 kwirth kwirth  134 Oct  1 15:34 ./target/F1

$ p4 sync ...
//depot/symlink/aLinux/target/F1#3 - updating /ws/symlink/aLinux/target/F1

Reproduction Steps:

  1. Add a target and symlink to Perforce from your Linux Perforce workspace.
  2. Create a freestyle job to sync the path containing the symlink.
  3. Before saving the job untick 'clobber'.
  4. Set the job to only build on one Linux node and set the populate option to 'Auto Cleanup And Sync'.
  5. Save the job.
  6. Run the job.
  7. Make an edit to the target of the symlink and submit it from your Linux workspace.
  8. Run the job.

Result:

 The "Can't clobber writable file" error is seen.

Expected Result:

   Target is synced without error.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

kwirth@perforce.com (JIRA)

unread,
Oct 1, 2019, 10:43:02 AM10/1/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Oct 2, 2019, 9:30:04 AM10/2/19
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
Change By: Karl Wirth
Issue Type: Improvement Bug

cbopardikar@perforce.com (JIRA)

unread,
Oct 10, 2019, 10:37:03 AM10/10/19
to jenkinsc...@googlegroups.com
Charusheela Bopardikar updated an issue
If the contents of the target of a symlink is updated and noclobber is set on the workspace the next sync fails. For example:
{code:java}

P4 Task: syncing files at change: 1980... p4 sync /var/lib/jenkins/workspace/Symlinks/...@1980
P4 Task: attempt: 1
ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
Can't clobber writable file /var/lib/jenkins/workspace/Symlinks/aLinux/target/F1
{code}

The permission on the target is OK. P4-Plugin does set the symlink permission to be 'w':
{code:java}

lrwxrwxrwx 1 jenkins jenkins   12 Oct  1 14:13 ./aLinux/links/F1_link -> ../target/F1
-r--r--r-- 1 jenkins jenkins   89 Oct  1 14:13 ./aLinux/target/F1
{code}

P4 command line would set the same permissions but will correctly sync the files with the same permission. For example:
{code:java}

$ ls -ld $(find .)
drwxr-xr-x 4 kwirth kwirth 4096 Jul  2 11:16 .
drwxr-xr-x 2 kwirth kwirth 4096 Oct  1 15:33 ./links
lrwxrwxrwx 1 kwirth kwirth   12 Oct  1 15:33 ./links/F1_link -> ../target/F1
drwxr-xr-x 3 kwirth kwirth 4096 Oct  1 15:34 ./target
-r--r--r-- 1 kwirth kwirth  134 Oct  1 15:34 ./target/F1

$ p4 sync ...
//depot/symlink/aLinux/target/F1#3 - updating /ws/symlink/aLinux/target/F1{code}
*Reproduction Steps:*
# Add a target and symlink to Perforce from your Linux Perforce workspace.
# Create a freestyle job to sync the path containing the symlink.
# Before saving the job untick 'clobber'.
# Set the job to only build on one Linux node and set the populate option to 'Auto Cleanup And Sync'.
# Save the job.
# Run the job.
# Make an edit to the
target of the symlink to point to a new target and submit it from your Linux workspace.
# Run the job.

*Result:*


 The "Can't clobber writable file" error is seen.

*Expected Result:*


   Target is synced without error.

pallen@perforce.com (JIRA)

unread,
Oct 15, 2019, 6:29:03 AM10/15/19
to jenkinsc...@googlegroups.com
Paul Allen started work on Bug JENKINS-59611
 
Change By: Paul Allen
Status: Open In Progress

pallen@perforce.com (JIRA)

unread,
Oct 15, 2019, 6:30:04 AM10/15/19
to jenkinsc...@googlegroups.com
Paul Allen assigned an issue to Charusheela Bopardikar
Change By: Paul Allen
Assignee: Charusheela Bopardikar

cbopardikar@perforce.com (JIRA)

unread,
Oct 17, 2019, 9:30:02 AM10/17/19
to jenkinsc...@googlegroups.com
Charusheela Bopardikar edited a comment on Bug JENKINS-59611
 
Re: Symlink target update fails when "noclobber" set
P4JAVA issue. Fixed .

Need to test in P4Jenkins.

cbopardikar@perforce.com (JIRA)

unread,
Oct 17, 2019, 9:30:02 AM10/17/19
to jenkinsc...@googlegroups.com

P4JAVA issue. Fixed

Need to test in P4Jenkins.

pallen@perforce.com (JIRA)

unread,
Oct 25, 2019, 10:57:02 AM10/25/19
to jenkinsc...@googlegroups.com
Paul Allen closed an issue as Fixed
 

Released in 1.10.6

Change By: Paul Allen
Status: In Progress Closed
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages