[Bug 1855290] Re: Don't run /usr/lib/update-notifier/update-motd-hwe-eol in containers

Balint Reczey balint.reczey at canonical.com
Mon Dec 16 14:36:10 UTC 2019


root at ee-motd-verify:~# dpkg -l update-notifier-common | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version      Architecture Description
+++-======================-============-============-=======================================================
ii  update-notifier-common 3.192.26.1   all          Files shared between update-notifier and other packages
root at ee-motd-verify:~# ls -alh /var/lib/update-notifier/updates-available
-rw-r--r-- 1 root root 143 Dec 16 14:13 /var/lib/update-notifier/updates-available
root at ee-motd-verify:~# bash -x /usr/lib/update-notifier/update-motd-hwe-eol
+ '[' '' = --force ']'
+ type systemd-detect-virt
+ systemd-detect-virt -q -c
+ exit
root at ee-motd-verify:~# systemd-detect-virt 
lxc

-------

ubuntu at ee1:~$ sudo apt install update-notifier-common 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  update-notifier-common
1 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Need to get 162 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu eoan-proposed/main amd64 update-notifier-common all 3.192.26.1 [162 kB]
Fetched 162 kB in 0s (516 kB/s)            

(Reading database ... 61893 files and directories currently installed.)
Preparing to unpack .../update-notifier-common_3.192.26.1_all.deb ...
Unpacking update-notifier-common (3.192.26.1) over (3.192.26) ...
Setting up update-notifier-common (3.192.26.1) ...
Installing new version of config file /etc/update-motd.d/90-updates-available ...
ubuntu at ee1:~$ time /usr/lib/update-notifier/update-motd-hwe-eol

real	0m0.205s
user	0m0.161s
sys	0m0.040s
ubuntu at ee1:~$ systemd-detect-virt 
kvm


** Tags removed: verification-needed verification-needed-eoan
** Tags added: verification-done verification-done-eoan

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/1855290

Title:
  Don't run /usr/lib/update-notifier/update-motd-hwe-eol in containers

Status in update-notifier package in Ubuntu:
  Fix Released
Status in update-notifier source package in Eoan:
  Fix Committed

Bug description:
  [Impact]

   * Information of HWE kernels are shown in containers despite this information is useless most of the time since containers use the host systems' kernels.
   * The check for HWE kernels is noticably slow OTOH, taking around 0.2s on my intel i5 laptop.

  [Test Case]

   * Run the script in a container to see it being shortcut:
     $ bash -x /usr/lib/update-notifier/update-motd-hwe-eol
     + '[' '' = --force ']'
     + type systemd-detect-virt
     + systemd-detect-virt -q -c
     + exit
   * Run the script in a VM of without virtualization to see it still taking long time to execute:
    
      $ time /usr/lib/update-notifier/update-motd-hwe-eol

      real	0m0.241s
      user	0m0.170s
      sys 	0m0.073s

  [Regression Potential]

   * The fix is very simple there is no expected regression.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1855290/+subscriptions



More information about the foundations-bugs mailing list