From cc9052ef51a3b1e21ea665ed736b389f7d22d88f Mon Sep 17 00:00:00 2001 From: Adam Carruthers Date: Mon, 2 Apr 2018 09:39:09 -0700 Subject: [PATCH 1/3] Add fix for incorrect SSH key validation on CloudMC's end --- cloudca.go | 5 +++++ glide.lock | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cloudca.go b/cloudca.go index a6a18ef..78826e2 100644 --- a/cloudca.go +++ b/cloudca.go @@ -372,6 +372,11 @@ func (d *Driver) Create() error { return err } + // !! Workaround for MC-7431. + key = strings.TrimSpace(key) + key += " docker-machine-workaround" + // !! End workaround for MC-7431. + instanceToCreate := cloudca.Instance{ Name: d.MachineName, ComputeOfferingId: d.ComputeOfferingId, diff --git a/glide.lock b/glide.lock index 599f397..2f5ce8c 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ hash: e6b7f090140e81c7f6928331734c4dff8a3b3c3287f2f7973fab6f4eae92631c -updated: 2017-05-24T16:45:21.478919549-04:00 +updated: 2018-04-02T08:57:37.070483-07:00 imports: - name: github.com/cloud-ca/go-cloudca version: 21039f5a4375cdebddde9c7a0121ca6b5f56babb @@ -13,7 +13,7 @@ imports: subpackages: - pkg/term - name: github.com/docker/machine - version: 5b274558ea6ca822c06dd407a4e774a0105c3f60 + version: 15fd4c70403bab784d91031af02d9e169ce66412 subpackages: - libmachine/drivers - libmachine/drivers/plugin @@ -27,7 +27,7 @@ imports: - libmachine/version - version - name: github.com/mitchellh/gox - version: 54b619477e8932bbb6314644c867e7e6db7a9c71 + version: c9740af9c6574448fd48eb30a71f964014c7a837 - name: golang.org/x/crypto version: beef0f4390813b96e8e68fd78570396d0f4751fc subpackages: From cdb985714e0f626cf5efc62a8186f98f5e16c5e3 Mon Sep 17 00:00:00 2001 From: Adam Carruthers Date: Mon, 2 Apr 2018 09:55:58 -0700 Subject: [PATCH 2/3] Use unique key names --- cloudca.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudca.go b/cloudca.go index 78826e2..3d56202 100644 --- a/cloudca.go +++ b/cloudca.go @@ -374,7 +374,7 @@ func (d *Driver) Create() error { // !! Workaround for MC-7431. key = strings.TrimSpace(key) - key += " docker-machine-workaround" + key = fmt.Sprintf("%s %s", key, d.MachineName) // !! End workaround for MC-7431. instanceToCreate := cloudca.Instance{ From 01b2fcce2efe71588fc28068b44bcd300f5f5e57 Mon Sep 17 00:00:00 2001 From: pdube Date: Thu, 2 Aug 2018 13:33:37 -0400 Subject: [PATCH 3/3] Added name to SSH key to avoid failing validation --- cloudca.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cloudca.go b/cloudca.go index 3d56202..84892f8 100644 --- a/cloudca.go +++ b/cloudca.go @@ -6,6 +6,7 @@ import ( "regexp" "strconv" "strings" + "time" "github.com/cloud-ca/go-cloudca" "github.com/cloud-ca/go-cloudca/api" @@ -372,10 +373,10 @@ func (d *Driver) Create() error { return err } - // !! Workaround for MC-7431. + // !! Workaround for MC-7982. key = strings.TrimSpace(key) - key = fmt.Sprintf("%s %s", key, d.MachineName) - // !! End workaround for MC-7431. + key = fmt.Sprintf("%s %s-%d", key, d.MachineName, time.Now().Unix()) + // !! End workaround for MC-7982. instanceToCreate := cloudca.Instance{ Name: d.MachineName,