X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cd4a811b896da640e5b8ddca7e515f19085932d4..89fa46a357a5d5fc39721a3ddbe8e857a101eeef:/tools/sync-groups/sync-groups.go diff --git a/tools/sync-groups/sync-groups.go b/tools/sync-groups/sync-groups.go index 4d03ba89e3..24e838c8f1 100644 --- a/tools/sync-groups/sync-groups.go +++ b/tools/sync-groups/sync-groups.go @@ -275,7 +275,13 @@ func GetConfig() (config ConfigParams, err error) { if !u.IsActive || !u.IsAdmin { return config, fmt.Errorf("current user (%s) is not an active admin user", u.UUID) } - config.SysUserUUID = u.UUID[:12] + "000000000000000" + + var ac struct{ ClusterID string } + err = config.Client.RequestAndDecode(&ac, "GET", "arvados/v1/config", nil, nil) + if err != nil { + return config, fmt.Errorf("error getting the exported config: %s", err) + } + config.SysUserUUID = ac.ClusterID + "-tpzed-000000000000000" // Set up remote groups' parent if err = SetParentGroup(&config); err != nil { @@ -432,7 +438,7 @@ func ProcessFile( "group_class": "role", } if e := CreateGroup(cfg, &newGroup, groupData); e != nil { - err = fmt.Errorf("error creating group named %q: %s", groupName, err) + err = fmt.Errorf("error creating group named %q: %s", groupName, e) return } // Update cached group data