nullpo-head / wsl-distrod

Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
MIT License
1.9k stars 91 forks source link

[Bug]: State considered as degraded when running systemctl status #25

Open ggiinetworks opened 2 years ago

ggiinetworks commented 2 years ago

Describe the bug

I followed the exact same instruction to enable systemd using option 2, but I keep getting this(state: degraded):

[sudo] password for floodcode: [Distrod] Distrod has been enabled. Now your shell will start under systemd. floodcode@Amos:~$ systemctl status ● Amos State: degraded Jobs: 0 queued Failed: 1 units Since: Wed 2021-12-22 01:05:30 WAT; 9min ago CGroup: / ├─init.scope │ └─1 /sbin/init systemd.setenv=WSL_INTEROP=/run/WSL/113_interop systemd.setenv=WSL_DISTRO_NAME=Ubuntu-20.04> ├─system.slice │ ├─snap-lxd-21029.mount │ │ └─90 snapfuse /var/lib/snapd/snaps/lxd_21029.snap /snap/lxd/21029 -o ro,nodev,allow_other,suid │ ├─systemd-udevd.service │ │ └─79 /lib/systemd/systemd-udevd │ ├─cron.service │ │ └─119 /usr/sbin/cron -f │ ├─polkit.service │ │ └─893 /usr/lib/policykit-1/polkitd --no-debug │ ├─networkd-dispatcher.service │ │ └─122 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers │ ├─systemd-journald.service │ │ └─61 /lib/systemd/systemd-journald │ ├─snap-snapd-12704.mount │ │ └─89 snapfuse /var/lib/snapd/snaps/snapd_12704.snap /snap/snapd/12704 -o ro,nodev,allow_other,suid │ ├─atd.service │ │ └─137 /usr/sbin/atd -f │ ├─unattended-upgrades.service │ │ └─239 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal │ ├─snapd.service │ │ └─125 /usr/lib/snapd/snapd │ ├─rsyslog.service │ │ └─124 /usr/sbin/rsyslogd -n -iNONE │ ├─dbus.service │ │ └─120 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslo> │ ├─systemd-logind.service │ │ └─128 /lib/systemd/systemd-logind │ └─snap-core18-2128.mount │ └─91 snapfuse /var/lib/snapd/snaps/core18_2128.snap /snap/core18/2128 -o ro,nodev,allow_other,suid └─restricted lines 10-38/38 (END)

Steps to reproduce

I followed the instructions, made sure I exited wsl's terminal and ran wsl --terminate Distro on windows cmd, but nothing works, says 'There is no distribution with the supplied name.' then again I ran wsl --terminate Ubuntu-20.04 before opening my wsl terminal. Running systemctl status produced the above logs.

Expected behavior

I expected the status to be active or running but not degraded. Hope nothing has been broken

Windows version

21H1 (OS Build 19043.1415)

Linux kernel version

Linux Amos 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Distro

Ubuntu 20.04

How did you install that distro?

Enabled distrod in an existing WSL2 distro

Logs

[sudo] password for floodcode: [Distrod] Distrod has been enabled. Now your shell will start under systemd. floodcode@Amos:~$ systemctl status ● Amos State: degraded Jobs: 0 queued Failed: 1 units Since: Wed 2021-12-22 01:05:30 WAT; 9min ago CGroup: / ├─init.scope │ └─1 /sbin/init systemd.setenv=WSL_INTEROP=/run/WSL/113_interop systemd.setenv=WSL_DISTRO_NAME=Ubuntu-20.04> ├─system.slice │ ├─snap-lxd-21029.mount │ │ └─90 snapfuse /var/lib/snapd/snaps/lxd_21029.snap /snap/lxd/21029 -o ro,nodev,allow_other,suid │ ├─systemd-udevd.service │ │ └─79 /lib/systemd/systemd-udevd │ ├─cron.service │ │ └─119 /usr/sbin/cron -f │ ├─polkit.service │ │ └─893 /usr/lib/policykit-1/polkitd --no-debug │ ├─networkd-dispatcher.service │ │ └─122 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers │ ├─systemd-journald.service │ │ └─61 /lib/systemd/systemd-journald │ ├─snap-snapd-12704.mount │ │ └─89 snapfuse /var/lib/snapd/snaps/snapd_12704.snap /snap/snapd/12704 -o ro,nodev,allow_other,suid │ ├─atd.service │ │ └─137 /usr/sbin/atd -f │ ├─unattended-upgrades.service │ │ └─239 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal │ ├─snapd.service │ │ └─125 /usr/lib/snapd/snapd │ ├─rsyslog.service │ │ └─124 /usr/sbin/rsyslogd -n -iNONE │ ├─dbus.service │ │ └─120 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslo> │ ├─systemd-logind.service │ │ └─128 /lib/systemd/systemd-logind │ └─snap-core18-2128.mount │ └─91 snapfuse /var/lib/snapd/snaps/core18_2128.snap /snap/core18/2128 -o ro,nodev,allow_other,suid └─restricted lines 10-38/38 (END)

additional comment

Pls help. Thanks

nullpo-head commented 2 years ago

Hi @ggiinetworks , degraded just indicates that some systemd services are failing. It is not a bug of Distrod, and is rarely a serious problem. Just check the result of sudo systemctl --failed to see which service is failing. It it makes sense that the service fails on WSL, such as it is a service to update the firmware, just disable it.

When Distrod does a clean install of a new distro with the wizard, if it is a tested distro, Distrod will fix the systemd services so that no services fail. However, when enabling Distrod on an existing distro, not all services will succeed, as the system may have incompatible systemd services enabled. Anyway, services failing itself is not a serous problem.