Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Whirr should be able to operate on user supplied images. Currently, this only works if the image has a default root login.

      Please add a new property: whirr.login-user

      if defined, override the default login user with this value.

      1. WHIRR-198.patch
        13 kB
        Adrian Cole
      2. WHIRR-198.patch
        11 kB
        Adrian Cole
      3. WHIRR-198.patch
        11 kB
        Adrian Cole
      4. WHIRR-198.patch
        11 kB
        Andrei Savu
      5. WHIRR-198.patch
        8 kB
        Adrian Cole

        Activity

        Hide
        Andrei Savu added a comment -

        I've just committed this (sorry for the delay). Thanks guys! Adrian, I suggest that in the future we should avoid reopening existing issues and create new ones in order to keep the history clear.

        Show
        Andrei Savu added a comment - I've just committed this (sorry for the delay). Thanks guys! Adrian, I suggest that in the future we should avoid reopening existing issues and create new ones in order to keep the history clear.
        Hide
        Andrei Savu added a comment -

        great! I will also give it a try and commit the patch later today. thanks.

        Show
        Andrei Savu added a comment - great! I will also give it a try and commit the patch later today. thanks.
        Hide
        Sebastian Schoenherr added a comment -

        hi guys, yep it works. great! the only issue was that the class "core/src/main/java/org/jclouds/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java" hasn't been deleted (just the content is deleted in the patch), so I got some compiliation errors, after deleting the class, I was able to compile and run it without errors.

        Show
        Sebastian Schoenherr added a comment - hi guys, yep it works. great! the only issue was that the class "core/src/main/java/org/jclouds/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java" hasn't been deleted (just the content is deleted in the patch), so I got some compiliation errors, after deleting the class, I was able to compile and run it without errors.
        Hide
        Adrian Cole added a comment -

        can you try this now? should completely remove any classpath problems

        Show
        Adrian Cole added a comment - can you try this now? should completely remove any classpath problems
        Hide
        Adrian Cole added a comment -

        this patch works without the classpath ordering problem

        Show
        Adrian Cole added a comment - this patch works without the classpath ordering problem
        Hide
        Adrian Cole added a comment -

        resolving in a more classpath friendly way

        Show
        Adrian Cole added a comment - resolving in a more classpath friendly way
        Hide
        Adrian Cole added a comment -

        looking into it. stand by.

        Show
        Adrian Cole added a comment - looking into it. stand by.
        Hide
        Andrei Savu added a comment -

        Thanks for testing. I've seen a similar problem while working with a private cloud based on Eucalyptus. Adrian could this be a class-path issue? Has something changed in 1.0-beta9b that could affect this patch?

        Show
        Andrei Savu added a comment - Thanks for testing. I've seen a similar problem while working with a private cloud based on Eucalyptus. Adrian could this be a class-path issue? Has something changed in 1.0-beta9b that could affect this patch?
        Hide
        Sebastian Schoenherr added a comment -

        Hi Andrei,
        sorry for my delayed reply. I've just tested this and it worked well for branch-0.4. There is a problem with the current trunk, since the overwritten class "EC2PopulateDefaultLoginCredentialsForImageStrategy" is not called anymore. Could it be a problem with the whirr-classpath? I deleted for test purpoeses the class from the ec2-1.0-beta-9b.jar with the result that the overwritten class is then called and everything works fine. (it's just a guess)
        Cheers,
        Sebastian

        Show
        Sebastian Schoenherr added a comment - Hi Andrei, sorry for my delayed reply. I've just tested this and it worked well for branch-0.4. There is a problem with the current trunk, since the overwritten class "EC2PopulateDefaultLoginCredentialsForImageStrategy" is not called anymore. Could it be a problem with the whirr-classpath? I deleted for test purpoeses the class from the ec2-1.0-beta-9b.jar with the result that the overwritten class is then called and everything works fine. (it's just a guess) Cheers, Sebastian
        Hide
        Andrei Savu added a comment -

        I've just committed this. Thanks Adrian! Sebastian, let me know if the current trunk works for you.

        Show
        Andrei Savu added a comment - I've just committed this. Thanks Adrian! Sebastian, let me know if the current trunk works for you.
        Hide
        Adrian Cole added a comment -

        recut with the latest version of the original code in jclouds

        Show
        Adrian Cole added a comment - recut with the latest version of the original code in jclouds
        Hide
        Adrian Cole added a comment -

        ahh apologies. the patch needs to be recut slightly.
        stand by.

        Show
        Adrian Cole added a comment - ahh apologies. the patch needs to be recut slightly. stand by.
        Hide
        Andrei Savu added a comment -

        I wanted to commit this patch but unfortunately I'm unable to run the integration tests:

        2011-02-19 23:58:08,452 ERROR [org.apache.whirr.cluster.actions.BootstrapClusterAction] (pool-1-thread-1) Unexpected error while starting 2 nodes, minimum 2 nodes for [zookeeper] of cluster zkclustertest
        java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Resource must be an image (for EC2)
        	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
        	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
        	at org.apache.whirr.cluster.actions.BootstrapClusterAction$StartupProcess.waitForOutcomes(BootstrapClusterAction.java:270)
        	at org.apache.whirr.cluster.actions.BootstrapClusterAction$StartupProcess.call(BootstrapClusterAction.java:223)
        	at org.apache.whirr.cluster.actions.BootstrapClusterAction$StartupProcess.call(BootstrapClusterAction.java:184)
        	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        	at java.lang.Thread.run(Thread.java:662)
        Caused by: java.lang.IllegalArgumentException: Resource must be an image (for EC2)
        	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
        	at org.jclouds.ec2.compute.strategy.EC2PopulateDefaultLoginCredentialsForImageStrategy.execute(EC2PopulateDefaultLoginCredentialsForImageStrategy.java:50)
        	at org.jclouds.ec2.compute.functions.CredentialsForInstance.getLoginAccountFor(CredentialsForInstance.java:75)
        	at org.jclouds.ec2.compute.functions.CredentialsForInstance.apply(CredentialsForInstance.java:62)
        	at org.jclouds.ec2.compute.functions.CredentialsForInstance.apply(CredentialsForInstance.java:43)
        	at org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.populateCredentials(EC2CreateNodesInGroupThenAddToSet.java:121)
        	at org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.execute(EC2CreateNodesInGroupThenAddToSet.java:111)
        	at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:215)
        	at org.apache.whirr.cluster.actions.NodeStarter.call(BootstrapClusterAction.java:350)
        	at org.apache.whirr.cluster.actions.NodeStarter.call(BootstrapClusterAction.java:325)
        	... 5 more
        
        Show
        Andrei Savu added a comment - I wanted to commit this patch but unfortunately I'm unable to run the integration tests: 2011-02-19 23:58:08,452 ERROR [org.apache.whirr.cluster.actions.BootstrapClusterAction] (pool-1-thread-1) Unexpected error while starting 2 nodes, minimum 2 nodes for [zookeeper] of cluster zkclustertest java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Resource must be an image ( for EC2) at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at org.apache.whirr.cluster.actions.BootstrapClusterAction$StartupProcess.waitForOutcomes(BootstrapClusterAction.java:270) at org.apache.whirr.cluster.actions.BootstrapClusterAction$StartupProcess.call(BootstrapClusterAction.java:223) at org.apache.whirr.cluster.actions.BootstrapClusterAction$StartupProcess.call(BootstrapClusterAction.java:184) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang. Thread .run( Thread .java:662) Caused by: java.lang.IllegalArgumentException: Resource must be an image ( for EC2) at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88) at org.jclouds.ec2.compute.strategy.EC2PopulateDefaultLoginCredentialsForImageStrategy.execute(EC2PopulateDefaultLoginCredentialsForImageStrategy.java:50) at org.jclouds.ec2.compute.functions.CredentialsForInstance.getLoginAccountFor(CredentialsForInstance.java:75) at org.jclouds.ec2.compute.functions.CredentialsForInstance.apply(CredentialsForInstance.java:62) at org.jclouds.ec2.compute.functions.CredentialsForInstance.apply(CredentialsForInstance.java:43) at org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.populateCredentials(EC2CreateNodesInGroupThenAddToSet.java:121) at org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.execute(EC2CreateNodesInGroupThenAddToSet.java:111) at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:215) at org.apache.whirr.cluster.actions.NodeStarter.call(BootstrapClusterAction.java:350) at org.apache.whirr.cluster.actions.NodeStarter.call(BootstrapClusterAction.java:325) ... 5 more
        Hide
        Adrian Cole added a comment -

        corrected patch to use the package naming currently in jclouds beta-9

        tests good

        Show
        Adrian Cole added a comment - corrected patch to use the package naming currently in jclouds beta-9 tests good
        Hide
        Adrian Cole added a comment -

        corrected package

        Show
        Adrian Cole added a comment - corrected package
        Hide
        Andrei Savu added a comment -

        I've updated the patch: fixed import and updated the configuration guide.

        Show
        Andrei Savu added a comment - I've updated the patch: fixed import and updated the configuration guide.
        Hide
        Adrian Cole added a comment -

        +1

        Show
        Adrian Cole added a comment - +1
        Hide
        Andrei Savu added a comment -

        Adrian, I see no better way of doing this. I believe we should fix the patch(imports and add some documentation) and commit it to the trunk. What do you think?

        Show
        Andrei Savu added a comment - Adrian, I see no better way of doing this. I believe we should fix the patch(imports and add some documentation) and commit it to the trunk. What do you think?
        Hide
        Adrian Cole added a comment -

        Andrei,

        sadly the fix to http://code.google.com/p/jclouds/issues/detail?id=441 is not in beta-9. We still need a bit of validation about how to address this, and may rescope to just managing login-users, as this is typically the problem that people encounter. Care to comment about your favored approach in the above issue?

        Show
        Adrian Cole added a comment - Andrei, sadly the fix to http://code.google.com/p/jclouds/issues/detail?id=441 is not in beta-9. We still need a bit of validation about how to address this, and may rescope to just managing login-users, as this is typically the problem that people encounter. Care to comment about your favored approach in the above issue?
        Hide
        Andrei Savu added a comment -

        Thanks Sebastian for testing the patch. Adrian should we commit this patch (using a system property feels like a hack) or there is a better way of doing this now that jclouds 1.0-beta-9 is out?

        Show
        Andrei Savu added a comment - Thanks Sebastian for testing the patch. Adrian should we commit this patch (using a system property feels like a hack) or there is a better way of doing this now that jclouds 1.0-beta-9 is out?
        Hide
        Sebastian Schoenherr added a comment -

        the patch works fine for whirr 0.3.0 without any changes. For the latest svn version the patch is still necessary and working, just the paths need to be edited (as mentioned above from org.jclouds.aws.ec2 to org.jclouds.ec2), Besides this, it worked for me.

        Show
        Sebastian Schoenherr added a comment - the patch works fine for whirr 0.3.0 without any changes. For the latest svn version the patch is still necessary and working, just the paths need to be edited (as mentioned above from org.jclouds.aws.ec2 to org.jclouds.ec2), Besides this, it worked for me.
        Hide
        Tom White added a comment -

        Glad this helped. Are there any other changes that are needed now we're on jclouds 1.0-beta-9? The comments in the code suggest that the patch could be trimmed.

        Show
        Tom White added a comment - Glad this helped. Are there any other changes that are needed now we're on jclouds 1.0-beta-9? The comments in the code suggest that the patch could be trimmed.
        Hide
        Sebastian Schoenherr added a comment -

        Hi guys,
        I just tried the patch on the latest version from svn. Had to change the import from org.jclouds.aws.ec2 to org.jclouds.ec2 but than it worked! Thanks for the great help!
        Cheers
        Sebastian

        Show
        Sebastian Schoenherr added a comment - Hi guys, I just tried the patch on the latest version from svn. Had to change the import from org.jclouds.aws.ec2 to org.jclouds.ec2 but than it worked! Thanks for the great help! Cheers Sebastian
        Hide
        Andrei Savu added a comment -

        I believe this patch could also incorporate WHIRR-158 by creating new logins. Sounds like a good idea?

        Show
        Andrei Savu added a comment - I believe this patch could also incorporate WHIRR-158 by creating new logins. Sounds like a good idea?
        Hide
        Adrian Cole added a comment -

        patch adds interim support for user-defined login until the following jclouds issue is resolved: http://code.google.com/p/jclouds/issues/detail?id=441

        Show
        Adrian Cole added a comment - patch adds interim support for user-defined login until the following jclouds issue is resolved: http://code.google.com/p/jclouds/issues/detail?id=441

          People

          • Assignee:
            Adrian Cole
            Reporter:
            Adrian Cole
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development