Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: openstack-cloud-plugin
    • Labels:
      None
    • Environment:
      Jenkins v1.609.1
      OpenStack Cloud plugin v2.3
      OS: SLES 11 SP3
    • Similar Issues:

      Description

      I've set up and configured the OpenStack Cloud plugin with one template. When I try to launch a slave based on that template (via Manage nodes) all I get is: "Error. Boot failed".

      After studying the logs and the network traffic I found the cause. The plugin tries to resolve the image ID based on the Image name that I configured. (See jenkins.plugins.openstack.compute.internal.OpenStack.getImageIdFor(String name)).

      This results is an API call to the images API:
      HTTP/1.1 GET v1/images?status=ACTIVE&name=My_Image
      The API however expects a lowercase status instead of uppercase (see also http://developer.openstack.org/api-ref-image-v1.html). So the response body is:
      {"images": []}.

      The result of this is that the plugin tries to provision an instance via the API without providing an imageRef.

      So there are essentially two issues:
      1. The plugin makes the wrong API call
      2. The plugin doesn't handle the situation where no images are returned correctly.

      This bug was introduced with commit 50dd47d798bcd79a99ebfb62e51cb2c2d057777f.

        Attachments

          Activity

          Hide
          olivergondza Oliver Gondža added a comment -

          Thanks for reporting this. It is strange but my openstack does not eliminate the images because of case mismatch in status field. Can you run Jenkins.instance.clouds[0].openstack.@client.images().listAll(['status':'active']) (vs. ACTIVE) from JENKINS_URL/script to verify?

          You are right that there si a lot to catch up in case a mandatory field is left null. Plugin should at least report (if not abort the provisioning) in case some of the required fields is not configured (or resolved as in this case).

          Show
          olivergondza Oliver Gondža added a comment - Thanks for reporting this. It is strange but my openstack does not eliminate the images because of case mismatch in status field. Can you run Jenkins.instance.clouds [0] .openstack.@client.images().listAll( ['status':'active'] ) (vs. ACTIVE ) from JENKINS_URL/script to verify? You are right that there si a lot to catch up in case a mandatory field is left null. Plugin should at least report (if not abort the provisioning) in case some of the required fields is not configured (or resolved as in this case).
          Hide
          jaapcoomans Jaap Coomans added a comment -

          Thank you for the quick response Oliver Gondža. I tried to run the script for both ACTIVE and active and the result is as I expected based on my earlier findings:

          • ACTIVE: Returns Result: []
          • active: Returns a list of all 6 available images
          Show
          jaapcoomans Jaap Coomans added a comment - Thank you for the quick response Oliver Gondža . I tried to run the script for both ACTIVE and active and the result is as I expected based on my earlier findings: ACTIVE: Returns Result: [] active: Returns a list of all 6 available images
          Hide
          olivergondza Oliver Gondža added a comment -

          That means you ware right. The fix should be trivial.

          Show
          olivergondza Oliver Gondža added a comment - That means you ware right. The fix should be trivial.
          Hide
          olivergondza Oliver Gondža added a comment -

          Fixed in 2.4.

          Show
          olivergondza Oliver Gondža added a comment - Fixed in 2.4.
          Hide
          jaapcoomans Jaap Coomans added a comment -

          Great! Thank you for the quick response and release

          Show
          jaapcoomans Jaap Coomans added a comment - Great! Thank you for the quick response and release

            People

            • Assignee:
              olivergondza Oliver Gondža
              Reporter:
              jaapcoomans Jaap Coomans
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: