[ARVADOS] created: 1.3.0-425-g5cbefa0d8

Git user git at public.curoverse.com
Mon Mar 4 15:49:04 EST 2019


        at  5cbefa0d8d207ad1000cf35eb9031b059c0aa2c8 (commit)


commit 5cbefa0d8d207ad1000cf35eb9031b059c0aa2c8
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Mon Mar 4 15:45:36 2019 -0500

    14911: Fix initialization order.
    
    Nil az.ctx was being passed to ListKeys(), causing panic.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/lib/cloud/azure/azure.go b/lib/cloud/azure/azure.go
index b88962714..4de15ca46 100644
--- a/lib/cloud/azure/azure.go
+++ b/lib/cloud/azure/azure.go
@@ -229,6 +229,8 @@ func newAzureInstanceSet(config json.RawMessage, dispatcherID cloud.InstanceSetI
 }
 
 func (az *azureInstanceSet) setup(azcfg azureInstanceSetConfig, dispatcherID string) (err error) {
+	az.ctx, az.stopFunc = context.WithCancel(context.Background())
+
 	az.azconfig = azcfg
 	vmClient := compute.NewVirtualMachinesClient(az.azconfig.SubscriptionID)
 	netClient := network.NewInterfacesClient(az.azconfig.SubscriptionID)
@@ -276,7 +278,6 @@ func (az *azureInstanceSet) setup(azcfg azureInstanceSetConfig, dispatcherID str
 	az.dispatcherID = dispatcherID
 	az.namePrefix = fmt.Sprintf("compute-%s-", az.dispatcherID)
 
-	az.ctx, az.stopFunc = context.WithCancel(context.Background())
 	go func() {
 		az.stopWg.Add(1)
 		defer az.stopWg.Done()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list