Whirr
  1. Whirr
  2. WHIRR-107

Test failing due to not matching Amazon Linux AMI on EC2

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.2.0
    • Component/s: service/hadoop
    • Labels:
      None

      Description

      When I run the Hadoop tests on trunk I get a failure because the ubuntu-alphas-us/karmic-i386-alpha5.manifest.xml AMI is being selected, rather than the Amazon Linux AMI.

      1. WHIRR-107.patch
        0.9 kB
        Tom White
      2. WHIRR-107.patch
        1 kB
        Tom White

        Activity

        Hide
        Tom White added a comment -

        This patch fixes the problem for me.

        Show
        Tom White added a comment - This patch fixes the problem for me.
        Hide
        Adrian Cole added a comment -

        The default template for ec2 in jclouds-1.0-beta-7, is fixed at amazon linux. The only thing that could explain this would be a classpath problem.

        http://github.com/jclouds/jclouds/blob/1.0-beta-7/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ComputeServiceContextModule.java

        @Override
        protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template)

        { String provider = injector.getInstance(Key.get(String.class, Provider.class)); if ("eucalyptus".equals(provider)) return template.osFamily(CENTOS); else if ("nova".equals(provider)) return template.osFamily(UBUNTU); else return template.osFamily(AMZN_LINUX).os64Bit(true); }

        I don't recommend committing this patch. I do recommend investigating the setup that produced ubuntu, as this hints strongly of beta-6 classes in the classpath.

        Show
        Adrian Cole added a comment - The default template for ec2 in jclouds-1.0-beta-7, is fixed at amazon linux. The only thing that could explain this would be a classpath problem. http://github.com/jclouds/jclouds/blob/1.0-beta-7/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ComputeServiceContextModule.java @Override protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) { String provider = injector.getInstance(Key.get(String.class, Provider.class)); if ("eucalyptus".equals(provider)) return template.osFamily(CENTOS); else if ("nova".equals(provider)) return template.osFamily(UBUNTU); else return template.osFamily(AMZN_LINUX).os64Bit(true); } I don't recommend committing this patch. I do recommend investigating the setup that produced ubuntu, as this hints strongly of beta-6 classes in the classpath.
        Hide
        Tom White added a comment -

        This is only a problem with the Hadoop test (Cassandra and ZooKeeper are fine, they use a micro instance), which uses a m1.small instance. This doesn't support 64 bit - I wonder if that's causing this?

        Show
        Tom White added a comment - This is only a problem with the Hadoop test (Cassandra and ZooKeeper are fine, they use a micro instance), which uses a m1.small instance. This doesn't support 64 bit - I wonder if that's causing this?
        Hide
        Adrian Cole added a comment -

        ahh I see.

        right. then, this patch will do.. the only problem is that it will choose a 32bit ami even on micro, which supports 64bit. If that isn't a problem, then go ahead and commit.

        Show
        Adrian Cole added a comment - ahh I see. right. then, this patch will do.. the only problem is that it will choose a 32bit ami even on micro, which supports 64bit. If that isn't a problem, then go ahead and commit.
        Hide
        Tom White added a comment -

        the only problem is that it will choose a 32bit ami even on micro, which supports 64bit.

        Hadoop doesn't (currently) work on micro, if/when if does we can revisit this. I've updated the patch so that this logic is in HadoopTemplateBuilderStrategy, since it is specific to Hadoop.

        Show
        Tom White added a comment - the only problem is that it will choose a 32bit ami even on micro, which supports 64bit. Hadoop doesn't (currently) work on micro, if/when if does we can revisit this. I've updated the patch so that this logic is in HadoopTemplateBuilderStrategy, since it is specific to Hadoop.
        Hide
        Tom White added a comment -

        I've just committed this.

        Show
        Tom White added a comment - I've just committed this.

          People

          • Assignee:
            Tom White
            Reporter:
            Tom White
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development