Module build for the currently running kernel was skipped message in console during Replication agent's installation

"Module build for the currently running kernel was skipped" message in console during Replication agent's installation

Challenge

During the installation of a Linux replication agent (hlragent) with DKMS, the following message can be displayed in the console:
  1. Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed.

Cause

This is caused by the fact that a new kernel has been installed without headers

Solution

1. Get information on the currently running kernel by executing the uname -r command.
2. Check which HSS drivers were built with the dkms status command.
3. Check the status of hlragent as well as HSS load status and version:
  1. service hlragent status #expected output: Running
  2. lsmod | grep hss #expected output: HSS is returned, not an empty responce
  3. modinfo hss #expected output: HSS filename matches the currently running kernel
4. Check whether Linux headers are installed for the latest kernel. Path: /lib/modules/<kernel version>/build/include/
5. If not, install them with the apt-get install linux-headers-<kernel version> command, e.g.:
  1. sudo apt-get install linux-headers-4.4.0-101-generic