[ARVADOS] updated: 1.3.0-1242-g60df74801

Git user git at public.curoverse.com
Wed Jul 3 18:26:29 UTC 2019


Summary of changes:
 lib/cloud/cloudtest/cmd.go    | 12 +-----------
 lib/cloud/cloudtest/tester.go | 21 +++++++++++----------
 2 files changed, 12 insertions(+), 21 deletions(-)

       via  60df74801fe09eaf4f1c845632f6a4e494ba4372 (commit)
       via  d1fe3b40a1d55b83980584252cbc919cac4a09d4 (commit)
       via  6056ef74aca95f22b39c1ccafa3fd406d6be9d4f (commit)
      from  76f619546b7e0e44106457d30730c92a814a9e50 (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 60df74801fe09eaf4f1c845632f6a4e494ba4372
Merge: 76f619546 d1fe3b40a
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Wed Jul 3 14:26:15 2019 -0400

    Merge branch '15026-cloudtest'
    
    closes #15026
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>


commit d1fe3b40a1d55b83980584252cbc919cac4a09d4
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Wed Jul 3 14:24:49 2019 -0400

    15026: Fix infinite loop in -destroy-existing.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/lib/cloud/cloudtest/tester.go b/lib/cloud/cloudtest/tester.go
index adc57803f..ad3f70f12 100644
--- a/lib/cloud/cloudtest/tester.go
+++ b/lib/cloud/cloudtest/tester.go
@@ -69,17 +69,18 @@ func (t *tester) Run() bool {
 		return false
 	}
 
-	// Don't send the driver any filters the first time we get the
-	// instance list. This way we can log an instance count
-	// (N=...)  that includes all instances in this service
-	// account, even if they don't have the same InstanceSetID.
-	insts, err := t.getInstances(nil)
-	if err != nil {
-		t.Logger.WithError(err).Info("error getting initial list of instances")
-		return false
-	}
-
 	for {
+		// Don't send the driver any filters when getting the
+		// initial instance list. This way we can log an
+		// instance count (N=...)  that includes all instances
+		// in this service account, even if they don't have
+		// the same InstanceSetID.
+		insts, err := t.getInstances(nil)
+		if err != nil {
+			t.Logger.WithError(err).Info("error getting list of instances")
+			return false
+		}
+
 		foundExisting := false
 		for _, i := range insts {
 			if i.Tags()[t.TagKeyPrefix+"InstanceSetID"] != string(t.SetID) {

commit 6056ef74aca95f22b39c1ccafa3fd406d6be9d4f
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Wed Jul 3 14:23:59 2019 -0400

    15026: Avoid special chars in default instanceSetID.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/lib/cloud/cloudtest/cmd.go b/lib/cloud/cloudtest/cmd.go
index 1f94ea6da..35a78695f 100644
--- a/lib/cloud/cloudtest/cmd.go
+++ b/lib/cloud/cloudtest/cmd.go
@@ -11,7 +11,6 @@ import (
 	"fmt"
 	"io"
 	"os"
-	"os/user"
 
 	"git.curoverse.com/arvados.git/lib/cloud"
 	"git.curoverse.com/arvados.git/lib/config"
@@ -36,7 +35,7 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s
 	flags := flag.NewFlagSet("", flag.ContinueOnError)
 	flags.SetOutput(stderr)
 	configFile := flags.String("config", arvados.DefaultConfigFile, "Site configuration `file`")
-	instanceSetID := flags.String("instance-set-id", defaultInstanceSetID(), "InstanceSetID tag `value` to use on the test instance")
+	instanceSetID := flags.String("instance-set-id", "zzzzz-zzzzz-zzzzzzcloudtest", "InstanceSetID tag `value` to use on the test instance")
 	imageID := flags.String("image-id", "", "Image ID to use when creating the test instance (if empty, use cluster config)")
 	instanceType := flags.String("instance-type", "", "Instance type to create (if empty, use cheapest type in config)")
 	destroyExisting := flags.Bool("destroy-existing", false, "Destroy any existing instances tagged with our InstanceSetID, instead of erroring out")
@@ -122,15 +121,6 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s
 	return 0
 }
 
-func defaultInstanceSetID() string {
-	username := ""
-	if u, err := user.Current(); err == nil {
-		username = u.Username
-	}
-	hostname, _ := os.Hostname()
-	return fmt.Sprintf("cloudtest-%s@%s", username, hostname)
-}
-
 // Return the named instance type, or the cheapest type if name=="".
 func chooseInstanceType(cluster *arvados.Cluster, name string) (arvados.InstanceType, error) {
 	if len(cluster.InstanceTypes) == 0 {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list