Public bug reported:

An Ubuntu Xenial AWS node up to date with needrestart will always
suggest needing to restart cloud-init-local even after a fresh reboot.

root@ip-172-31-39-154:~# lsb_release -rd
Description:    Ubuntu 16.04.3 LTS
Release:        16.04

root@ip-172-31-39-154:~# needrestart -v
[main] eval /etc/needrestart/needrestart.conf
[main] running in root-mode
[Core] Using UI 'NeedRestart::UI::stdio'...
[main] detected systemd
[main] #699 uses obsolete binary 
/var/tmp/cloud-init/cloud-init-dhcp-vgd27h66/dhclient
[main] #699 is not a child
[Core] #1272 is a NeedRestart::Interp::Python
[main] #699 exe => /var/tmp/cloud-init/cloud-init-dhcp-vgd27h66/dhclient
[main] #699 unexpected cgroup ''
[main] #699 is cloud-init-local.service
[Kernel] Linux: kernel release 4.4.0-1041-aws, kernel version #50-Ubuntu SMP 
Wed Nov 15 22:18:17 UTC 2017
Failed to load NeedRestart::Kernel::kFreeBSD: [Kernel/kFreeBSD] Not running on 
GNU/kFreeBSD!
[Kernel/Linux] /boot/vmlinuz-4.4.0-1041-aws => 4.4.0-1041-aws 
(buildd@lgw01-amd64-025) #50-Ubuntu SMP Wed Nov 15 22:18:17 UTC 2017 
[4.4.0-1041-aws]*
[Kernel/Linux] /boot/vmlinuz-4.4.0-1039-aws => 4.4.0-1039-aws (buildd@lcy01-02) 
#48-Ubuntu SMP Wed Oct 11 15:15:01 UTC 2017 [4.4.0-1039-aws]
[Kernel/Linux] Expected linux version: 4.4.0-1041-aws
Running kernel seems to be up-to-date.
Services to be restarted:
Restart cloud-init-local.service? [Ynas?] 

root@ip-172-31-39-154:~# env LC_ALL=C TERM=dumb systemctl --no-pager status 
cloud-init-local.service
* cloud-init-local.service - Initial cloud-init job (pre-networking)
   Loaded: loaded (/lib/systemd/system/cloud-init-local.service; enabled; 
vendor preset: enabled)
   Active: active (exited) since Mon 2017-11-27 13:13:17 MST; 51min ago
  Process: 714 ExecStart=/bin/touch /run/cloud-init/network-config-ready 
(code=exited, status=0/SUCCESS)
  Process: 465 ExecStart=/usr/bin/cloud-init init --local (code=exited, 
status=0/SUCCESS)
 Main PID: 714 (code=exited, status=0/SUCCESS)
    Tasks: 1
   Memory: 19.9M
      CPU: 794ms
   CGroup: /system.slice/cloud-init-local.service
           `-699 /var/tmp/cloud-init/cloud-init-dhcp-vgd27h66/dhclient -1 -v 
-lf /var/tmp/cloud-init/cloud-init-dhcp-vgd27h66/dhcp.leases -pf 
/var/tmp/cloud-init/cloud-init-dhcp-vgd27h66/d...

Nov 27 13:13:16 ip-172-31-39-154 dhclient[696]: bound to 172.31.39.154 -- 
renewal in 1367 seconds.
Nov 27 13:13:16 ip-172-31-39-154 dhclient[699]: receive_packet failed on eth0: 
Network is down
Nov 27 13:13:17 ip-172-31-39-154 cloud-init[465]: Cloud-init v. 17.1 running 
'init-local' at Mon, 27 Nov 2017 20:13:15 +0000. Up 5.66 seconds.
Nov 27 13:13:17 ip-172-31-39-154 systemd[1]: Started Initial cloud-init job 
(pre-networking).
Nov 27 13:36:04 ip-172-31-39-154 dhclient[699]: DHCPREQUEST of 172.31.39.154 on 
eth0 to 172.31.32.1 port 67 (xid=0x63ff3185)
Nov 27 13:36:04 ip-172-31-39-154 dhclient[699]: DHCPACK of 172.31.39.154 from 
172.31.32.1
Nov 27 13:36:04 ip-172-31-39-154 dhclient[699]: bound to 172.31.39.154 -- 
renewal in 1444 seconds.
Nov 27 14:00:08 ip-172-31-39-154 dhclient[699]: DHCPREQUEST of 172.31.39.154 on 
eth0 to 172.31.32.1 port 67 (xid=0x63ff3185)
Nov 27 14:00:08 ip-172-31-39-154 dhclient[699]: DHCPACK of 172.31.39.154 from 
172.31.32.1
Nov 27 14:00:08 ip-172-31-39-154 dhclient[699]: bound to 172.31.39.154 -- 
renewal in 1735 seconds.

root@ip-172-31-39-154:~# ps -efH | awk 'NR==1||/cloud-init/||/dhclient/'
UID        PID  PPID  C STIME TTY          TIME CMD
root       699     1  0 13:13 ?        00:00:00   
/var/tmp/cloud-init/cloud-init-dhcp-vgd27h66/dhclient -1 -v -lf 
/var/tmp/cloud-init/cloud-init-dhcp-vgd27h66/dhcp.leases -pf 
/var/tmp/cloud-init/cloud-init-dhcp-vgd27h66/dhclient.pid eth0 -sf /bin/true
root       795     1  0 13:13 ?        00:00:00   /sbin/dhclient -1 -v -pf 
/run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df 
/var/lib/dhcp/dhclient6.eth0.leases eth0
root      2585  2128  0 14:07 pts/0    00:00:00         awk 
NR==1||/cloud-init/||/dhclient/

root@ip-172-31-39-154:~# ll -Ra /var/tmp/cloud-init/
/var/tmp/cloud-init/:
total 8
drwxrwxrwt 2 root root 4096 Nov 27 13:13 .
drwxrwxrwt 3 root root 4096 Nov 27 08:56 ..

Of course if I do restart cloud-init-local.service:

root@ip-172-31-39-154:~# systemctl restart cloud-init-local.service

root@ip-172-31-39-154:~# env LC_ALL=C TERM=dumb systemctl --no-pager status 
cloud-init-local.service
* cloud-init-local.service - Initial cloud-init job (pre-networking)
   Loaded: loaded (/lib/systemd/system/cloud-init-local.service; enabled; 
vendor preset: enabled)
   Active: active (exited) since Mon 2017-11-27 14:09:05 MST; 26s ago
  Process: 2624 ExecStart=/bin/touch /run/cloud-init/network-config-ready 
(code=exited, status=0/SUCCESS)
  Process: 2613 ExecStart=/usr/bin/cloud-init init --local (code=exited, 
status=0/SUCCESS)
 Main PID: 2624 (code=exited, status=0/SUCCESS)

Nov 27 14:09:05 ip-172-31-39-154 systemd[1]: Stopping Initial cloud-init job 
(pre-networking)...
Nov 27 14:09:05 ip-172-31-39-154 systemd[1]: Stopped Initial cloud-init job 
(pre-networking).
Nov 27 14:09:05 ip-172-31-39-154 systemd[1]: Starting Initial cloud-init job 
(pre-networking)...
Nov 27 14:09:05 ip-172-31-39-154 cloud-init[2613]: Cloud-init v. 17.1 running 
'init-local' at Mon, 27 Nov 2017 21:09:05 +0000. Up 3354.77 seconds.
Nov 27 14:09:05 ip-172-31-39-154 systemd[1]: Started Initial cloud-init job 
(pre-networking).

root@ip-172-31-39-154:~# needrestart -v
[main] eval /etc/needrestart/needrestart.conf
[main] running in root-mode
[Core] Using UI 'NeedRestart::UI::stdio'...
[main] detected systemd
[Core] #1272 is a NeedRestart::Interp::Python
[Kernel] Linux: kernel release 4.4.0-1041-aws, kernel version #50-Ubuntu SMP 
Wed Nov 15 22:18:17 UTC 2017
Failed to load NeedRestart::Kernel::kFreeBSD: [Kernel/kFreeBSD] Not running on 
GNU/kFreeBSD!
[Kernel/Linux] /boot/vmlinuz-4.4.0-1041-aws => 4.4.0-1041-aws 
(buildd@lgw01-amd64-025) #50-Ubuntu SMP Wed Nov 15 22:18:17 UTC 2017 
[4.4.0-1041-aws]*
[Kernel/Linux] /boot/vmlinuz-4.4.0-1039-aws => 4.4.0-1039-aws (buildd@lcy01-02) 
#48-Ubuntu SMP Wed Oct 11 15:15:01 UTC 2017 [4.4.0-1039-aws]
[Kernel/Linux] Expected linux version: 4.4.0-1041-aws
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.

root@ip-172-31-39-154:~# ps -efH | awk 'NR==1||/cloud-init/||/dhclient/'
UID        PID  PPID  C STIME TTY          TIME CMD
root       795     1  0 13:13 ?        00:00:00   /sbin/dhclient -1 -v -pf 
/run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df 
/var/lib/dhcp/dhclient6.eth0.leases eth0
root      2632  2128  0 14:10 pts/0    00:00:00         awk 
NR==1||/cloud-init/||/dhclient/

Thank you for maintaining needrestart in Ubuntu.

** Affects: needrestart (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  Always suggests restarting cloud-init-local

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/needrestart/+bug/1734768/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to