journalctl --list-boots does not recognize boots in a container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Committed
|
Undecided
|
Unassigned | ||
Eoan |
Won't Fix
|
Undecided
|
Unassigned | ||
lxd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
Eoan |
Invalid
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
Eoan |
Invalid
|
Undecided
|
Unassigned |
Bug Description
$ lxc launch ubuntu-daily:eoan devel1
$ sleep 10 # wait for boot
$ lxc exec devel1 /bin/bash
root@devel1:~# cat /proc/uptime
183.00 173.00
root@devel1:~# cat /etc/cloud/
build_name: server
serial: 20190531
root@devel1:~# lsb_release -sc
eoan
root@devel1:~# journalctl --no-pager --list-boots
0 4ecd6fb081964b7
root@devel1:~# reboot
root@devel1:~#
$ lxc exec devel1 /bin/bash
## verify the reboot happened
root@devel1:~# cat /proc/uptime
12.00 6.00
## but journalctl only shows the same boot it did before.
root@devel1:~# journalctl --no-pager --list-boots
0 4ecd6fb081964b7
ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: systemd 240-6ubuntu5
ProcVersionSign
Uname: Linux 4.15.0-50-generic x86_64
ApportVersion: 2.20.11-0ubuntu2
Architecture: amd64
Date: Fri May 31 15:06:24 2019
MachineType: LENOVO 20KGS3Y900
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/20/2019
dmi.bios.vendor: LENOVO
dmi.bios.version: N23ET63W (1.38 )
dmi.board.
dmi.board.name: 20KGS3Y900
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40697 WIN
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: ThinkPad X1 Carbon 6th
dmi.product.name: 20KGS3Y900
dmi.product.
dmi.sys.vendor: LENOVO
Changed in systemd (Ubuntu Bionic): | |
status: | In Progress → Invalid |
Changed in systemd (Ubuntu Eoan): | |
status: | In Progress → Invalid |
Changed in lxc (Ubuntu Bionic): | |
status: | New → Incomplete |
status: | Incomplete → Fix Committed |
Changed in lxc (Ubuntu Eoan): | |
status: | New → Fix Committed |
Changed in lxd (Ubuntu Bionic): | |
status: | In Progress → Invalid |
Changed in lxd (Ubuntu Eoan): | |
status: | In Progress → Invalid |
Changed in lxc (Ubuntu): | |
status: | Fix Committed → Fix Released |
status: | Fix Released → Fix Committed |
Hahahhahaha
So....
yeah....
because the _host_ bootid is in use =) and you didn't reboot the host. Specifically, everything in systemd reads /proc/sys/ kernel/ random/ boot_id and that appears to be the same as on the host.
Maybe lxc/lxd should fake that file and generate new "boot_id" each time container is started.