libs check turns yellow if no kernel image exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hobbit-plugins (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If there's no kernel image installed, e.g. in an LXC environment, then the following output gets generated. This didn't happen in 14.04 LTS.
Thu Jan 14 16:00:37 2016 - libs NOT ok
yellow Warning: Use of uninitialized value $newest_
yellow Warning: Use of uninitialized value $newest_
yellow Warning: Use of uninitialized value $kernel_
yellow Warning: Use of uninitialized value $newest_
yellow Warning: Use of uninitialized value $newest_
yellow Kernel image unreadable. Can't check kernel version!
See comment #3 on https:/
In a container environment, testing the kernel version doesn't make sense anyway, as the host kernel will always be in use. Maybe you could disable the test if you detect a container? There are many ways to do this, e.g.:
1.) Manually
Detect Libvirt-LXC:
# grep -z '^LIBVIRT_
LIBVIRT_
Detect LXC:
# grep -z '^container=' /proc/1/environ
container=lxc
Detect Linux-Vserver (VxID > 0):
# grep -E '^VxID:\s+[1-9]' /proc/self/status
VxID: 40010
(See /etc/init/
2.) With upstart (14.04 LTS)
# cat /run/container_type
lxc-libvirt
3.) With systemd (16.04 Development)
# systemd-detect-virt -c
lxc-libvirt
---
# ls -la /boot/
total 8
drwxr-xr-x 2 root root 4096 Apr 11 2014 .
drwxr-xr-x 22 root root 4096 Jan 7 23:15 ..
# lsb_release -rd
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04
# apt-cache policy hobbit-plugins
hobbit-plugins:
Installiert: 20151005
Installations
Versionstabelle:
*** 20151005 500
500 http://
100 /var/lib/
Thanks for the bug report.
Fix committed in git in Debian: https:/ /anonscm. debian. org/cgit/ collab- maint/hobbit- plugins. git/commit/ ?id=ce1ae825c92 2f32033d45f9cc7 dcea4140adc016