From de0aaaed6bda41395b28caea21dd5939e8d7a04d Mon Sep 17 00:00:00 2001 From: Rob Bagby Date: Mon, 18 Sep 2017 09:42:46 -0700 Subject: [PATCH] Fixed regression for extensions. Updated docs to remove the rootURL parameter. --- extensions/hello-world-dcos/README.md | 3 +-- extensions/hello-world/README.md | 1 - pkg/acsengine/engine.go | 7 ++++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extensions/hello-world-dcos/README.md b/extensions/hello-world-dcos/README.md index 345f4c2322..c5bf8f5be7 100644 --- a/extensions/hello-world-dcos/README.md +++ b/extensions/hello-world-dcos/README.md @@ -35,8 +35,7 @@ dcos task log hello-marathon "extensionProfiles": [ { "name": "hello-world-dcos", - "version": "v1", - "rootURL": "https://bagbyimages.blob.core.windows.net:443/" + "version": "v1" } ] diff --git a/extensions/hello-world/README.md b/extensions/hello-world/README.md index b4aaec1da3..ef3b4908b4 100644 --- a/extensions/hello-world/README.md +++ b/extensions/hello-world/README.md @@ -36,7 +36,6 @@ ls -l /var/log { "name": "hello-world-dcos", "version": "v1", - "rootURL": "https://bagbyimages.blob.core.windows.net:443/", "script": "hello.sh" } ] diff --git a/pkg/acsengine/engine.go b/pkg/acsengine/engine.go index 3777150874..c275455c73 100644 --- a/pkg/acsengine/engine.go +++ b/pkg/acsengine/engine.go @@ -1841,7 +1841,12 @@ func internalGetPoolLinkedTemplateText(extTargetVMNamePrefix, orchestratorType, dta = strings.Replace(dta, "EXTENSION_PARAMETERS_REPLACE", extensionsParameterReference, -1) dta = strings.Replace(dta, "EXTENSION_URL_REPLACE", extensionProfile.RootURL, -1) dta = strings.Replace(dta, "EXTENSION_TARGET_VM_NAME_PREFIX", extTargetVMNamePrefix, -1) - dta = strings.Replace(dta, "EXTENSION_LOOP_COUNT", loopCount, -1) + if _, err := strconv.Atoi(loopCount); err == nil { + dta = strings.Replace(dta, "\"EXTENSION_LOOP_COUNT\"", loopCount, -1) + } else { + dta = strings.Replace(dta, "EXTENSION_LOOP_COUNT", loopCount, -1) + } + dta = strings.Replace(dta, "EXTENSION_LOOP_OFFSET", loopOffset, -1) return dta, nil }