Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-1993

Missing shutdownHook.sh script causes drainer pod to abort

XMLWordPrintable

      Previously when discussing the behaviour of the drainer pod and how quickly it ran it was noted that locally I could watch the logs and observe the startup of the broker and the execution of the scaleDown. However dsimansk@redhat.com could not. At the time it appeared to be a cluster speed issue so was not investigated further.

      In deploying the scaledown controller on the internal OCP 3.10 instance for testing I also saw that the drainer pod was created but then immediately completed with no log available. Tailing the messages log on the node hosting the pod showed:

      Sep 19 20:49:06 node-11 atomic-openshift-node: I0919 20:49:06.155464   18044 handlers.go:62] Exec lifecycle hook ([/opt/amq/bin/shutdownHook.sh]) for Container "broker-amq" in Pod "broker-amq-1_amq-demo(0c7870f4-bc6e-11e8-9380-c280
      f77be0d0)" failed - error: command '/opt/amq/bin/shutdownHook.sh' exited with 126: , message: "rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"/opt/amq/bin/sh
      utdownHook.sh\\\": stat /opt/amq/bin/shutdownHook.sh: no such file or directory\"\n\r\n"
      Sep 19 20:49:06 node-11 atomic-openshift-node: E0919 20:49:06.155545   18044 kuberuntime_container.go:460] preStop hook for container "broker-amq" failed: command '/opt/amq/bin/shutdownHook.sh' exited with 126:
      

      In taking a look at the -persistence-clustered.yaml templates we see

                lifecycle:
                  preStop:
                    exec:
                      command:
                      - /opt/amq/bin/shutdownHook.sh
      

      Yet looking in /opt/amq/bin/ in one of the pods we do not see the script, and checking the build modules we also do not see the script.

            rhn-support-rkieley Roderick Kieley
            rhn-support-rkieley Roderick Kieley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: