• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • os.arch: amd64
      os.name: Linux
      os.version: 4.4.111+
      java.version: 1.8.0_151
      java.runtime.name: OpenJDK Runtime Environment
      Google Compute Engine Plugin: 1.0.4

      Hi,

      I am using the Google Compute Engine Plugin to spin up jenkins agent on-demand.

       

      However, one of my instance configurations requires a GPU attached and it fails to create the google compute instance.

       

      GCE returns a 400 badRequest on instance creation with the following message: "Instances with guest accelerators do not support live migration.". I attached the stacktrace I retrieved from the jenkins logs to this issue.

       

      I believe the issue is that OnHostMaintenance should be set to TERMINATE if accelerators are attached. The default value for OnHostMaintenance is MIGRATE but this is not supported when an accelerator is attached: https://github.com/jenkinsci/google-compute-engine-plugin/blob/f1559b61917f8960011d81e762a821779fd56a27/src/main/java/com/google/jenkins/plugins/computeengine/InstanceConfiguration.java#L303

       

      Thank you

       

          [JENKINS-52708] Fail to create agents with GPU attached

          Dmitry Kozlov added a comment -

          Dmitry Kozlov added a comment - As workaround you can use following https://github.com/dkozlov/google-compute-engine-plugin/commit/7b7af84ee0a2cf177b2f9be8e65c656f45d964a4

          Rachel Yen added a comment -

          Thanks for pointing this out; I'll definitely have to look into this. 

          Rachel Yen added a comment - Thanks for pointing this out; I'll definitely have to look into this. 

          Karol Lassak added a comment - - edited

          GPUs can be attached (without modifying plugin code) by using templates functionality introduced in 1.0.8.

          Karol Lassak added a comment - - edited GPUs can be attached (without modifying plugin code) by using templates functionality introduced in 1.0.8.

          Rachel Yen added a comment -

          Closing as templates will fix this issue.

           

          If you need to re-open, please use the following as we are migrating off JIRA:

          https://github.com/jenkinsci/google-compute-engine-plugin/issues

          Rachel Yen added a comment - Closing as templates will fix this issue.   If you need to re-open, please use the following as we are migrating off JIRA: https://github.com/jenkinsci/google-compute-engine-plugin/issues

            zombiemoose Rachel Yen
            rosbo Vincent Roseberry
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: