[ARVADOS] updated: 2.1.0-240-g304fe1f76

Git user git at public.arvados.org
Wed Dec 23 21:40:53 UTC 2020


Summary of changes:
 services/login-sync/bin/arvados-login-sync | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

       via  304fe1f76d1a8bc27011c65c5dfa61ae5a6f1351 (commit)
      from  4f2e950d93c4969a70587d654bb147e1434f7e0e (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 304fe1f76d1a8bc27011c65c5dfa61ae5a6f1351
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Dec 23 16:39:51 2020 -0500

    Why doesn't this work?
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/login-sync/bin/arvados-login-sync b/services/login-sync/bin/arvados-login-sync
index ef1fa55d0..a9bff0546 100755
--- a/services/login-sync/bin/arvados-login-sync
+++ b/services/login-sync/bin/arvados-login-sync
@@ -31,6 +31,9 @@ keys = ''
 
 begin
   arv = Arvados.new({ :suppress_ssl_warnings => false })
+  logincluster_arv = Arvados.new({ :api_host => (ENV['LOGINCLUSTER_ARVADOS_API_HOST'] || ENV['ARVADOS_API_HOST']),
+                                   :api_token => (ENV['LOGINCLUSTER_ARVADOS_API_TOKEN'] || ENV['ARVADOS_API_TOKEN']),
+                      :suppress_ssl_warnings => false })
 
   vm_uuid = ENV['ARVADOS_VIRTUAL_MACHINE_UUID']
 
@@ -101,10 +104,6 @@ begin
   end
   Etc.endgrent()
 
-  arv = Arvados.new({ :api_host => ENV['LOGINCLUSTER_ARVADOS_API_HOST'] || ENV['ARVADOS_API_HOST'],
-                      :api_token => ENV['LOGINCLUSTER_ARVADOS_API_TOKEN'] || ENV['ARVADOS_API_TOKEN'],
-                      :suppress_ssl_warnings => false })
-
   logins.each do |l|
     next if seen[l[:username]]
     seen[l[:username]] = true
@@ -194,7 +193,7 @@ begin
 
     begin
       if !File.exist?(tokenfile)
-        user_token = make_token_arv.api_client_authorization.create(api_client_authorization: {owner_uuid: l[:user_uuid], api_client_id: 0})
+        user_token = logincluster_arv.api_client_authorization.create(api_client_authorization: {owner_uuid: l[:user_uuid], api_client_id: 0})
         f = File.new(tokenfile, 'w')
         f.write("ARVADOS_API_HOST=#{ENV['ARVADOS_API_HOST']}\n")
         f.write("ARVADOS_API_TOKEN=v2/#{user_token[:uuid]}/#{user_token[:api_token]}\n")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list