[ARVADOS] updated: 1.3.0-399-gc82bd1f1c

Git user git at public.curoverse.com
Thu Feb 28 13:07:13 EST 2019


Summary of changes:
 lib/cloud/ec2/ec2.go        |  4 ++--
 lib/cloud/ec2/ec2_test.go   | 16 ++++++++--------
 lib/dispatchcloud/driver.go |  2 ++
 sdk/go/arvados/config.go    | 16 ++++++++--------
 4 files changed, 20 insertions(+), 18 deletions(-)

       via  c82bd1f1c861beef92e317d5ce11136f4e4179a1 (commit)
      from  69f07756764e4722084aec1a7f9bcd005d4b1d04 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c82bd1f1c861beef92e317d5ce11136f4e4179a1
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Feb 28 13:05:57 2019 -0500

    14291: Adjust ExtraScratch (int) to AttachScratch (bool)
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/lib/cloud/ec2/ec2.go b/lib/cloud/ec2/ec2.go
index 9b75abe09..2a0a2ba76 100644
--- a/lib/cloud/ec2/ec2.go
+++ b/lib/cloud/ec2/ec2.go
@@ -129,12 +129,12 @@ func (instanceSet *ec2InstanceSet) Create(
 			}},
 	}
 
-	if instanceType.ExtraScratch > 0 {
+	if instanceType.AttachScratch {
 		rii.BlockDeviceMappings = []*ec2.BlockDeviceMapping{&ec2.BlockDeviceMapping{
 			DeviceName: aws.String("/dev/xvdt"),
 			Ebs: &ec2.EbsBlockDevice{
 				DeleteOnTermination: aws.Bool(true),
-				VolumeSize:          aws.Int64((int64(instanceType.ExtraScratch) / 1000000000) + 1),
+				VolumeSize:          aws.Int64((int64(instanceType.Scratch) / 1000000000) + 1),
 				VolumeType:          aws.String("gp2"),
 			}}}
 	}
diff --git a/lib/cloud/ec2/ec2_test.go b/lib/cloud/ec2/ec2_test.go
index 868de0956..f5352d121 100644
--- a/lib/cloud/ec2/ec2_test.go
+++ b/lib/cloud/ec2/ec2_test.go
@@ -94,14 +94,14 @@ func GetInstanceSet() (cloud.InstanceSet, cloud.ImageID, arvados.Cluster, error)
 				Preemptible:  false,
 			},
 			"tiny-with-extra-scratch": arvados.InstanceType{
-				Name:         "tiny",
-				ProviderType: "t2.micro",
-				VCPUs:        1,
-				RAM:          4000000000,
-				Scratch:      10000000000,
-				ExtraScratch: 20000000000,
-				Price:        .02,
-				Preemptible:  false,
+				Name:          "tiny",
+				ProviderType:  "t2.micro",
+				VCPUs:         1,
+				RAM:           4000000000,
+				Scratch:       20000000000,
+				Price:         .02,
+				Preemptible:   false,
+				AttachScratch: true,
 			},
 			"tiny-preemptible": arvados.InstanceType{
 				Name:         "tiny",
diff --git a/lib/dispatchcloud/driver.go b/lib/dispatchcloud/driver.go
index 2ac69e04c..0343f85b9 100644
--- a/lib/dispatchcloud/driver.go
+++ b/lib/dispatchcloud/driver.go
@@ -9,12 +9,14 @@ import (
 
 	"git.curoverse.com/arvados.git/lib/cloud"
 	"git.curoverse.com/arvados.git/lib/cloud/azure"
+	"git.curoverse.com/arvados.git/lib/cloud/ec2"
 	"git.curoverse.com/arvados.git/sdk/go/arvados"
 	"github.com/sirupsen/logrus"
 )
 
 var drivers = map[string]cloud.Driver{
 	"azure": azure.Driver,
+	"ec2":   ec2.Driver,
 }
 
 func newInstanceSet(cluster *arvados.Cluster, setID cloud.InstanceSetID, logger logrus.FieldLogger) (cloud.InstanceSet, error) {
diff --git a/sdk/go/arvados/config.go b/sdk/go/arvados/config.go
index 5f6235cf0..fddf5100a 100644
--- a/sdk/go/arvados/config.go
+++ b/sdk/go/arvados/config.go
@@ -94,14 +94,14 @@ type RemoteCluster struct {
 }
 
 type InstanceType struct {
-	Name         string
-	ProviderType string
-	VCPUs        int
-	RAM          ByteSize
-	Scratch      ByteSize
-	ExtraScratch ByteSize
-	Price        float64
-	Preemptible  bool
+	Name          string
+	ProviderType  string
+	VCPUs         int
+	RAM           ByteSize
+	Scratch       ByteSize
+	Price         float64
+	Preemptible   bool
+	AttachScratch bool
 }
 
 type Dispatch struct {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list