@@ -27,6 +27,7 @@ import (
2727 "github.com/ibm-messaging/mq-container/internal/command"
2828 containerruntime "github.com/ibm-messaging/mq-container/internal/containerruntime"
2929 "github.com/ibm-messaging/mq-container/internal/mqscredact"
30+ "github.com/ibm-messaging/mq-container/internal/mqversion"
3031 "github.com/ibm-messaging/mq-container/internal/ready"
3132)
3233
@@ -203,9 +204,24 @@ func getQueueManagerDataDir(mounts map[string]string, name string) string {
203204}
204205
205206func getCreateQueueManagerArgs (mounts map [string ]string , name string , devMode bool ) []string {
207+
208+ mqversionBase := "9.2.1.0"
209+
210+ // use "UserExternal" only if we are 9.2.1.0 or above.
211+ oaVal := "user"
212+ mqVersionCheck , err := mqversion .Compare (mqversionBase )
213+
214+ if err != nil {
215+ log .Printf ("Error comparing MQ versions for oa,rc: %v" , mqVersionCheck )
216+ }
217+ if mqVersionCheck >= 0 {
218+ oaVal = "UserExternal"
219+ }
220+
221+ //build args
206222 args := []string {"-ii" , "/etc/mqm/" , "-ic" , "/etc/mqm/" , "-q" , "-p" , "1414" }
207223 if devMode {
208- args = append (args , "-oa" , "user" )
224+ args = append (args , "-oa" , oaVal )
209225 }
210226 if _ , ok := mounts ["/mnt/mqm-log" ]; ok {
211227 args = append (args , "-ld" , "/mnt/mqm-log/log" )
0 commit comments