Re: [systemd-devel] nfs-convert.service
On Fr, 19.08.22 11:21, Steve Dickson (ste...@redhat.com) wrote: > Hello, > > I'm trying to remove nfsconvert from Fedora but I'm > getting the following systemd error after I removed > the command and the service file. > > # systemctl restart nfs-server > Failed to restart nfs-server.service: Unit nfs-convert.service not > found This is expected if you remove the file first? > There is nothing in the nfs-utils files that > has that service in it... and when I do a > > systemctl list-dependencies --all | grep -1 nfs-convert > > I see every nfs related service dependent on nfs-convert.service Did you issue "systemctl daemon-reload"? Lennart -- Lennart Poettering, Berlin
[systemd-devel] Are logs at /run/log/journal automerged?
Hi, I'm experiencing this on Digital Ocean. The machine id there changes (which I think shouldn't happen) on the first boot (supposedly by cloud-init). In Ubuntu 22.04 droplets, where logs are stored at /var/log/journal, that leads to journalctl outputting no records (because the log for the new machine-id has not been created), unless I pass --file or --merge. Also, the records continue to be added to the old log (for the old machine id). In CentOS 9 droplets, where logs are stored at /run/log/journal, journalctl outputs records from all 3 files: cb754b7b85bb42d1af6b48e7ca843674/system.journal 61238251e3db916639eaa8cd54998712/system@6600bdad291b419c8a0b1fea2564c472-0001-0005e6d123825866.journal 61238251e3db916639eaa8cd54998712/system.journal In this case records also are being added to the old log. But the new log somehow contains the beginning of the log (starting with boot). Is my guess correct? Logs at /run/log/journal are automerged, logs at /var/run/journal aren't.
Re: [systemd-devel] nfs-convert.service
Thanks for the reply! On 8/22/22 4:09 AM, Lennart Poettering wrote: On Fr, 19.08.22 11:21, Steve Dickson (ste...@redhat.com) wrote: Hello, I'm trying to remove nfsconvert from Fedora but I'm getting the following systemd error after I removed the command and the service file. # systemctl restart nfs-server Failed to restart nfs-server.service: Unit nfs-convert.service not found This is expected if you remove the file first? Well, I build a package that didn't include that service file and then installed the new package. I just assumed if the service file didn't exist and didn't exist in any other service files, it would not be called... I guess is not the case. There is nothing in the nfs-utils files that has that service in it... and when I do a systemctl list-dependencies --all | grep -1 nfs-convert I see every nfs related service dependent on nfs-convert.service Did you issue "systemctl daemon-reload"? Yes and rebooted... Back in the day there was this bz Make nfs-convert enabled by adding it to systemd presets [1] I don't know that a systemd presets is, but I'm wondering if that is why nfs-convert services shows up as a dependency of all the rest of the service files. systemctl list-dependencies --all | grep -1 nfs-convert steved. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1683101
Re: [systemd-devel] nfs-convert.service
On 8/22/22 9:46 AM, Steve Dickson wrote: Thanks for the reply! On 8/22/22 4:09 AM, Lennart Poettering wrote: On Fr, 19.08.22 11:21, Steve Dickson (ste...@redhat.com) wrote: Hello, I'm trying to remove nfsconvert from Fedora but I'm getting the following systemd error after I removed the command and the service file. # systemctl restart nfs-server Failed to restart nfs-server.service: Unit nfs-convert.service not found This is expected if you remove the file first? Well, I build a package that didn't include that service file and then installed the new package. I just assumed if the service file didn't exist and didn't exist in any other service files, it would not be called... I guess is not the case. There is nothing in the nfs-utils files that has that service in it... and when I do a systemctl list-dependencies --all | grep -1 nfs-convert I see every nfs related service dependent on nfs-convert.service Did you issue "systemctl daemon-reload"? Yes and rebooted... Back in the day there was this bz Make nfs-convert enabled by adding it to systemd presets [1] I don't know that a systemd presets is, but I'm wondering if that is why nfs-convert services shows up as a dependency of all the rest of the service files. systemctl list-dependencies --all | grep -1 nfs-convert It turns out all that's needed is a %triggerun to disable the service on the way out... Sorry for the noise... steved. steved. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1683101
Re: [systemd-devel] nfs-convert.service
On Fri, Aug 19, 2022 at 11:21:49AM -0400, Steve Dickson wrote: > Hello, > > I'm trying to remove nfsconvert from Fedora but I'm > getting the following systemd error after I removed > the command and the service file. > > # systemctl restart nfs-server > Failed to restart nfs-server.service: Unit nfs-convert.service not found > > Was this service add to something in the systemd world? > If so, how do I remove it? The nfs-convert.service had the following inside: #v+ [Install] RequiredBy=nfs-server.service RequiredBy=nfs-mountd.service RequiredBy=nfs-idmapd.service RequiredBy=nfs-blkmap.service RequiredBy=rpc-statd.service RequiredBy=rpc-gssd.service RequiredBy=rpc-statd-notify.service #v- Therefore, if enabled, the symlinks were probably created: % locate nfs-convert /etc/systemd/system/nfs-blkmap.service.requires/nfs-convert.service /etc/systemd/system/nfs-idmapd.service.requires/nfs-convert.service /etc/systemd/system/nfs-mountd.service.requires/nfs-convert.service /etc/systemd/system/nfs-server.service.requires/nfs-convert.service /etc/systemd/system/rpc-gssd.service.requires/nfs-convert.service /etc/systemd/system/rpc-statd-notify.service.requires/nfs-convert.service /etc/systemd/system/rpc-statd.service.requires/nfs-convert.service Above symlinks should be removed, too. (this is from my Fedora 36 system, I may be different in Rawhide) -- Tomasz Torcz “God, root, what's the difference?” to...@pipebreaker.pl “God is more forgiving.”
[systemd-devel] logging for socket-based services
Hello, I have recently ported a number of xinetd services to systemd socket-based services. The services are working as expected but my logs are now flooded with "systemd: Started ..." messages. Is there any way to tune the logging for these services to filter out these entries?
Re: [systemd-devel] logging for socket-based services
As far as I know, only "[Service] LogLevelMax=notice" can hide those messages, but it also has the side effect of discarding *all* lower-level log messages generated by the service (even through syslog or journal APIs), so IMO it's kind of a last-resort option. But if your services receive so many connections that these messages are overwhelming the system logs, they should probably be rewritten to accept connections internally (i.e. use systemd Accept=no or xinetd wait=yes, so that the service will receive the "listener" sockets from systemd, put them in a regular event loop) instead of starting a new instance for each connection. On Mon, Aug 22, 2022 at 9:15 PM Allison Sherburne < allison.k.sherbu...@gmail.com> wrote: > Hello, > > I have recently ported a number of xinetd services to systemd socket-based > services. The services are working as expected but my logs are now flooded > with "systemd: Started ..." messages. Is there any way to tune the logging > for these services to filter out these entries? > -- Mantas Mikulėnas