Whirr
  1. Whirr
  2. WHIRR-428

Always match a stable Canonical AMI on AWS EC2

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: core
    • Labels:
      None

      Description

      Adrian posted on jclouds-dev@ an improvement to the template selection mechanism:

      "For those of you using aws-ec2, here's a handy template expression
      that will match the latest stable image from canonical. I've placed
      comments where explanation is likely necessary.

      Template template = context.getComputeService().templateBuilder()
      // need to select versions with double-digits so that lexicographic
      // doesn't end up prefering 9.x vs 11.x
      .osVersionMatches("1[012].[10][04]")
      // negative lookahead for daily and testing, but ensure match
      // ubuntu-images
      // http://www.regular-expressions.info/lookaround.html
      .imageDescriptionMatches("^(?!.(daily|testing)).*ubuntu-images.$")
      .osFamily(OsFamily.UBUNTU).build();

      Hope this helps!"

      1. WHRIR-428.diff.txt
        0.8 kB
        Andrew Bayer

        Activity

        Hide
        Tom White added a comment -

        I just committed this. Thanks Andrew!

        Show
        Tom White added a comment - I just committed this. Thanks Andrew!
        Hide
        Andrew Bayer added a comment -

        Yes. I'll dig further into the CDH4 failures and get bugs open for them, once I finish my CloudStack 3.x support patch.

        Show
        Andrew Bayer added a comment - Yes. I'll dig further into the CDH4 failures and get bugs open for them, once I finish my CloudStack 3.x support patch.
        Hide
        Tom White added a comment -

        So the other (non-CDH) integration tests are passing? If so, then I think we can commit these patches. Also, might be worth opening a JIRA for the configuration problems you are hitting.

        Show
        Tom White added a comment - So the other (non-CDH) integration tests are passing? If so, then I think we can commit these patches. Also, might be worth opening a JIRA for the configuration problems you are hitting.
        Hide
        Andrew Bayer added a comment -

        Ok, now I'm at the point where my only consistent issue on EC2 is in CDH4 tests for configuration reasons, unrelated to any of these patches. So woo!

        Show
        Andrew Bayer added a comment - Ok, now I'm at the point where my only consistent issue on EC2 is in CDH4 tests for configuration reasons, unrelated to any of these patches. So woo!
        Hide
        Andrew Bayer added a comment -

        Ok, they're not - trunk's got a few issues but not near as many as I'm having with my patches. Trying them one by one now.

        Show
        Andrew Bayer added a comment - Ok, they're not - trunk's got a few issues but not near as many as I'm having with my patches. Trying them one by one now.
        Hide
        Andrew Bayer added a comment -

        Yeah, I'm getting tons of integration test issues with the various patches - waiting for another run on trunk to see whether they're in both places.

        Show
        Andrew Bayer added a comment - Yeah, I'm getting tons of integration test issues with the various patches - waiting for another run on trunk to see whether they're in both places.
        Hide
        Tom White added a comment -

        Thanks for the patch Andrew! I tried running the ZK integration test, but am getting errors - even without the patch. Were you able to run any integration tests with the patch?

        Same for the other patches too. Let me know so we can get these committed.

        Show
        Tom White added a comment - Thanks for the patch Andrew! I tried running the ZK integration test, but am getting errors - even without the patch. Were you able to run any integration tests with the patch? Same for the other patches too. Let me know so we can get these committed.
        Hide
        Andrew Bayer added a comment -

        Simple enough, I think.

        Show
        Andrew Bayer added a comment - Simple enough, I think.

          People

          • Assignee:
            Andrew Bayer
            Reporter:
            Andrei Savu
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development