A user wants to collect kernel crash dumps from PCF Ubuntu instances.
The Linux-crashdump package must be installed and configured in order to enable kernel crash dumps to be collected in the event of a system crash. Swap size also has to be explicitly set in the BOSH deployment manifest; otherwise, the system becomes confused about how much swap should be configured, due to the memory used by the crashdump module. In this case, the swap partition may not mount, and PCF services may not start up.
WARNING: This procedure loads a crash kernel dump module into the system, and it could cause virtual machines (VMs) to crash or become unresponsive. This procedure is not recommended for production environments, and customers should assume any risk involved. Pivotal will not provide support for this procedure.
Follow these steps for each VM on which you want to collect crash dumps:
To revert:
In Ops Manager, just click "Apply Changes". This will revert the PCF installation to its defaults.
Alternately, using bosh on the command line:
Caveats
If you make changes to your PCF setup using Ops Manager, it will overwrite the manifest file and recreate any VMs which were configured to create kernel core dumps. All customized changes will be lost.
This is based on Ubuntu procedure: https://help.ubuntu.com/lts/serverguide/kernel-crash-dump.html
There is an extra step of updating grub.conf to include crashkernel parameter.
Additionally, it is necessary to explicitly set the swap_size for BOSH when running this procedure. The problem is that enabling crashdump takes away memory from the machine, which is how the bosh-agent automatically calculates the swap size partition. So when we remove memory but use the same partition, the swap filesystem thinks it has more size than actual disk space.