Whirr
  1. Whirr
  2. WHIRR-494

Update the BYON cluster controller to support all the operations the regular controller supports

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: core
    • Labels:

      Description

      I have just realised that the BYON cluster controller is a bit out of sync and needs to be updated. I'm also thinking about defining an abstract base clase (e.g. AbstractClusterController).

      1. WHIRR-494.patch
        3 kB
        Andrei Savu
      2. jclouds-byon-nodes-config-property.patch
        1 kB
        Cosmin Dumitrache
      3. fixing-whirr-494.patch
        3 kB
        Cosmin Dumitrache

        Activity

        Hide
        Cosmin Dumitrache added a comment -

        Refactored the ByonClusterController class. Now there is no need to override launchCluster(). Also, destroyCluster() now calls stopServices().

        Show
        Cosmin Dumitrache added a comment - Refactored the ByonClusterController class. Now there is no need to override launchCluster(). Also, destroyCluster() now calls stopServices().
        Hide
        Cosmin Dumitrache added a comment -

        Here is a very small patch that might also be useful. It is related to this comment.

        Currently you can provide the BYON configuration like this:

        jclouds.byon.endpoint=file:///Users/tom/whirr-byon.yaml

        This change allows you to provide the yaml configuration programmatically like this:

        config.setProperty("jclouds.byon.nodes", stringWithYamlConfig);
        clusterSpec = new ClusterSpec(config);
        cluster = controller.launchCluster(clusterSpec);
        

        It eliminates the need to create a temporary .yaml file when you don't need to.

        Show
        Cosmin Dumitrache added a comment - Here is a very small patch that might also be useful. It is related to this comment . Currently you can provide the BYON configuration like this: jclouds.byon.endpoint=file: ///Users/tom/whirr-byon.yaml This change allows you to provide the yaml configuration programmatically like this: config.setProperty( "jclouds.byon.nodes" , stringWithYamlConfig); clusterSpec = new ClusterSpec(config); cluster = controller.launchCluster(clusterSpec); It eliminates the need to create a temporary .yaml file when you don't need to.
        Hide
        Andrei Savu added a comment -

        Looks good to me. Testing now with virtual box.

        Show
        Andrei Savu added a comment - Looks good to me. Testing now with virtual box.
        Hide
        Andrei Savu added a comment -

        +1 (I've combined the patches)

        Everything seems to be working fine. It would be really useful to have an integration test for this. I will go ahead and commit.

        Show
        Andrei Savu added a comment - +1 (I've combined the patches) Everything seems to be working fine. It would be really useful to have an integration test for this. I will go ahead and commit.
        Hide
        Andrei Savu added a comment -

        Committed to trunk. Thanks Cosmin!

        Show
        Andrei Savu added a comment - Committed to trunk. Thanks Cosmin!
        Hide
        Cosmin Dumitrache added a comment -

        Thanks for the quick response Andrei.

        I will try to make an integration test for this as soon as possible (possibly next week).

        Also, I was recently trying this out and I noticed that destroyCluster() doesn't actually remove the software. That's probably fine if you are running in a cloud VM that will go away when you don't need it anymore but if you are running this on localhost you would probably expect that the software will be uninstalled when you call destroyCluster(). A side effect of this is that if you are doing development on localhost and launch a Zookeeper node, then that will remain installed even after you are done. And because Zookeeper puts a start script in /etc/init.d you end up starting Zookeeper every time you restart your machine.

        What are your thoughts on this?

        Show
        Cosmin Dumitrache added a comment - Thanks for the quick response Andrei. I will try to make an integration test for this as soon as possible (possibly next week). Also, I was recently trying this out and I noticed that destroyCluster() doesn't actually remove the software. That's probably fine if you are running in a cloud VM that will go away when you don't need it anymore but if you are running this on localhost you would probably expect that the software will be uninstalled when you call destroyCluster(). A side effect of this is that if you are doing development on localhost and launch a Zookeeper node, then that will remain installed even after you are done. And because Zookeeper puts a start script in /etc/init.d you end up starting Zookeeper every time you restart your machine. What are your thoughts on this?
        Hide
        Andrei Savu added a comment - - edited

        We have a service uninstall hook you can call. See: ClusterController.cleanupCluster. It makes sense to call that in ByonController.destroyCluster.

        Show
        Andrei Savu added a comment - - edited We have a service uninstall hook you can call. See: ClusterController.cleanupCluster. It makes sense to call that in ByonController.destroyCluster.

          People

          • Assignee:
            Cosmin Dumitrache
            Reporter:
            Andrei Savu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development