Fix a problem on wait port number
This commit is contained in:
@@ -162,7 +162,7 @@ func parseService(name string, s compose.Service, ret chan interface{}) {
|
||||
if strings.HasPrefix(volname, ".") || strings.HasPrefix(volname, "/") {
|
||||
// local volume cannt be mounted
|
||||
// TODO: propose a way to make configMap for some files or directory
|
||||
Redf("You cannot, at this time, have local volume in %s service", name)
|
||||
Redf("You cannot, at this time, have local volume in %s deployment\n", name)
|
||||
continue
|
||||
//os.Exit(1)
|
||||
}
|
||||
@@ -213,7 +213,10 @@ func parseService(name string, s compose.Service, ret chan interface{}) {
|
||||
foundPort := -1
|
||||
if defaultPort, err := getPort(dp); err != nil {
|
||||
// BUG: Sometimes the chan remains opened
|
||||
foundPort := <-waitPort(dp)
|
||||
foundPort = <-waitPort(dp)
|
||||
} else {
|
||||
foundPort = defaultPort
|
||||
}
|
||||
if foundPort == -1 {
|
||||
log.Fatalf(
|
||||
"ERROR, the %s service is waiting for %s port number, "+
|
||||
@@ -223,9 +226,6 @@ func parseService(name string, s compose.Service, ret chan interface{}) {
|
||||
dp,
|
||||
)
|
||||
}
|
||||
} else {
|
||||
foundPort = defaultPort
|
||||
}
|
||||
command = strings.ReplaceAll(command, "__port__", strconv.Itoa(foundPort))
|
||||
|
||||
c.Command = []string{
|
||||
|
Reference in New Issue
Block a user