Configurable ephemeral directory

The configurable ephemeral directory defines the location that data ephemeral to the queue manager should go. This can be used to allow the UNIX and Linux domain sockets to be placed on a non-mounted file system in a Red Hat OpenShift environment.

Prior to IBM MQ Version 9.2.0, on the UNIX and Linux platforms, when a queue manager is running, UNIX and Linux domain sockets are created under the /var/mqm/sockets directory. When running the queue manager inside a container, with /var/mqm as a mounted file system, some Linux platforms can prevent the creation of these domain sockets, because they allow some processes from outside the container to interfere with operations inside the container. This issue prevents IBM MQ from running in a Red Hat OpenShift container platform, under the default security context.

From Version 9.2.0, the EphemeralPrefix attribute can be used to configure the location of the ephemeral directory. If we do not use this attribute, we will see no change in behavior.

When a queue manager entry is created in mqs.ini (either using the crtmqm or addmqinf commands) the EphemeralPrefix attribute is added if you:

  • Set the DefaultEphemeralPrefix attribute in the AllQueueManagers stanza.
  • Set the MQ_EPHEMERAL_PREFIX environment variable.
  • Specify -v EphemeralPrefix for the addmqinf command only.

We can also explicitly add the EphemeralPrefix attribute to an existing queue manager when it is stopped, and this is added when the queue manager is restarted.

If you specify an EphemeralPrefix attribute, when the queue manager starts it causes data ephemeral to the queue manager to be created under that prefix rather than its usual location. That is:

  • Socket files that are usually present under /var/mqm/sockets/<QM> will now be under /<EphemeralPrefix>/sockets/<QM>
  • Subpool files that are usually present under /<Prefix>/qmgrs/<QM>/@<Subpool> will now be under /<EphemeralPrefix>/qmgrs/<QM>/@<Subpool>

Notes:

  • /var/mqm/sockets/@SYSTEM remains in its fixed location and is not part of the EphemeralPrefix attribute.
  • AMQCLCHL.TAB remains under the /<Prefix>/qmgrs/<QM>/@ipcc and is not part of the EphemeralPrefix attribute.

The number of characters that the EphemeralPrefix attribute can include depends on the platform:

  • On UNIX and Linux platforms it is limited to 12 characters.
  • On IBM i it is limited to 24 characters.

If you specify an EphemeralPrefix attribute that is too long, or does not exist, you receive an AMQ7001E message:

AMQ7001E: The location specified for the queue manager is not valid
. Parent topic: Create queue managers on Multiplatforms