[ARVADOS] created: 1.1.2-117-g64fd40c

Git user git at public.curoverse.com
Thu Jan 25 14:13:56 EST 2018


        at  64fd40c237c627d481cdf73723fd171572057def (commit)


commit 64fd40c237c627d481cdf73723fd171572057def
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Thu Jan 25 15:32:56 2018 -0300

    12758: Skip non-local users.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/tools/sync-groups/sync-groups.go b/tools/sync-groups/sync-groups.go
index ebc40b1..265fc6a 100644
--- a/tools/sync-groups/sync-groups.go
+++ b/tools/sync-groups/sync-groups.go
@@ -298,8 +298,16 @@ func doMain(cfg *ConfigParams) error {
 		return fmt.Errorf("error getting user list: %s", err)
 	}
 	log.Printf("Found %d users", len(results))
+	uuidPrefix := cfg.SysUserUUID[0:5]
 	for _, item := range results {
 		u := item.(arvados.User)
+		// Skip users that aren't local
+		if u.UUID[0:5] != uuidPrefix {
+			if cfg.Verbose {
+				log.Printf("Skipping non-local user %q (%s)", u.Username, u.UUID)
+			}
+			continue
+		}
 		allUsers[u.UUID] = u
 		uID, err := GetUserID(u, cfg.UserID)
 		if err != nil {
@@ -307,7 +315,7 @@ func doMain(cfg *ConfigParams) error {
 		}
 		userIDToUUID[uID] = u.UUID
 		if cfg.Verbose {
-			log.Printf("Seen user %q (%s)", u.Username, u.Email)
+			log.Printf("Seen user %q (%s)", u.Username, u.UUID)
 		}
 	}
 
@@ -317,6 +325,11 @@ func doMain(cfg *ConfigParams) error {
 		return err
 	}
 	log.Printf("Found %d remote groups", len(remoteGroups))
+	if cfg.Verbose {
+		for groupUUID := range remoteGroups {
+			log.Printf("- Group %q: %d users", remoteGroups[groupUUID].Group.Name, len(remoteGroups[groupUUID].PreviousMembers))
+		}
+	}
 
 	membershipsRemoved := 0
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list