Docker Container IPC Share

I have a post talks about IPC <<Linux IPC>>, it’s about IPC resource requirements for DB2 and how to adjust the ipc parameters permanently or temporarily. This time we face different ipc issue, interesting.

Description

We bring up DataStage container in particular order to make them function correctly, but when Engine is running, Xmeta DB2 went down silently whihout any warning or error messages. unquiesce will make DB2 up again, but it’s not stable.

This did not happen in K8s cluster, things get weired.

Reason

We update docker run command for Xmeta and Engine with --ipc=host, so they will share the ipc resouces with host machine (They reside on the same machine) and each other.

The trick is there are some ipcrm -a in the Engine start and quiesce scripts. So when Engine is up, it cleans host ipc resource and DB2 goes down.

we remove all ipcrm -a commands inside container and things get work.

Another thing is before start up the containers, make sure the ipc is clean, we encountered the problem that the old non-used ipc overstep in new containers, so run ipcrm -a in host machine to clean them.

Why K8s does not have this problem? Because we schedule Xmeta and Engine in different nodes, the ipcrm -a will not affect each other, but docker we hold all containers in one node.

Some usefully commands

1
2
3
4
ipcs -l      ## list ipc configuration

ipcrm -a ## remove all ipc resources
ipcs -a ## list ipc in use
0%