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

"You should set up distributed builds. Building on the controller node can be a security issue. " with agents and cloud configured

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 2.286 freshly upgraded from Jenkins 2.285
    • 2.288

      Test 2.285 instance has been upgraded to 2.286 (switching jenkins/jenkins:2.285-centos to jenkins/jenkins:2.286-centos container)

      There is one permanent agent (apart from "master") and Kubernetes cloud configured. We never build on master node and we use declarative pipelines exclusively.

      After 2.285 -> 2.286 upgrade I was greeted with the following admin warning:

       

      You should set up distributed builds. Building on the controller node can be a security issue. See the documentation.

      "Manage" button takes be to the master node configuration but it is not clear what to do there.

      Test Result
      !Main.isDevelopmentMode true​
      Jenkins.get().getNumExecutors() 1
      Jenkins.get().clouds.isEmpty() false
      Jenkins.get().getNodes().isEmpty() false

          [JENKINS-65291] "You should set up distributed builds. Building on the controller node can be a security issue. " with agents and cloud configured

          Marcin Cieślak added a comment - - edited

          So, I have figured it out that the issue was the number of executors on the master node was 1.

          I have done the following:

          • On the script console re-activated dismissed warning with
          •     Jenkins.instance.getAdministrativeMonitor("jenkins.diagnostics.ControllerExecutorsAgents").disable(false)
          • Reset # of executors on the master node  to 0 (zero)

          The linked doc says, among others, you should generally configure the master to have no executor 

          Can we make this clear in the message? It was confusing because I thought *I have* configured distributed builds; I have not disabled the master completely. (This is not obvious, either, I was poking around looking for "Disable" or "Delete" button on "master", no luck).

           

          Marcin Cieślak added a comment - - edited So, I have figured it out that the issue was the number of executors on the master node was 1. I have done the following: On the script console re-activated dismissed warning with      Jenkins.instance.getAdministrativeMonitor("jenkins.diagnostics.ControllerExecutorsAgents").disable(false) Reset  # of executors  on the  master  node  to 0 (zero) The linked doc says, among others,  you should generally configure the master to have no executor   Can we make this clear in the message? It was confusing because I thought * I have * configured distributed builds; I have not disabled the master completely. (This is not obvious, either, I was poking around looking for "Disable" or "Delete" button on "master", no luck).  

          Daniel Beck added a comment -

          Can we make this clear in the message? It was confusing because I thought *I have* configured distributed builds; I have not disabled the master completely.

          Good point, I think the actual wording of the message changed slightly since I asked for both monitors to share one message to appear as one.

          Daniel Beck added a comment - Can we make this clear in the message? It was confusing because I thought * I have * configured distributed builds; I have not disabled the master completely. Good point, I think the actual wording of the message changed slightly since I asked for both monitors to share one message to appear as one.

          Daniel Beck added a comment -

          This is not obvious, either, I was poking around looking for "Disable" or "Delete" button on "master", no luck

          Updated the wiki page to hopefully help a bit with that.

          Daniel Beck added a comment - This is not obvious, either, I was poking around looking for "Disable" or "Delete" button on "master", no luck Updated the wiki page to hopefully help a bit with that.

          Big thanks to danielbeck and others involved in taking care of this little thing so quickly! It was a pleasure to work with you on this issue.

          Marcin Cieślak added a comment - Big thanks to danielbeck and others involved in taking care of this little thing so quickly! It was a pleasure to work with you on this issue.

            danielbeck Daniel Beck
            saper Marcin Cieślak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: