Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1001

Add Google Compute preemptible support

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.9.2, 2.0.0
    • Component/s: jclouds-drivers
    • Labels:
      None

      Description

      The Google Compute provider should support preemptible instances. Adding this should be fairly straightforward.

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 962980cd9d22fc2e7b54cab45a4d17550d1fb137 in jclouds's branch refs/heads/master from Michael Wilson
        [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=962980c ]

        JCLOUDS-1001. Add preemptible support to the Google Compute provider.

        The Google Compute provider should support preemptible instances.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 962980cd9d22fc2e7b54cab45a4d17550d1fb137 in jclouds's branch refs/heads/master from Michael Wilson [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=962980c ] JCLOUDS-1001 . Add preemptible support to the Google Compute provider. The Google Compute provider should support preemptible instances.
        Hide
        andrewp Andrew Phillips added a comment -

        Michael Wilson: Would it make sense to also backport this to the 1.9.x branch? It doesn't seem to be a breaking change, as far as I can see from a brief glance at the code...

        /cc Ignasi Barrera

        Show
        andrewp Andrew Phillips added a comment - Michael Wilson : Would it make sense to also backport this to the 1.9.x branch? It doesn't seem to be a breaking change, as far as I can see from a brief glance at the code... /cc Ignasi Barrera
        Hide
        mike.wilson Michael Wilson added a comment - - edited

        I'm +1 to that. It would make things easier on my end as well – not sure if that's my call to make, however.

        Show
        mike.wilson Michael Wilson added a comment - - edited I'm +1 to that. It would make things easier on my end as well – not sure if that's my call to make, however.
        Hide
        mike.wilson Michael Wilson added a comment -

        I should add that our GCE spend is a lot higher than it needs to be, and getting preemptible instances in sooner would allow us to seriously lower our monthly GCE costs.

        Show
        mike.wilson Michael Wilson added a comment - I should add that our GCE spend is a lot higher than it needs to be, and getting preemptible instances in sooner would allow us to seriously lower our monthly GCE costs.
        Hide
        andrewp Andrew Phillips added a comment -

        Thanks for the additional details, Michael Wilson! See

        https://github.com/jclouds/jclouds-labs-google/pull/169

        One of the wrinkles of the backport here is that it's against a different repo, since the Google Cloud provider has only been promoted to core on the master branch. As long as you're OK with a different group ID, you should be able to get this via the 1.9.2 version if the PR is merged.

        I think we still need to figure out how to handle the breaking change to InstanceApi.setScheduling, i.e. whether that's OK in a minor release.

        /cc Ignasi Barrera

        Show
        andrewp Andrew Phillips added a comment - Thanks for the additional details, Michael Wilson ! See https://github.com/jclouds/jclouds-labs-google/pull/169 One of the wrinkles of the backport here is that it's against a different repo, since the Google Cloud provider has only been promoted to core on the master branch. As long as you're OK with a different group ID, you should be able to get this via the 1.9.2 version if the PR is merged. I think we still need to figure out how to handle the breaking change to InstanceApi.setScheduling, i.e. whether that's OK in a minor release. /cc Ignasi Barrera
        Show
        andrewp Andrew Phillips added a comment - Michael Wilson : Could you take the code from the PR for a spin to see if would work for you? https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/476/org.apache.jclouds.labs$google-compute-engine/artifact/org.apache.jclouds.labs/google-compute-engine/1.9.2-SNAPSHOT/google-compute-engine-1.9.2-SNAPSHOT.jar Thanks!
        Hide
        mike.wilson Michael Wilson added a comment -

        Will do! My plate's a little full today, but if not today I'll give this a shot tomorrow.

        Show
        mike.wilson Michael Wilson added a comment - Will do! My plate's a little full today, but if not today I'll give this a shot tomorrow.
        Hide
        mike.wilson Michael Wilson added a comment - - edited

        All, I've taken a look at this. It looks like it's able to successfully create a preembtible VM without issue. I've got a few other live test failures, but I suspect those are related to my own environment setup. I'll update this again when the live tests fully complete, but I wanted to give a status update while I was waiting.

        Edit:

        Here are the failed live tests:

        Failed tests:
          TargetInstanceApiLiveTest.testInsertTargetInstance:44 » HttpResponse command: ...
          UrlMapApiLiveTest.testInsertUrlMap:59 » IllegalState {
         "error": {
          "errors":...
          GlobalForwardingRuleApiLiveTest.testGetGlobalForwardingRule:91->assertGlobalForwardingRuleEquals:133 expected [null] but found []
          TargetInstanceApiLiveTest.testListTargetInstance:60 » NoSuchElement
          TargetInstanceApiLiveTest.testDeleteTargetInstance:68->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:85 » NullPointer
          UrlMapApiLiveTest.testDeleteUrlMap:193->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:85 » NullPointer
          InstanceApiLiveTest.testGetInstance:134->assertInstanceEquals:327 Lists differ at element [0]: foo != bar expected [foo] but found [bar]
          InstanceApiLiveTest.testListInstance:290->assertInstanceEquals:327 Lists differ at element [0]: foo != bar expected [foo] but found [bar]
          InstanceApiLiveTest.testDetachDiskFromInstance:272->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:86 » IllegalState
        

        None of these look related to the PR, so I'd say it's good to go.

        Show
        mike.wilson Michael Wilson added a comment - - edited All, I've taken a look at this. It looks like it's able to successfully create a preembtible VM without issue. I've got a few other live test failures, but I suspect those are related to my own environment setup. I'll update this again when the live tests fully complete, but I wanted to give a status update while I was waiting. Edit: Here are the failed live tests: Failed tests: TargetInstanceApiLiveTest.testInsertTargetInstance:44 » HttpResponse command: ... UrlMapApiLiveTest.testInsertUrlMap:59 » IllegalState { "error": { "errors":... GlobalForwardingRuleApiLiveTest.testGetGlobalForwardingRule:91->assertGlobalForwardingRuleEquals:133 expected [null] but found [] TargetInstanceApiLiveTest.testListTargetInstance:60 » NoSuchElement TargetInstanceApiLiveTest.testDeleteTargetInstance:68->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:85 » NullPointer UrlMapApiLiveTest.testDeleteUrlMap:193->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:85 » NullPointer InstanceApiLiveTest.testGetInstance:134->assertInstanceEquals:327 Lists differ at element [0]: foo != bar expected [foo] but found [bar] InstanceApiLiveTest.testListInstance:290->assertInstanceEquals:327 Lists differ at element [0]: foo != bar expected [foo] but found [bar] InstanceApiLiveTest.testDetachDiskFromInstance:272->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:86 » IllegalState None of these look related to the PR, so I'd say it's good to go.
        Hide
        andrewp Andrew Phillips added a comment -

        > All, I've taken a look at this. It looks like it's able to successfully create a preembtible VM without issue.

        Thanks, Michael Wilson! Just checking with Ignasi Barrera about the PR and then will hopefully get this merged.

        An advance happy holidays!

        Show
        andrewp Andrew Phillips added a comment - > All, I've taken a look at this. It looks like it's able to successfully create a preembtible VM without issue. Thanks, Michael Wilson ! Just checking with Ignasi Barrera about the PR and then will hopefully get this merged. An advance happy holidays!
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1f6f7f06dfd47797bc97e0cdff56352ef87bc413 in jclouds-labs-google's branch refs/heads/1.9.x from Michael Wilson
        [ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-google.git;h=1f6f7f0 ]

        JCLOUDS-1001: Adding preemptible support to the Google Compute provider

        1.9.x backport of https://github.com/jclouds/jclouds/commit/962980cd9d22fc2e7b54cab45a4d17550d1fb137

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1f6f7f06dfd47797bc97e0cdff56352ef87bc413 in jclouds-labs-google's branch refs/heads/1.9.x from Michael Wilson [ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-google.git;h=1f6f7f0 ] JCLOUDS-1001 : Adding preemptible support to the Google Compute provider 1.9.x backport of https://github.com/jclouds/jclouds/commit/962980cd9d22fc2e7b54cab45a4d17550d1fb137
        Hide
        andrewp Andrew Phillips added a comment -

        Backported to 1.9.x. Thanks, Michael Wilson and Ignasi Barrera!

        Show
        andrewp Andrew Phillips added a comment - Backported to 1.9.x. Thanks, Michael Wilson and Ignasi Barrera !

          People

          • Assignee:
            Unassigned
            Reporter:
            mike.wilson Michael Wilson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development