Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56834

Build permission on agents is not working

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jenkins Version: 2.164.1

      Role Strategy Plugin Version: 2.10

      I configured a role with all agent related permissions: Build, Configure, Connect, Disconnect...

      With this role assigned to a user, that user can Configure the agent, but it can't run builds on it. The cause of blockage indicates it lacks permissions to run on this slave.

      It is related with the authorization strategy implementing the getACL for Computer but not for Node. If implementing the ACL also for Node apparently works without issues.

       

       

       

        Attachments

          Activity

          Show
          luispiedra Luis Piedra-Márquez added a comment - Pull Request: https://github.com/jenkinsci/role-strategy-plugin/pull/59
          Hide
          runzexia runze xia added a comment -

          Hi What is the log after the failure? Luis Piedra-Márquez

          Show
          runzexia runze xia added a comment - Hi What is the log after the failure? Luis Piedra-Márquez
          Hide
          luispiedra Luis Piedra-Márquez added a comment -

          No error logged.

          It's just the build does not enter any slave altought it should have permissions to do so, and points it in the cause of blockage.

          Show
          luispiedra Luis Piedra-Márquez added a comment - No error logged. It's just the build does not enter any slave altought it should have permissions to do so, and points it in the cause of blockage.
          Hide
          zentavr Andrey Miroshnichenko added a comment -

          I have the same issue as well

          Show
          zentavr Andrey Miroshnichenko added a comment - I have the same issue as well
          Hide
          ncosta Nuno Costa added a comment - - edited

          I also saw this happening. If I change the Project Default Build Authorization from RUN AS USER WHO TRIGGERED BUILD to RUN AS SYSTEM, it runs without any issue.

          UPDATE: After doing some tweaking on Global and project roles permissions, I got it working with RUN AS USER WHO TRIGGERED BUILD, running the builds on Jenkins master.

          Show
          ncosta Nuno Costa added a comment - - edited I also saw this happening. If I change the Project Default Build Authorization from RUN AS USER WHO TRIGGERED BUILD to RUN AS SYSTEM , it runs without any issue. UPDATE: After doing some tweaking on Global and project roles permissions, I got it working with RUN AS USER WHO TRIGGERED BUILD, running the builds on Jenkins master.
          Hide
          wcleong Wei Leong added a comment -

          I'm experiencing the same issue as well. Nuno Costa would you mind sharing how you got it working with RUN AS USER WHO TRIGGERED BUILD? 

          Show
          wcleong Wei Leong added a comment - I'm experiencing the same issue as well. Nuno Costa would you mind sharing how you got it working with RUN AS USER WHO TRIGGERED BUILD? 
          Hide
          asarkar2 Arindom Sarkar added a comment -

          Does anyone figured it out? How to resolve the issue?

          Show
          asarkar2 Arindom Sarkar added a comment - Does anyone figured it out? How to resolve the issue?
          Hide
          ncosta Nuno Costa added a comment -

          Wei Leong Arindom Sarkar From what I remembered, I had to provide general read and build privileges to the roles and then assign the users to those roles.

          Show
          ncosta Nuno Costa added a comment - Wei Leong Arindom Sarkar From what I remembered, I had to provide general read and build privileges to the roles and then assign the users to those roles.
          Hide
          gradol Oliver Grad added a comment - - edited

          Are there any news on that issue?

          I can reproduce it. All permissions set in the node-role are working (configure, connect, disconnect) except the build permission.

          We need this feature to restrict the usage of some special build nodes (setting global build permission on Agent is therefore not an option).

          Are there any other solutions for that scenario?

          The setup is Jenkins 2.249 and Role-based Authorization Strategy-Plugin 3.0

          Show
          gradol Oliver Grad added a comment - - edited Are there any news on that issue? I can reproduce it. All permissions set in the node-role are working (configure, connect, disconnect) except the build permission. We need this feature to restrict the usage of some special build nodes (setting global build permission on Agent is therefore not an option). Are there any other solutions for that scenario? The setup is Jenkins 2.249 and Role-based Authorization Strategy-Plugin 3.0
          Hide
          vinhdqhp QV added a comment -

          We really need this feature. Kindly review and resolve this bug please.

          Show
          vinhdqhp QV added a comment - We really need this feature. Kindly review and resolve this bug please.
          Hide
          samica Frederico Pratas added a comment - - edited

          I'm facing the same issue, slave A owned by user X is not accepting jobs from the user.

          The output is:

          'X' lacks permission to run on 'A'

           

          Jenkins 2.253
          Role-based Authorization Strategy v3.0

          Show
          samica Frederico Pratas added a comment - - edited I'm facing the same issue, slave A owned by user X is not accepting jobs from the user. The output is: 'X' lacks permission to run on 'A'   Jenkins 2.253 Role-based Authorization Strategy v3.0
          Hide
          tkleiber Torsten Kleiber added a comment -

          On my staging jenkins system this works fine, but not on my production system. I don't see the responsible difference in both configurations.

          Show
          tkleiber Torsten Kleiber added a comment - On my staging jenkins system this works fine, but not on my production system. I don't see the responsible difference in both configurations.
          Hide
          gradol Oliver Grad added a comment -

          A Happy New Year.

          Are there any news on this issue.

          It's still reproducable, now on Jenkins 2.274 and Role-based Authorization Strategy-Plugin 3.1.

          Show
          gradol Oliver Grad added a comment - A Happy New Year. Are there any news on this issue. It's still reproducable, now on Jenkins 2.274 and Role-based Authorization Strategy-Plugin 3.1.
          Hide
          gradol Oliver Grad added a comment -

          Found a solution for our specific case.

          Using Job Restrictions Plugin will meet our needs.

          Show
          gradol Oliver Grad added a comment - Found a solution for our specific case. Using Job Restrictions Plugin will meet our needs.
          Hide
          brianbroussard Brian added a comment -

          I am experiencing this same issue. Setting "Project Default Build Authorization" to "Run as User who triggered build" causes jobs to hang with the message "user lacks permissions to run on node"

          Show
          brianbroussard Brian added a comment - I am experiencing this same issue. Setting "Project Default Build Authorization" to "Run as User who triggered build" causes jobs to hang with the message "user lacks permissions to run on node"

            People

            Assignee:
            oleg_nenashev Oleg Nenashev
            Reporter:
            luispiedra Luis Piedra-Márquez
            Votes:
            12 Vote for this issue
            Watchers:
            20 Start watching this issue

              Dates

              Created:
              Updated: