adding newly introduced UserExternal to crtmqm

Removing redundant env variable in dockerfile

userexternal only if gt 9201

restore env variable for UNKNOWN_ID
This commit is contained in:
kirandarbha
2020-10-21 11:32:14 +05:30
parent c37f8f1c4c
commit f39f90728f
2 changed files with 14 additions and 2 deletions

View File

@@ -203,9 +203,21 @@ func getQueueManagerDataDir(mounts map[string]string, name string) string {
}
func getCreateQueueManagerArgs(mounts map[string]string, name string, devMode bool) []string {
// use "UserExternal" only if we are 9.2.0.1 or above.
mqVersion, _, err := command.Run("dspmqver", "-b", "-f", "2")
if err != nil {
log.Printf("Error Getting MQ version to find oa: %v", strings.TrimSuffix(string(mqVersion), "\n"))
}
oaVal := "user"
if mqVersion > "9.2.0.0" {
oaVal = "UserExternal"
}
//build args
args := []string{"-ii", "/etc/mqm/", "-ic", "/etc/mqm/", "-q", "-p", "1414"}
if devMode {
args = append(args, "-oa", "user")
args = append(args, "-oa", oaVal)
}
if _, ok := mounts["/mnt/mqm-log"]; ok {
args = append(args, "-ld", "/mnt/mqm-log/log")