Whirr
  1. Whirr
  2. WHIRR-399

Move common script setup and script execution fork/join outside of ConfigureClusterAction and DestroyClusterAction

    Details

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

      Description

      The script setup and fork/join execution code in ConfigureClusterAction and in DestroyClusterAction is nearly similar. BootstrapClusterAction may also share some similarities.
      The common code should be extracted elsewhere.

      1. WHIRR-399.patch
        20 kB
        David Alves

        Issue Links

          Activity

          Hide
          David Alves added a comment -

          This patch depends on the patch on WHIRR-398.

          All script execution logic is moved from Configure/Destroy cluster actions to ScriptBasedCluster actions.

          This is already a major reduction in LOC for configure and destroy but I'm still looking into bootstrap (its different enough that it is not trivial to extract common code).

          Unit tests pass.

          Show
          David Alves added a comment - This patch depends on the patch on WHIRR-398 . All script execution logic is moved from Configure/Destroy cluster actions to ScriptBasedCluster actions. This is already a major reduction in LOC for configure and destroy but I'm still looking into bootstrap (its different enough that it is not trivial to extract common code). Unit tests pass.
          Hide
          David Alves added a comment -

          Ok, after looking into it for a while I've given up on extracting common code from BootstrapClusterAction.
          This patch should make it trivial to add new phases (start/stop) etc.

          Please review!

          Show
          David Alves added a comment - Ok, after looking into it for a while I've given up on extracting common code from BootstrapClusterAction. This patch should make it trivial to add new phases (start/stop) etc. Please review!
          Hide
          Andrei Savu added a comment -

          +1 nice cleanup. This is going to be really useful for WHIRR-421. Now running integration tests.

          Show
          Andrei Savu added a comment - +1 nice cleanup. This is going to be really useful for WHIRR-421 . Now running integration tests.
          Hide
          Andrei Savu added a comment -

          Committed. Seems to be working fine on cloudservers-us & aws-ec2 (zookeeper integration tests). Thanks David!

          Show
          Andrei Savu added a comment - Committed. Seems to be working fine on cloudservers-us & aws-ec2 (zookeeper integration tests). Thanks David!
          Hide
          Andrei Savu added a comment -

          Marking the issues as fixed for 0.7.0.

          Show
          Andrei Savu added a comment - Marking the issues as fixed for 0.7.0.

            People

            • Assignee:
              David Alves
              Reporter:
              David Alves
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development