Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
inside openvz 2.6.32 simfs container everything is always changed #28
Inside an openvz/virtuozzo container (here using their 2.6.32-042stab115.2 kernel), Debian Jessie as the system in the host, and Debian Unstable with needrestart 2.8-1 (same problem with the old jessie version) every service is always detected as using obsolet libs.
This is because between the real ext4 filesystem and the clients inside the container there is a virtual simfs filesystem providing some directory-tree-to-quota abstraction.
The stat() function call in this case returns the real inode number, but the device number of the virtual filesystem, which is an anonymous number using major number 0:
haegar@blackhole:~$ stat /bin/bash
(The device number is different in each container, but always from special major number 0, same like proc or a tmpfs)
But the content of /proc/$pid/maps contains the real device number:
haegar@blackhole:~$ grep bash /proc/$$/maps
With the attached dirty hack I was able to make needrestart work correctly inside (and outside) such containers, but it may not work correctly besides linux, as it is based on their major/minor split.
Openvz containers based on their newer "ploop" loopback mounting of a big image file instead of a directory tree do not need this change, but you loose a lot of diskspace.