From 20dca9fd46bf9dbecd7ccfcde5a473e162c5f1cb Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 3 Sep 2017 00:11:34 -0400 Subject: [PATCH] fix: convert the containerIndex to a string to ensure it is properly passed to the plugn trigger --- plugins/network/network.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/network/network.go b/plugins/network/network.go index 244c1e52f..80bb3eaec 100644 --- a/plugins/network/network.go +++ b/plugins/network/network.go @@ -119,6 +119,7 @@ func BuildConfig(appName string) { containerIndex := 0 for containerIndex < procCount { containerIndex++ + containerIndexString := strconv.Itoa(containerIndex) containerIDFile := fmt.Sprintf("%v/CONTAINER.%v.%v", appRoot, procType, containerIndex) containerID := common.ReadFirstLine(containerIDFile) @@ -130,14 +131,14 @@ func BuildConfig(appName string) { port := GetContainerPort(appName, procType, isHerokuishContainer, containerID) if ipAddress != "" { - _, err := sh.Command("plugn", "trigger", "network-write-ipaddr", appName, procType, containerIndex, ipAddress).Output() + _, err := sh.Command("plugn", "trigger", "network-write-ipaddr", appName, procType, containerIndexString, ipAddress).Output() if err != nil { common.LogWarn(err.Error()) } } if port != "" { - _, err := sh.Command("plugn", "trigger", "network-write-port", appName, procType, containerIndex, port).Output() + _, err := sh.Command("plugn", "trigger", "network-write-port", appName, procType, containerIndexString, port).Output() if err != nil { common.LogWarn(err.Error()) }