Giter Club home page Giter Club logo

Comments (9)

matthewbarr avatar matthewbarr commented on May 26, 2024

Any potential dependency change?

from puppet-jenkins.

robinbowes avatar robinbowes commented on May 26, 2024

No, not as far as I can see. I'll check next time I'm with this client (next week now).

Thanks,

R.

from puppet-jenkins.

natewarr avatar natewarr commented on May 26, 2024

I'm experiencing this same issue.

from puppet-jenkins.

natewarr avatar natewarr commented on May 26, 2024

This happens for core plugins. See https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-Deployingacustombuildofacoreplugin

from puppet-jenkins.

jlambert121 avatar jlambert121 commented on May 26, 2024

This kind of makes me wonder if we should add a .pinned to each plugin managed by puppet. That would resolve this (I think) and also ensure things defined by puppet are as puppet says.

from puppet-jenkins.

tobias-m avatar tobias-m commented on May 26, 2024

Fixed this issue by changing:

--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -78,7 +78,7 @@ define jenkins::plugin(

     file { "${plugin_dir}/${plugin}" :
       require => Exec["download-${name}"],
-      owner   => 'jenkins',
+      owner   => 'root',
       mode    => '0644',
       notify  => Service['jenkins'],
     }

from puppet-jenkins.

fipp avatar fipp commented on May 26, 2024

tobias-m: Thank you, that worked!

But I'm struggling to see why ...

File["${plugin_dir}/${plugin}"] requires that Exec["download-{$name}"] is executed before it, which does a rm -rf ${name} ${name}.* && wget --no-check-certificate ${base_url}${plugin}.

As I read the code, the rm deletes both the plugin folder and any file starting with the plugin name (such as swarm.hpi or ldap.jpi), and the wget downloads the new .hpi file for the plugin. After this, Service['jenkins'] is notified, and the plugin folder is populated by Jenkins.

Now, why would it have an impact who (root in your fix, otherwise jenkins) owns this .hpi file prior to the Jenkins service being notified (I assume restarted)?

from puppet-jenkins.

natewarr avatar natewarr commented on May 26, 2024

This is overriding what jenkins is trying to do with the hpi file. By default, jenkins wants to own and control all of the core modules. Changing the owner to root prevents the jenkins user from managing the file the way it wants to. I imagine there's an empty catch block in the code that's keeping this from blowing up completely. I think the better solution is to add a .pinned file for each core module that jenkins manages. See #131.

from puppet-jenkins.

jhoblitt avatar jhoblitt commented on May 26, 2024

I believe this issue should be resolved by #389 so I'm going to close this issue. Please reopen it if the problem is reproducible with the current master.

from puppet-jenkins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.