ibm-messaging / mq-helm

Apache License 2.0
25 stars 33 forks source link

Modify Log stanza of the qm.ini file #80

Closed raulbh closed 2 months ago

raulbh commented 3 months ago

Hello,

We have been trying to customize the log stanza when deploying a qmgr through the helm chart by adding the following in this section

    Log:
       LogPrimaryFiles=100
       LogSecondaryFiles=250
       LogFilePages=65535
       LogBufferPages=4096

But it seems that those values are not being applied to the configuration within the statefulset, and when we review the qm.ini file on this path /var/mqm/qmgrs/<QMGR>/qm.ini only the default values are set.

Our environment is EKS and we are using Helm to deploy it. It would be helpful if you could provide the right way to add the log stanza configuration during the deployment.

arthurbarr commented 3 months ago

See the documentation on Log stanza for the qm.ini file: you can't change LogFilePages in the qm.ini file. Recent version of MQ should give you an error message if you try to do this, but older versions silently ignored it. The LogFilePages setting is configured at queue manager creation only, so if you want to set it in the sample container, then you need to use the MQ_QMGR_LOG_FILE_PAGES environment variable.

raulbh commented 3 months ago

Hello @arthurbarr I have passed the values as container env variables through the helm chart, and even though they appear in the statefulset correctly as follows:

...
        containers:
        - env:
          - name: MQ_QMGR_LOG_FILE_PAGES
            value: "65535"
          - name: MQ_QMGR_LOG_BUFFER_PAGES
            value: "4096"
...

When I check the file /var/mqm/qmgrs/<QMGR>/qm.ini it still shows the default values.

Log:
   LogPrimaryFiles=3
   LogSecondaryFiles=2
   LogFilePages=4096
   LogType=REPLICATED
   LogBufferPages=0

Any other suggestions or advice would be appreciated on how to properly address this behavior.

arthurbarr commented 3 months ago

Did you do that on an entirely new queue manager (i.e. new PersistentVolume)? Once the files have been created on disk, they cannot be changed. You can't set MQ_QMGR_LOG_BUFFER_PAGES. See https://github.com/ibm-messaging/mq-container?tab=readme-ov-file#environment-variables-supported-by-this-image for the list of allowable variables.

arthurbarr commented 3 months ago

Also, if it's a Native HA queue manager, you might need to delete all three instances and start again.

callumpjackson commented 2 months ago

Closing as assuming Arthur's comments addressed the issue.