Re: Ton of random units "could not be found"

2023-12-19 Thread chandler
Lennart Poettering wrote on 12/16/23 7:31 AM:
> Just drop the "--all" from your
> command line.

Unfortunately, there's a stark difference between `systemctl status` and
`systemctl status --all`.  For example, the former just prints a tree
layout.  It tells me if there are any failures but doesn't indicate
which specific units have failed.  The latter, however, actually runs a
`status ` for everything as well.  

I'm glad these "could not be found" messages are harmless, the fact they
show up in red though is a bit annoying.  When I find the time, I'll
make a note of which ones seem to be caused by bugs and follow up with
the appropriate maintainer/team.

Thanks all!



Re: Ton of random units "could not be found"

2023-12-16 Thread Uoti Urpala
On Sat, 2023-12-16 at 15:31 +0100, Lennart Poettering wrote:
> On Fr, 15.12.23 22:17, chandler (s...@riseup.net) wrote:
> >     Other items have different situations, like tmp.mount exists at
> > /usr/share/systemd/tmp.mount but isn't an enabled unit or anything, if I
> > try to enable or unmask it I'm just told "Unit tmp.mount could not be
> > found." or "Unit file tmp.mount does not exist."
> 
> /usr/share/systemd/ is not a directory systemd ever looks into for
> unit files. If debian packaged something there, this smells like a
> bug. Please report to your distro.

Debian does not use tmpfs for /tmp by default. The unit is placed there
because it's intentionally not in use unless you enable it (and not
just by "systemctl enable", I believe it's done this way to prevent any
dependencies in other units from accidentally activating it, possibly
at a moment when it would hide already existing contents of /tmp).


Re: Ton of random units "could not be found"

2023-12-16 Thread Lennart Poettering
On Fr, 15.12.23 22:17, chandler (s...@riseup.net) wrote:

> Hi all,
>
>     When I run `systemctl status --all` I see a ton of "Unit X could not
> be found" where X = an item from the list below.  How did this mess
> happen and how to clean it up?  None of these units represent things the
> system is using, for the most part.

This is not an issue. As Andrei already answered this just tells you
that some services have ordering deps against other units which aren't
installed, which is entirely fine. It's just metainfo that if you
install some packages in combination the right order is applied.

There's a reason why these entries are generally not shown. Except you
used "--all", which literally means "Hey, please also show me
*everything* you have heard about". Just drop the "--all" from your
command line.

>     Some units appear to be remnants left behind in /etc/systemd, for
> example /etc/systemd/system/ntp.service is a symlink pointing to
> non-existent /lib/systemd/system/ntpsec.service.  I can delete
> /etc/systemd/system/ntp.service and after `systemctl daemon-reload` it's
> now gone from the list below.

That smells like a packaging bug, you removed some package and it
forgot to invoke "systemctl disable" from it's pakaging uninstall
scripts first. File a bug against yout distro.

>     Other items have different situations, like tmp.mount exists at
> /usr/share/systemd/tmp.mount but isn't an enabled unit or anything, if I
> try to enable or unmask it I'm just told "Unit tmp.mount could not be
> found." or "Unit file tmp.mount does not exist."

/usr/share/systemd/ is not a directory systemd ever looks into for
unit files. If debian packaged something there, this smells like a
bug. Please report to your distro.

Lennart

--
Lennart Poettering, Berlin


Re: Ton of random units "could not be found"

2023-12-15 Thread Andrei Borzenkov

On 16.12.2023 08:17, chandler wrote:

Hi all,

     When I run `systemctl status --all` I see a ton of "Unit X could not
be found" where X = an item from the list below.  How did this mess
happen and how to clean it up?  None of these units represent things the
system is using, for the most part.



There is no mess. Units, listed as dependencies in Wants, After, Before, 
do not need to exist. It is pretty common when a project ships units 
listing other well-known units as dependency, so if they are added, your 
program just continues to work without any manual adjustments.



     Some units appear to be remnants left behind in /etc/systemd, for
example /etc/systemd/system/ntp.service is a symlink pointing to
non-existent /lib/systemd/system/ntpsec.service.  I can delete
/etc/systemd/system/ntp.service and after `systemctl daemon-reload` it's
now gone from the list below.

     Other items have different situations, like tmp.mount exists at
/usr/share/systemd/tmp.mount but isn't an enabled unit or anything, if I
try to enable or unmask it I'm just told "Unit tmp.mount could not be
found." or "Unit file tmp.mount does not exist."

systemd is 252.19-1~deb12u1 from Debian 12 bookworm/main repo

Thanks

boot.automount
home.mount
tmp.mount
ntpsec-systemd-netif.path
auditd.service
clamav-daemon.service
connman.service
console-screen.service
display-manager.service
fcoe.service
greylist.service
ip6tables.service
ipset.service
iptables.service
iscsi-shutdown.service
iscsi.service
iscsid.service
kbd.service
mysql.service
NetworkManager.service
ntp.service
ntpsec.service
plymouth-quit-wait.service
plymouth-start.service
postgresql.service
rbdmap.service
spamassassin.service
systemd-hwdb-update.service
systemd-oomd.service
systemd-update-done.service
systemd-vconsole-setup.service
ntpsec-rotate-stats.timer





Ton of random units "could not be found"

2023-12-15 Thread chandler
Hi all,

    When I run `systemctl status --all` I see a ton of "Unit X could not
be found" where X = an item from the list below.  How did this mess
happen and how to clean it up?  None of these units represent things the
system is using, for the most part.

    Some units appear to be remnants left behind in /etc/systemd, for
example /etc/systemd/system/ntp.service is a symlink pointing to
non-existent /lib/systemd/system/ntpsec.service.  I can delete
/etc/systemd/system/ntp.service and after `systemctl daemon-reload` it's
now gone from the list below.

    Other items have different situations, like tmp.mount exists at
/usr/share/systemd/tmp.mount but isn't an enabled unit or anything, if I
try to enable or unmask it I'm just told "Unit tmp.mount could not be
found." or "Unit file tmp.mount does not exist."

systemd is 252.19-1~deb12u1 from Debian 12 bookworm/main repo

Thanks

boot.automount
home.mount
tmp.mount
ntpsec-systemd-netif.path
auditd.service
clamav-daemon.service
connman.service
console-screen.service
display-manager.service
fcoe.service
greylist.service
ip6tables.service
ipset.service
iptables.service
iscsi-shutdown.service
iscsi.service
iscsid.service
kbd.service
mysql.service
NetworkManager.service
ntp.service
ntpsec.service
plymouth-quit-wait.service
plymouth-start.service
postgresql.service
rbdmap.service
spamassassin.service
systemd-hwdb-update.service
systemd-oomd.service
systemd-update-done.service
systemd-vconsole-setup.service
ntpsec-rotate-stats.timer