"git.arvados.org/arvados.git/sdk/go/arvadosclient"
"git.arvados.org/arvados.git/sdk/go/keepclient"
"git.arvados.org/arvados.git/sdk/go/manifest"
+ "golang.org/x/crypto/ssh"
"golang.org/x/net/context"
dockertypes "github.com/docker/docker/api/types"
arvMountLog *ThrottledLogger
containerWatchdogInterval time.Duration
+
+ gatewayAddress string
+ gatewaySSHConfig *ssh.ServerConfig
+ gatewayAuthSecret string
}
// setupSignals sets up signal handling to gracefully terminate the underlying
return ErrCancelled
}
return runner.DispatcherArvClient.Update("containers", runner.Container.UUID,
- arvadosclient.Dict{"container": arvadosclient.Dict{"state": "Running"}}, nil)
+ arvadosclient.Dict{"container": arvadosclient.Dict{"state": "Running", "gateway_address": runner.gatewayAddress}}, nil)
}
// ContainerToken returns the api_token the container (and any
return 1
}
+ cr.gatewayAuthSecret = os.Getenv("GatewayAuthSecret")
+ os.Unsetenv("GatewayAuthSecret")
+ err = cr.startGatewayServer()
+ if err != nil {
+ log.Printf("error starting gateway server: %s", err)
+ return 1
+ }
+
parentTemp, tmperr := cr.MkTempDir("", "crunch-run."+containerID+".")
if tmperr != nil {
log.Printf("%s: %v", containerID, tmperr)