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

libvirt plugin broken after upgrade to 2.346.2

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.346.2 installed via apt
      Ubuntu 20.04.4 LTS

      After the update from 2.346.1 to 2.346.2 (including all plugins at that time) the libvirt plugin stopped working for me.

      Problems:

      • The slave configuration is accessible but I cannot see/select any hypervisor
      • There is a "Uncategorized/libvirt" section in the /manage menu
        • The icons are not loaded (404 error)
        • There are no hypervisors
        • No option to edit or create hypervisors
      • The "Cloud" section in "Manage Jenkins" mentioned by the documentation is gone

      What I did:

      1. Tried to build a project using the plugin that last succeeded on 28. June with Jenkins 2.346.1
      2. Failed because the agent did not start
      3. Checked the slave config page and hypervisor was selectable  but no snapshots
      4. Hypervisor was listed under "Uncategorized/libvirt" but I could not see any config
      5. Disabled the plugin and restarted Jenkins
      6. Enabled the plugin again and restarted Jenkins
      7. Hypervisor is gone
      8. I could not find any error messages in the Jenkins log 
      9. Slave config page says "ERROR: Could not find our libvirt cloud instance!"

      Additional information:

      On 23. June I upgraded from 2.319.2 to 2.346.1 and on 28. June the last build was done.

      I always update the Jenkins plugins along with the apt updates.

       

          [JENKINS-69243] libvirt plugin broken after upgrade to 2.346.2

          Richard added a comment -

          I managed to get the plugin working again.

          The "Cloud" option is now located under "Manage Jenkins->Manage Nodes and Clouds->Configure Clouds(left side)" (or example.com/configureClouds/), so the documentation is definitely outdated.

          The configured hypervisor vanished, I am not sure if this happened during the update or by disabling/enabling the plugin.

          I created a new hypervisor and found that it seems to be impossible to use ssh/pubkey authentication with ssh or libssh2 using the Jenkins credential provider.

          The last ssh/pubkey configuration was saved this way, so maybe this was the problem.

          I had to configure a new ssh key using the "URI parameters" (system?keyfile=/var/lib/jenkins/.ssh/keyfile&no_verify=1&). Unfortunately, this is not an improvement.

          The "Uncategorized/libvirt" (example.com/libvirt-slave/) page shows the hypervisor and I can also view its "Domains" status page, the last time I could not open the status page. The icons are still not loaded (404).

          Richard added a comment - I managed to get the plugin working again. The "Cloud" option is now located under "Manage Jenkins->Manage Nodes and Clouds->Configure Clouds(left side)" (or example.com/configureClouds/), so the documentation is definitely outdated . The configured hypervisor vanished, I am not sure if this happened during the update or by disabling/enabling the plugin. I created a new hypervisor and found that it seems to be impossible to use ssh/pubkey authentication with ssh or libssh2 using the Jenkins credential provider. The last ssh/pubkey configuration was saved this way, so maybe this was the problem. I had to configure a new ssh key using the "URI parameters" (system?keyfile=/var/lib/jenkins/.ssh/keyfile&no_verify=1&). Unfortunately, this is not an improvement. The "Uncategorized/libvirt" (example.com/libvirt-slave/) page shows the hypervisor and I can also view its "Domains" status page, the last time I could not open the status page. The icons are still not loaded (404).

          First question: Did you update libvirt with apt? What version do you run now?

          The icons should be fixed with the next upload. There was already a contribution to fix this.

          The documentation (Cloud option) may be outdated for current Jenkins version but not for the oldest supported Jenkins version.

          There was never a plugin version that had support for pubkey authentication via the Jenkins credential provider. I guess it worked for you with a the "ssh" method because that just uses the SSH system configuration.

          So this bug report boils down to "plugin configuration vanished", am I right?

          Bastian Germann added a comment - First question: Did you update libvirt with apt? What version do you run now? The icons should be fixed with the next upload. There was already a contribution to fix this. The documentation (Cloud option) may be outdated for current Jenkins version but not for the oldest supported Jenkins version. There was never a plugin version that had support for pubkey authentication via the Jenkins credential provider. I guess it worked for you with a the "ssh" method because that just uses the SSH system configuration. So this bug report boils down to "plugin configuration vanished", am I right?

          Richard added a comment -

          The version used during the upgrade was  6.0.0-0ubuntu8.16.

          It was last updated on 2022-05-04 while running Jenkins 2.319.2 and it worked with this version.
          (Upgrade: libvirt-clients:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16), libvirt0:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16))

          It would be nice if the documentation could also link to the new site, because it is definitely not easy to find. (jenkins.server/configureClouds/)

          If the credential provider was not used, I must have configured ssh at the system level. 
           

          So this bug report boils down to "plugin configuration vanished", am I right?

          Yes
           
          Thank you anyway

          Richard added a comment - The version used during the upgrade was  6.0.0-0ubuntu8.16. It was last updated on 2022-05-04 while running Jenkins 2.319.2 and it worked with this version. (Upgrade: libvirt-clients:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16), libvirt0:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16)) It would be nice if the documentation could also link to the new site, because it is definitely not easy to find. (jenkins.server/configureClouds/) If the credential provider was not used, I must have configured ssh at the system level.    So this bug report boils down to "plugin configuration vanished", am I right? Yes   Thank you anyway

            m_jeanson Michael
            debugbug Richard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: