16343: Fix handling of local CR creation when LoginCluster is used.
authorTom Clegg <tom@tomclegg.ca>
Wed, 22 Apr 2020 20:50:06 +0000 (16:50 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 8 Jun 2020 18:58:18 +0000 (14:58 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

lib/controller/fed_containers.go

index a923f757f2eb61afc29d27ee18bfbd42a27a6c1c..c62cea1168eb29c212ad5eefdd7a9d58dc609f8c 100644 (file)
@@ -42,13 +42,11 @@ func remoteContainerRequestCreate(
                return true
        }
 
-       if *clusterId == "" {
-               *clusterId = h.handler.Cluster.ClusterID
-       }
-
-       if strings.HasPrefix(currentUser.Authorization.UUID, h.handler.Cluster.ClusterID) &&
-               *clusterId == h.handler.Cluster.ClusterID {
-               // local user submitting container request to local cluster
+       if *clusterId == "" || *clusterId == h.handler.Cluster.ClusterID {
+               // Submitting container request to local cluster. No
+               // need to set a runtime_token (rails api will create
+               // one when the container runs) or do a remote cluster
+               // request.
                return false
        }