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

Providing nodes by "Image name" always works as by "Image ID"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Component/s: jclouds-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.616
      JClouds 2.8
    • Similar Issues:

      Description

      Prerequisite:

      • We have image "abc"
      • We have configured Jenkins with JCloud (OpenStack) to allocate new nodes, in node template we specified "Image Name Regexp = abc"

      Steps to reproduce:

      • Allocate new environment (passed step)
      • In cloud delete image "abc" and create a new image with the same name (we have image with new ImageID)
      • Try to allocate new node by Jenkins

      Result:
      Exception: blablabla
      Jenkins tries to create a new node by missingg ImageId

      Expected result:
      Jenkins will refind new ImageID by Image Name and create a new node.

        Attachments

          Activity

          Hide
          felfert Fritz Elfert added a comment -

          Hi,
          Actually, this is a caching bug in jclouds.
          I just issued https://github.com/jenkinsci/jclouds-plugin/pull/104 which circumvents jcloud's image cache.

          Cheers
          -Fritz

          Show
          felfert Fritz Elfert added a comment - Hi, Actually, this is a caching bug in jclouds. I just issued https://github.com/jenkinsci/jclouds-plugin/pull/104 which circumvents jcloud's image cache. Cheers -Fritz
          Hide
          felfert Fritz Elfert added a comment -

          @ Nikolay Borisenko

          Can you please replace "Exception: blablabla" by a real stacktrace?
          This would help me do create a workaround in the plugin, because it turms out that circumventing the cache isn't a viable option either.

          Thanks
          -Fritz

          Show
          felfert Fritz Elfert added a comment - @ Nikolay Borisenko Can you please replace "Exception: blablabla" by a real stacktrace? This would help me do create a workaround in the plugin, because it turms out that circumventing the cache isn't a viable option either. Thanks -Fritz
          Hide
          danielbeck Daniel Beck added a comment -

          Fritz Elfert Want me to merge jclouds-jenkins into jclouds-plugin and make you component lead? Looks like you're the maintainer after all.

          Show
          danielbeck Daniel Beck added a comment - Fritz Elfert Want me to merge jclouds-jenkins into jclouds-plugin and make you component lead? Looks like you're the maintainer after all.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Fritz Elfert
          Path:
          jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsCloud.java
          jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java
          http://jenkins-ci.org/commit/jclouds-plugin/d636f0910302f8ad65da5539bc7500c058d02287
          Log:
          Fixes JENKINS-28815

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Fritz Elfert Path: jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsCloud.java jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java http://jenkins-ci.org/commit/jclouds-plugin/d636f0910302f8ad65da5539bc7500c058d02287 Log: Fixes JENKINS-28815
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Fritz Elfert
          Path:
          jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java
          http://jenkins-ci.org/commit/jclouds-plugin/247b1415cce9e3efdac2cce1764ef8157aec6242
          Log:
          Fix JENKINS-28815, 2nd attempt

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Fritz Elfert Path: jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java http://jenkins-ci.org/commit/jclouds-plugin/247b1415cce9e3efdac2cce1764ef8157aec6242 Log: Fix JENKINS-28815 , 2nd attempt
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Fritz Elfert
          Path:
          jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsCloud.java
          jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java
          http://jenkins-ci.org/commit/jclouds-plugin/c36d74077e0c298e9f0356bc114da4f4060eb086
          Log:
          Merge pull request #104 from OpenDataSpace/JENKINS-28815

          JENKINS-28815 Providing nodes by "Image name" always works as by "Image ID"

          Compare: https://github.com/jenkinsci/jclouds-plugin/compare/686a366ff7fd...c36d74077e0c

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Fritz Elfert Path: jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsCloud.java jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java http://jenkins-ci.org/commit/jclouds-plugin/c36d74077e0c298e9f0356bc114da4f4060eb086 Log: Merge pull request #104 from OpenDataSpace/ JENKINS-28815 JENKINS-28815 Providing nodes by "Image name" always works as by "Image ID" Compare: https://github.com/jenkinsci/jclouds-plugin/compare/686a366ff7fd...c36d74077e0c
          Hide
          felfert Fritz Elfert added a comment -

          Changed in git (to some degree).
          This is actually caused by caching performed by the underlying jclouds lib. I tried circumventing it as best as possible and it as improved slightly, however it may still need a few minutes or so to actually see changes in the image storage. I talked with jclouds developers about that, and they explained that there is nothing that can be done, because in a big environment (like Amazon for example) there are thousands of images that need to be filtered and it would take ages to iterate over tem. Therfore they do the caching.

          Show
          felfert Fritz Elfert added a comment - Changed in git (to some degree). This is actually caused by caching performed by the underlying jclouds lib. I tried circumventing it as best as possible and it as improved slightly, however it may still need a few minutes or so to actually see changes in the image storage. I talked with jclouds developers about that, and they explained that there is nothing that can be done, because in a big environment (like Amazon for example) there are thousands of images that need to be filtered and it would take ages to iterate over tem. Therfore they do the caching.

            People

            • Assignee:
              felfert Fritz Elfert
              Reporter:
              nikolay_borisenko Nikolay Borisenko
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: