[ARVADOS] updated: 1.2.0-43-g6b57e3907

Git user git at public.curoverse.com
Fri Aug 31 15:13:23 EDT 2018


Summary of changes:
 lib/dispatchcloud/azure.go      |  4 ++--
 lib/dispatchcloud/azure_test.go | 17 +++++++++++++----
 2 files changed, 15 insertions(+), 6 deletions(-)

       via  6b57e3907224b687798369d0aaa61096bee34984 (commit)
      from  70d3ebeed39405ea3ae8a30deb861101be6d6baf (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 6b57e3907224b687798369d0aaa61096bee34984
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Fri Aug 31 15:11:58 2018 -0400

    13964: ssh key verification wip
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/lib/dispatchcloud/azure.go b/lib/dispatchcloud/azure.go
index c68a41809..563246ece 100644
--- a/lib/dispatchcloud/azure.go
+++ b/lib/dispatchcloud/azure.go
@@ -261,14 +261,14 @@ func (az *AzureProvider) Create(ctx context.Context,
 
 	timestamp := time.Now().Format(time.RFC3339Nano)
 
-	newTags["instance-type"] = instanceType.Name
-
 	tags := make(map[string]*string)
 	tags["created-at"] = &timestamp
 	for k, v := range newTags {
 		tags["dispatch-"+k] = &v
 	}
 
+	tags["dispatch-instance-type"] = &instanceType.Name
+
 	nicParameters := network.Interface{
 		Location: &az.azconfig.Location,
 		Tags:     tags,
diff --git a/lib/dispatchcloud/azure_test.go b/lib/dispatchcloud/azure_test.go
index 2a8cc186c..29356f1f7 100644
--- a/lib/dispatchcloud/azure_test.go
+++ b/lib/dispatchcloud/azure_test.go
@@ -126,13 +126,14 @@ func (*AzureProviderSuite) TestCreate(c *check.C) {
 
 	inst, err := ap.Create(context.Background(),
 		cluster.InstanceTypes["tiny"],
-		img, map[string]string{"instance-type": "tiny",
+		img, map[string]string{
 			"node-token": nodetoken},
 		pk)
 
 	c.Assert(err, check.IsNil)
 
-	log.Printf("Result %v %v", inst.String(), inst.Address())
+	tg, _ := inst.Tags(context.Background())
+	log.Printf("Result %v %v %v", inst.String(), inst.Address(), tg)
 
 }
 
@@ -266,7 +267,7 @@ func (*AzureProviderSuite) TestSSH(c *check.C) {
 
 	if len(l) > 0 {
 
-		sshclient, err := SetupSSHClient(c, l[0].Address()+":2222")
+		sshclient, err := SetupSSHClient(c, l[0])
 		c.Assert(err, check.IsNil)
 
 		sess, err := sshclient.NewSession()
@@ -281,7 +282,8 @@ func (*AzureProviderSuite) TestSSH(c *check.C) {
 	}
 }
 
-func SetupSSHClient(c *check.C, addr string) (*ssh.Client, error) {
+func SetupSSHClient(c *check.C, inst Instance) (*ssh.Client, error) {
+	addr := inst.Address() + ":2222"
 	if addr == "" {
 		return nil, errors.New("instance has no address")
 	}
@@ -314,6 +316,13 @@ func SetupSSHClient(c *check.C, addr string) (*ssh.Client, error) {
 		return nil, errors.New("BUG: key was never provided to HostKeyCallback")
 	}
 
+	log.Printf("receivedKey %v", receivedKey)
+	log.Printf("fingerprint %v", ssh.FingerprintSHA256(receivedKey))
+	tags, err := inst.Tags(context.Background())
+	c.Assert(err, check.IsNil)
+
+	log.Printf("ssh-pubkey %q", tags["ssh-pubkey"])
+
 	/*if wkr.publicKey == nil || !bytes.Equal(wkr.publicKey.Marshal(), receivedKey.Marshal()) {
 		err = wkr.instance.VerifyPublicKey(receivedKey, client)
 		if err != nil {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list