'Enable Network' in recovery mode not working properly.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
friendly-recovery (Ubuntu) |
Fix Released
|
Medium
|
Dimitri John Ledkov | ||
Xenial |
Fix Released
|
Medium
|
Eric Desrochers | ||
Bionic |
Fix Released
|
Medium
|
Eric Desrochers | ||
Cosmic |
Fix Released
|
Medium
|
Dimitri John Ledkov | ||
Disco |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
* network menu in recovery mode doesn't work correctly, blocking at starting systemd services depends to enable networking.
[Test Case]
* Boot w/ Xenial or Bionic in recovery mode via grub
* Choose "network" in friendly-recovery menu
The network won't be activated and it'll be stuck at systemd-
# pstree
systemd-
[Regression Potential]
* Low.
* All options works fine.
* Cosmic has the same changes already in place.
* According to xnox, resume option fails to boot now.
After verification the 'resume' has the same effect before/after that change, it boots up but still seems to stick in 'recovery' option according to /proc/cmdline so I don't see any obvious behaviour change before and after.
[Other Info]
* Upstream :
https:/
Revision 154 to 161
[Original Description]
This bug has been noticed after the introduction of the fix of (LP: #1682637) in Bionic.
I have notice a block in Bionic when choosing 'Enable Network' option in recovery mode on different bionic vanilla system and I can reproduce all the time.
I also asked colleagues to give it a try (for a second pair of eye on this) and they have the same result as me.
Basically, when choosing 'Enable Network' it get block or lock.
If we hit 'ctrl-c', then a shell arrive and the system has network connectivity.
Here's what I find while enabling "systemd.
# pstree
systemd-
....
# ps
root 486 473 0 08:29 tty1 00:00:00 /bin/systemd-
root 473 486 0 08:29 tty1 00:00:00 systemctl start dbus.socket
root 486 283 0 08:29 tty1 00:00:00 /bin/sh /lib/recovery-
Additionally,
systemd-analyze blame:
"Bootup is not yet finished. Please try again later"
"systemctl list-jobs" is showing a 100 jobs in 'waiting' state
The only 'running' unit is friendly-
52 friendly-
The rest are all "waiting". My understanding is that "waiting" units will be executed only after those which are "running" are completed. Which explain why the "ctlr-c" allow the boot to continue.
All the systemd special unit important at boot-up are waiting.
7 sysinit.target start waiting
3 basic.target start waiting
.....
Seems like systemd is not fully initialise in 'Recovery Mode' and doesn't allow any 'systemctl start' operation without password/passphrase request, which I suspect is hidden by the recovery-mode menu.
Related branches
- Dimitri John Ledkov: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedlib/recovery-mode/options/network (+1/-1)
Changed in friendly-recovery (Ubuntu): | |
importance: | Undecided → High |
tags: | added: sts |
description: | updated |
description: | updated |
tags: | added: rls-bb-incoming |
tags: | added: id-5afda46ded21519fcf26f22b |
Changed in friendly-recovery (Ubuntu Cosmic): | |
status: | Confirmed → In Progress |
summary: |
- 'Enable Network' in recovery mode not working in Bionic + 'Enable Network' in recovery mode not working properly. |
Changed in friendly-recovery (Ubuntu Bionic): | |
status: | Confirmed → In Progress |
Changed in friendly-recovery (Ubuntu Xenial): | |
status: | Confirmed → In Progress |
tags: | added: patch |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in friendly-recovery (Ubuntu Cosmic): | |
status: | In Progress → Fix Released |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in friendly-recovery (Ubuntu Cosmic): | |
assignee: | Eric Desrochers (slashd) → Dimitri John Ledkov (xnox) |
Changed in friendly-recovery (Ubuntu Disco): | |
status: | Invalid → Fix Released |
tags: | removed: rls-bb-incoming verification-needed |
no longer affects: | systemd (Ubuntu) |
no longer affects: | systemd (Ubuntu Xenial) |
no longer affects: | systemd (Ubuntu Bionic) |
no longer affects: | systemd (Ubuntu Cosmic) |
no longer affects: | systemd (Ubuntu Disco) |
I did some progress...
I was able to make a few 'enabled|static' services to start such as : resolved. service
dbus.socket
networking.service
system-
NetworkManger doesn't seems to start well.
By making the following changes :
# /lib/recovery- mode/options/ network ------- ------- ------- ------- --- resolved. service networking.service systemd- networkd. service NetworkManager. service; do networkd. service systemd- resolved. service NetworkManager. service; do ignore- dependencies --no-ask-password start $i systemd/ systemd- networkd- wait-online && exit 0 ------- ------- ------- ------- ---
-------
if [ -d /run/systemd/system ]; then
- for i in dbus.socket systemd-
+ for i in dbus.socket networking.service systemd-
- systemctl is-enabled -q $i && systemctl start $i
+ systemctl is-enabled -q $i && systemctl --job-mode=
done
/lib/
fi
-------
* Changed the order to start systemd- resolved. service as mentioned in:
# /lib/systemd/ system/ systemd- resolved. service networkd. service network.target
After=systemd-
to be after systemd- networkd. service
* Add "--no-ask-password" to avoid systemd- tty-ask- password- agent to block mode=ignore- dependencies" has most of the service are not running and waiting.
* Add "--job-