[ 
https://issues.jenkins-ci.org/browse/JENKINS-12753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159258#comment-159258
 ] 

Alex Lehmann commented on JENKINS-12753:
----------------------------------------

the way open files are handled is different on local filesystems and nfs, the 
issue may be nfs specific, however if Kohsuke is right, it doesn't work on 
local storage either but it doesn't give an obvious error message in that case.

if the plugin is in use, the different jar files for the plugin are all loaded 
into the jvm and are open (this is visible with lsof), if the plugin is 
updated, the files are still open even though they are already delete (this is 
perfectly ok on local filesystems), e.g. like this (this is the output of 
lsof|grep java.*xunit.*guice as one example file):

before:
{code}
java       1430    lehmann  mem       REG     8,1   807021 4067923 
/home/lehmann/.jenkins/plugins/xunit/WEB-INF/lib/guice-2.0.1.jar
java       1430    lehmann  237r      REG     8,1   807021 4067923 
/home/lehmann/.jenkins/plugins/xunit/WEB-INF/lib/guice-2.0.1.jar
{code}

after:
{code}
java       1430    lehmann  DEL       REG     8,1          4067923 
/home/lehmann/.jenkins/plugins/xunit/WEB-INF/lib/guice-2.0.1.jar
java       1430    lehmann  237r      REG     8,1   807021 4067923 
/home/lehmann/.jenkins/plugins/xunit/WEB-INF/lib/guice-2.0.1.jar (deleted)
{code}

the jars will not be reloaded even if they were written to the directory in a 
new version.

on nfs, open deleted files are not directly possible, so instead each file is 
changed to a .nfs file which causes the exception when trying to delete the 
directory, but reloading wouldn't work either if the files could be deleted (or 
e.g. are moved to another dir and delete later).

When updating a plugin when the directory is on a local filesystem, the update 
page still says "xunit plugin is already installed. Jenkins needs to be 
restarted for the update to take effect" with a yellow ball, so the update 
process notices that it cannot update the files and forces suggests to restart. 
With nfs he never gets to the stage where the message appears, but the problem 
is the same in both cases.


                
> Instant update of plugins doesn't work in nfs directory
> -------------------------------------------------------
>
>                 Key: JENKINS-12753
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12753
>             Project: Jenkins
>          Issue Type: Bug
>          Components: plugin
>         Environment: linux, nfs, jenkins 1.450, any plugin
>            Reporter: Alex Lehmann
>            Priority: Minor
>
> Got the question from the irc channel, this was initially discussed on the 
> fosdem jenkins booth.
> Updating plugins doesn't work when the jenkins home directory is located on 
> nfs, the failure looks like this
> Caused by: java.io.IOException: Unable to delete 
> /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/.nfs00000000000e897d00000096
> The .nfs files appear when deleting a file on nfs that is still open, in this 
> case the jar files in the lib directory are still open and cannot be deleted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to