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

vSphere agent disconnected after we check the agent status page due to credentials problems

XMLWordPrintable

      Hi,

      We found the following odd behavior related to the VSphere Cloud plugin:

      We have a VSphere Cloud configuration that is working correctly in all our Jenkins instances but one. In the failing Jenkins instance the behavior is the following:

      1. We restart the Jenkins instance and all the vsphere agents are up and running correctly (connected to the Jenkins instance).
      2. We run pipelines and freestylejobs and both work correctly with the above vsphere agents.
      3. We go into the status page of any of those vsphere agents ($JENKINS_URL/computer/$AGENT_NAME) and refreshing the page, we found the agent is disconnected due to credentials problem.
      4. Once we come back to the list of node (agent) we found all the vpshere agents disconnected too.
      5. Checking the vSphere Cloud configuration page and testing the connection we found the same credentials (login) error.
      6. Trying to run any pipelines or freestylejobs, we confirm all of them are waiting for executors since all the agents (the vsphere agent in this case) are disconnected.

      Now, we applied the workaround that we found:

      1. While the issue is happening, we go to the vSphere Cloud configuration page.
      2. We choose a different credential from the credential field (a credentials that we know it is not the correct one).
      3. We click on the Connection Testing button and we found the login error message (since the above selected credentials is not the correct for our vSphere Cloud configuration).
      4. Now, we modify again the credentials by choosing the right one.
      5. Clicking on the Connection Testing button, this time, the connection was accomplished succesfully.
      6. Saving the page, we find all vSphere agent are reconneted again and everything is working propertly again.

      However, as soon as we check the status of any agent we face the issue again.

      We didn't found anything useful in the log related to this issue.

      It looks like the checking status process is invalidating the credential that we use for the vSphere Cloud configuration but only in memory. Since everything works correctly if we restart the Jenkins instance once the issue appears.

            Unassigned Unassigned
            ironcerocloudbees Ignacio Roncero Bazarra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: