Whirr
  1. Whirr
  2. WHIRR-216

Improve error message if whirr.instance-templates left out of config

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.3.0
    • Fix Version/s: 0.5.0
    • Component/s: cli
    • Labels:
      None

      Description

      When launching a cluster without whirr.instance-templates specified in the config file used the following error message appears. It could be made more user friendly.

      bin/whirr launch-cluster --config ~/cassandra.properties
      Bootstrapping cluster
      Exception in thread "main" java.lang.IndexOutOfBoundsException: index (0) must be less than size (0)
      at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:301)
      at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:280)
      at com.google.common.collect.Iterables.get(Iterables.java:610)
      at org.apache.whirr.cluster.actions.ScriptBasedClusterAction.execute(ScriptBasedClusterAction.java:77)
      at org.apache.whirr.service.Service.launchCluster(Service.java:71)
      at org.apache.whirr.cli.command.LaunchClusterCommand.run(LaunchClusterCommand.java:61)
      at org.apache.whirr.cli.Main.run(Main.java:65)
      at org.apache.whirr.cli.Main.main(Main.java:91)

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        103d 17h 18m 1 Andrei Savu 09/May/11 13:37
        Patch Available Patch Available Resolved Resolved
        3h 25m 1 Tom White 09/May/11 17:02
        Tom White made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Tom White added a comment -

        I've just committed this. Thanks Andrei!

        Show
        Tom White added a comment - I've just committed this. Thanks Andrei!
        Andrei Savu made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Fix Version/s 0.5.0 [ 12316248 ]
        Andrei Savu made changes -
        Assignee Andrei Savu [ savu.andrei ]
        Andrei Savu made changes -
        Field Original Value New Value
        Attachment WHIRR-216.patch [ 12478589 ]
        Hide
        Andrei Savu added a comment -

        I've made instance-templates mandatory and updated the tests.

        Show
        Andrei Savu added a comment - I've made instance-templates mandatory and updated the tests.
        Johan Oskarsson created issue -

          People

          • Assignee:
            Andrei Savu
            Reporter:
            Johan Oskarsson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development