Re: [systemd-devel] How to prevent users form seeing other user processes with loginctl/systemctl ?

2023-06-04 Thread Tomasz Torcz
On Sun, Jun 04, 2023 at 11:50:20AM +0200, antisimus wrote:
> Hello,
> 
> Is there a way to hide process information (pids, command line) and prevent
> one user accessing other user processes information.

  You can achieve that by mounting /proc with hidepid= option:
  https://docs.kernel.org/filesystems/proc.html#mount-options


-- 
Tomasz Torcz   72->|   80->|
to...@pipebreaker.pl   72->|   80->|



Re: [systemd-devel] how to let systemd hibernate start/stop the swap area?

2023-03-31 Thread Tomasz Torcz
On Fri, Mar 31, 2023 at 06:24:09PM +1100, Michael Chapman wrote:
> On Fri, 31 Mar 2023, Barry wrote:
> [...]
> > If you want to run in ram only then you must turn off the kernel overcommit.
> > Have you done that? If not then you risk processes getting SEGV signals.
> 
> Seriously. It's almost as if nobody here is actually reading anything of 
> what I've written!
> 
> EVERYTHING fits in RAM. The non-guest processes total perhaps a GB in 
> total. The guest processes total maybe 200 GB in total. The server has 
> more RAM than all of that.

  Your situation seems to be special. People in this thread seem to be
focused on generic Linux computer use-case.


> I know this works because I have literally done it on many, many 
> hypervisors for over a decade.

  On the other hand, kernel 4.0, which greatly changed how swap works*,
was released half a decade ago. Maybe it's time to revisit assumptions?

* according to Chris Down's blog note linked by Lennart at the beginning
  of the thread.

-- 
Tomasz Torcz   72->|   80->|
to...@pipebreaker.pl   72->|   80->|



Re: [systemd-devel] nfs-convert.service

2022-08-22 Thread Tomasz Torcz
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.”



Re: [systemd-devel] Q: Change a kernel setting

2022-07-29 Thread Tomasz Torcz
On Fri, Jul 29, 2022 at 08:45:51AM +0200, Ulrich Windl wrote:
> Hi!
> 
> I wonder: What is the recommended way to do this with systemd?:
> ---
> Add the following command to a script executed on system boot, such as 
> /etc/init.d/boot.local:
> 
> # echo 0 > /sys/kernel/mm/ksm/run
> ---
> Do I have to write a unit for it, or is there some generic mechanism already?

  You can use tmpfiles. In the manpage
(https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html)
there's a following example, which you can adapt:

# Modify sysfs but don't fail if we are in a container with a read-only /proc
w- /proc/sys/vm/swappiness - - - - 10


-- 
Tomasz Torcz   “(…) today's high-end is tomorrow's embedded processor.”
to...@pipebreaker.pl  — Mitchell Blank on LKML



Re: [systemd-devel] Apache APISIX on CentOS Linux release 7.9.2009 (Core)

2022-04-14 Thread Tomasz Torcz
On Thu, Apr 14, 2022 at 11:38:42PM +0530, Kaushal Shriyan wrote:
> Apr 14 23:29:42 apacheapisixapigateway apisix[1798]: etcd cluster version
> 3.3.0 is less than the required version 3.4.0, please upgrade your etcd
> cluster

  Here's the relevant message.

-- 
Tomasz Torcz   “Never underestimate the bandwidth of a station
to...@pipebreaker.plwagon filled with backup tapes.”  — Jim Gray



Re: [systemd-devel] trivial net connection logs - ?

2022-04-11 Thread Tomasz Torcz
On Mon, Apr 11, 2022 at 08:28:28AM +0100, lejeczek wrote:
> Hi gents
> 
> I must have gone blind cause can't find it in man page and to my surprise
> internet search does not help or my quering is broken.
> 'systemctl' can show status for specific NM connection - what was that? -
> and can 'journalctl' do the same? (or was it the opposite way?)

  There's no such integration, although there are some options:

  - `nmcli`, and `nmcli c` in particualar, native NM tool to manage
connections

  - `networkctl` can show information about interface, including the
ones managed by NM

  - NM put some additional fields in journal, you can filter on them
with for example `journalctl NM_DEVICE=wlp61s0`; to see more fields use
something like:
`journalctl -u NetworkManager -o export | grep ^NM_`

  - some distribution (Arch?) have a generator creating a instance unit
for each interface, but I do not know specifics

-- 
Tomasz Torcz   RIP is irrevelant. Spoofing is futile.
to...@pipebreaker.pl Your routes will be aggreggated. -- Alex Yuriev



Re: [systemd-devel] Odd behaviour on boot

2022-02-08 Thread Tomasz Torcz
On Mon, Feb 07, 2022 at 08:58:18PM +0100, Tomasz Torcz wrote:
> On Mon, Feb 07, 2022 at 07:28:46PM +, Wols Lists wrote:
> > Thank you very much. I think that explains WHAT is going on, now to find out
> > why. But that's not your problem.
> 
>   It does not explain. It's just an educated guesswork. We won't reach
> explanation until you check journal logs.

  I'm sorry, I've missed that you in fact posted the logs.
I was corrected off-list.


-- 
Tomasz Torcz   There exists no separation between gods and men:
to...@pipebreaker.pl   one blends softly casual into the other.  — Frank 
Herbert



Re: [systemd-devel] Odd behaviour on boot

2022-02-07 Thread Tomasz Torcz
On Mon, Feb 07, 2022 at 07:28:46PM +, Wols Lists wrote:
> On 07/02/2022 17:55, Mantas Mikulėnas wrote:
> > Basically you have *a lot* of service daemons getting killed – some of
> > them restart cleanly, others not – and it looks a bit like scarletdme is
> > the one doing it. It even looks like it ended up killing itself, too.
> 
> Thank you very much. I think that explains WHAT is going on, now to find out
> why. But that's not your problem.

  It does not explain. It's just an educated guesswork. We won't reach
explanation until you check journal logs.

-- 
Tomasz Torcz Morality must always be based on practicality.
to...@pipebreaker.pl — Baron Vladimir Harkonnen



Re: [systemd-devel] Ordering of systemd-tmpfiles-setup.service and systemd-modules-load.service

2021-06-23 Thread Tomasz Torcz
Dnia Wed, Jun 23, 2021 at 01:25:58PM -0500, Ian Pilcher napisał(a):
> On 6/23/21 1:18 PM, Tomasz Torcz wrote:
> >lm_sensors library ought to be used as abstraction layer, hiding
> > specific hwmon? devices. You can call ‘sensors it8728-isa-0a30'
> > and have the same output regardless of module loading order.
> > Try sesnors with -u, -j or language bindings for full flexibility.
> 
> AFAIK, lm_sensors does not provide an API that an application can use
> to read sensor values, control fan speeds, etc.

https://github.com/lm-sensors/lm-sensors/blob/master/doc/libsensors-API.txt
I'm using ctypes-based bindings for Python from 
https://github.com/paroj/sensors.py
-- 
Tomasz Torcz  “If you try to upissue this patchset I shall be 
seeking
to...@pipebreaker.pl   an IP-routable hand grenade.”  — Andrew Morton (LKML)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Ordering of systemd-tmpfiles-setup.service and systemd-modules-load.service

2021-06-23 Thread Tomasz Torcz
Dnia Wed, Jun 23, 2021 at 01:03:08PM -0500, Ian Pilcher napisał(a):
> I'd like to ensure that I have a stable path to the sysfs files
> associated with the IT8728F hardware monitoring chip in this system.
> Depending on the order in which various modules are loaded, I've seen
> them show up at different paths:
> 
>  * /sys/devices/platform/it87.656/hwmon/hwmon0
>  * /sys/devices/platform/it87.656/hwmon/hwmon1
> 
> Is there a better way than udev to achieve this?

  lm_sensors library ought to be used as abstraction layer, hiding
specific hwmon? devices. You can call ‘sensors it8728-isa-0a30'
and have the same output regardless of module loading order.
Try sesnors with -u, -j or language bindings for full flexibility.

-- 
Tomasz Torcz  “If you try to upissue this patchset I shall be 
seeking
to...@pipebreaker.pl   an IP-routable hand grenade.”  — Andrew Morton (LKML)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Are Pathnames in /tmp/systemd-private-foo predictable?

2021-06-13 Thread Tomasz Torcz
Dnia Sun, Jun 13, 2021 at 09:04:04PM +0200, Marc Haber napisał(a):
> Hi,
> 
> I am wondering where the 32 xdigit number in pathnames like
> 
> systemd-private-27aa635a15cf4da0a7ebda10f25c3950-chrony.service-9DShFi/
> 
> comes from. I always had the impression that it's the systemd/dbus
> machine id, but that does not seem to be the case. Is that just an
> arbitrary random number, or can it be predicted in a way?

  Come, the source code is here!  src/core/namespace.c to be precise.
The long nuber is boot_id
(https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#random),
a number changing for every boot.
The last few (9DShFi) characters are random.

-- 
Tomasz Torcz   There exists no separation between gods and men:
to...@pipebreaker.pl   one blends softly casual into the other.  — Frank 
Herbert

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Script in system-sleep that makes an HTTP post

2021-06-11 Thread Tomasz Torcz
Dnia Fri, Jun 11, 2021 at 10:50:34AM -0400, Doug Koobs napisał(a):
> Hello all,
> 
> tldr: Is there way I can use systemd to run scripts in
> /usr/lib/systemd/system-sleep at suspend before disabling the network?
>     curl: (6) Could not resolve host: maker.ifttt.com
> 
> My assumption is that systemd disables networking before the system-sleep
> scripts are run. Is there way I can use systemd to run the script before
> disabling the network?

  Looking at match_prepare_for_sleep() function in systemd-networkd, it
doesn't seem to do anything. So systemd do not touch network when
sleeping.
  But if you use NetworkManager, it has quite comprehensive handling of
the sleep signal. You may want to look at NM configuration to see what
can be done.
  If you're using another network management software, the story can be
similar to NM. Anyway, systemd does not touch network when suspending.


-- 
Tomasz Torcz   There exists no separation between gods and men:
to...@pipebreaker.pl   one blends softly casual into the other.  — Frank 
Herbert

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] bitcoind.service activation problem

2021-04-10 Thread Tomasz Torcz
Dnia Sat, Apr 10, 2021 at 05:39:34PM +0600, Shafiun Miraz napisał(a):
> [image: image.png]
> [image: image.png]
> I am getting this error. Please someone help me!

  Hey Shafiun, couple of notes:

- sending screenshots is not helpful, please just copy the message next
  time;

- there are no actual information why bitcoind.service is not starting.
  Use "systemctl status bitcoind" to see more information and logs
  related to the bitcoind.service. You can also use 
  "journalctl -u bitcoind.service" to see full logs.

  I expect startup problem is connected to bitcoind's configuration, but
  without logs it's only guesswork.

- finally, this is not a correct place to get support. Please open a bug
  with your Linux Distribution and ask them to replace systemd-devel URL
  with real support address (bugzilla, forum, github issues etc.).
  This way users will get quicker support in the future.

-- 
Tomasz TorczOnly gods can safely risk perfection,
to...@pipebreaker.pl it's a dangerous thing for a man.  — Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] usb-storage: Add quirk to defeat Kindle's automatic unload

2021-03-18 Thread Tomasz Torcz
Dnia Wed, Mar 17, 2021 at 03:06:54PM -0400, Alan Stern napisał(a):
> Matthias reports that the Amazon Kindle automatically removes its
> emulated media if it doesn't receive another SCSI command within about
> one second after a SYNCHRONIZE CACHE.  It does so even when the host
> has sent a PREVENT MEDIUM REMOVAL command.  The reason for this
> behavior isn't clear, although it's not hard to make some guesses.

  Could Kindle be fixed not to required such workaround? Is there a way
to open a bug with Amazon?

-- 
Tomasz TorczOnce you've read the dictionary,
@ttorcz:pipebreaker.pl  every other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Why systemd-nspawn is slower than docker, podman and qemu?! how to Improve nspawn performance?

2021-01-25 Thread Tomasz Torcz
On Mon, Jan 25, 2021 at 11:56:09AM +0100, Badr Elmers wrote:
> Hi,
> Why nspawn is slow compared to docker podman and even qemu?!
> CPU tasks take twice of the time it takes in docker, podman or qemu
> 
> here I filled a request to improve nspawn performance which contain the
> steps and the full test result:
> https://github.com/systemd/systemd/issues/18370
> 
> Do you know why systemd-nspawn is slower? how can I improve it?

  Your benchmark measures context switch speed. Is it really important
in your workload?  I somehow doubt this is worth improving.


-- 
Tomasz Torcz“Funeral in the morning, IDE hacking
to...@pipebreaker.pl in the afternoon and evening.” - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] date/time set to epoch when using readonly rootfs

2020-10-21 Thread Tomasz Torcz
On Wed, Oct 21, 2020 at 10:13:10PM +0200, Belisko Marek wrote:
> Hi,
> 
> I'm facing a strange issue. When I boot system using systemd (244.3)
> and in one service I'm generating some certificates. When checking
> them I'm getting the result that the certificate was created 1.1.1970
> which is invalid. I can wait until I get a network connection and only
> then create certificates but I have only issues that some files are
> created and I'm getting date/time creation also epoch. Shouldn't it be
> the date/time of build? Can this be caused somehow by using read only
> rootfs? Thanks a lot for any pointers.

  Waiting for network is probably a wrong think to do. You want
After=time-sync.target (see man systemd.special). Of course you need
something to provide this target.  Do you have
systemd-timesyncd.service* enabled?

* it's systemd's implementation of SNTP. Also tries to set system time to at
least time of last shutdown.


-- 
Tomasz Torcz   “Never underestimate the bandwidth of a station
to...@pipebreaker.plwagon filled with backup tapes.”  — Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Memory in systemctl status

2020-09-28 Thread Tomasz Torcz
On Mon, Sep 28, 2020 at 10:08:15AM +0200, Reindl Harald wrote:
> Am 27.09.20 um 23:39 schrieb Benjamin Berg:
> >>>> however, that value makes little to no sense and if that's the same
> >>>> value as accounted for "MemoryMax" it's plain wrong
> > But it does make sense. File caches are part of the working set of
> > memory that a process needs. Setting MemoryMax=/MemoryMin=
> > limits/guarantees the size of this working set. These kinds of limits
> > or protections would be a lot less meaningful if caches were not
> > accounted for.
> 
> sorry but that is complete nosense
> 
> caches are freed as soon whatever process asks for RAM and so they are
> *not* part of the working set
> 
> 
> my webserver is killed because it served at monday, tuesday, thursday
> and friday 4 different files with 2 GB?

  Why "killed", you wrote yourself caches are freed. So are they freed
or aren't they?


-- 
Tomasz Torcz   “Never underestimate the bandwidth of a station
to...@pipebreaker.plwagon filled with backup tapes.”  — Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Q: Start a unit n minutes after a successful boot

2020-09-08 Thread Tomasz Torcz
On Tue, Sep 08, 2020 at 09:21:02AM +0200, Ulrich Windl wrote:
> Hi!
> 
> Configuring a new system with non-redundant system disk I'm wondering:
> How could I start an automatic backup job that is triggered n minutes
> after the system started successfully (to avoid backing up broken
> configurations)?

  Timer with "OnBootSec=n minutes" is exactly what you want, right? 

For judging if boot was successfull there are different approaches.
On my Fedora I see user unit with timer activating after 2 minutes. 
If user session lasted for that long, then
ExecStart=/usr/sbin/grub2-set-bootflag boot_success
is invoked. There were some discussion on this mailinglist how to
improve detection and marking of good boot..

-- 
Tomasz TorczOnce you've read the dictionary,
to...@pipebreaker.plevery other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Antw: [EXT] Journal message timestamps

2020-08-28 Thread Tomasz Torcz
On Fri, Aug 28, 2020 at 10:48:18AM +0300, Mantas Mikulėnas wrote:
> On Fri, Aug 28, 2020, 10:06 Ulrich Windl 
> wrote:
> 
> > >>> Mark Corbin  schrieb am 27.08.2020 um 12:33 in
> > Nachricht
> > :
> > > Hello
> > >
> > > I am working on time synchronisation issues at boot for systems without
> > > an RTC (using balenaOS on a Raspberry Pi 3) and have some questions
> > > about how journald assigns timestamps to log messages.
> > >
> >
> > One idea would be to have a "timestamp file" (much like a low-resolution
> > software RTC) that is updated periodically when it's known that the system
> > time
> > is correct. Then after boot you would get a good guess, and time wouldn't
> > jump
> > backwards, too.
> >
> 
> I believe systemd already does that, although I keep forgetting the details
> – not sure if it's part of core or if it's part of systemd-timesyncd.

  timesyncd:

  Files
  /var/lib/systemd/timesync/clock
  The modification time of this file indicates the timestamp of the last
  successful synchronization (or at least the systemd build date, in
  case synchronization was not possible).

On boot, time is stepped to the timestamp of above file.


-- 
Tomasz TorczTo co nierealne – tutaj jest normalne.
to...@pipebreaker.pl  Ziomale na życie mają tu patenty specjalne.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Need help with setting up systemd for Apache on Debian 10

2020-08-23 Thread Tomasz Torcz
On Sun, Aug 23, 2020 at 12:19:15PM -0500, Tom Browder wrote:
> There is no official Apache systemd setup for Apache from source, and
> I didn't get any help from users there. I tried to mimic a good
> solution by first installing Apache with the Debian package and
> finding all the systemd files with "httpd" or "apache" in the name.
> That resulted in the following list:
> 
> /etc/systemd/system/multi-user.target.wants/apache2.service

  That a symlink causing apache httpd to be started on boot.

> /run/systemd/units/invocation:apache2.service

  Internal stuff, ignore.

> /usr/lib/systemd/system/apache2.service

  This is the only file that matters.

> /var/lib/systemd/deb-systemd-helper-enabled/apache2.service.dsh-also
> 
> /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/apache2.service

  This is some Debian stuff.

> The contents of the "apache2.service" file are:

  That's one way correct way to do it. To see other, check httpd.service
as shipped by Fedora: https://src.fedoraproject.org/rpms/httpd/tree/master

 
> I assume the data are correct, and I'm pretty sure there is some
> fancy, automated sysstemctl way to get it all working.  I would
> greatly appreciate some guidance as to how to install the files
> correctly.

  First of all, you got correct installation by installing distribution
package.  You can stop there.
  If you want to do the work, anyway, do the following:
  – read man systemd.unit, systemd.service, maybe some systemd tutorials
  – devise your own service unit file for apache httd; you have two
examples already
  – in your package, install the unit into /usr/lib/systemd/system/


-- 
Tomasz TorczTo co nierealne – tutaj jest normalne.
to...@pipebreaker.pl  Ziomale na życie mają tu patenty specjalne.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [question] is it possible with systemd-journalctl to change the location to save logs in other location?

2020-08-16 Thread Tomasz Torcz
On Sun, Aug 16, 2020 at 04:35:48PM +, ionut n wrote:
> 
> Hi SystemD Team,

  It's "systemd" (all lowercase).

> 
> One question.
> 
> Is it possible with systemd-journalctl to change the location to save logs in 
> other location?
> 
> My system is volatile (tmpfs) and I have another location available to keep 
> certain logs.
>
>- /dev/root or / is tmpfs
>- /external-persistent0 is ext4 or xfs
> 
> I would like to save the logs here:
> /external-persistent0/journal
> 
> Is it possible to do this?
> In the current documentation for journalctl I have not seen anything about 
> this.

  Journal stores persistent logs in /var/log/journal, so best course of
action would be to mount --bind /external-persistent0/journal /var/log/journal
A symlink from /var/log/journal to /external-persistent0/journal may
work, too.

-- 
Tomasz TorczTo co nierealne – tutaj jest normalne.
to...@pipebreaker.pl  Ziomale na życie mają tu patenty specjalne.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Running scripts after networkd has done its things

2020-07-25 Thread Tomasz Torcz
On Fri, Jul 24, 2020 at 04:44:04PM -0400, John Ioannidis wrote:
> I'm trying to be a good boy and migrate as much functionality as I can to
> networkd.
> 
> I'm happy with how networkd manages "internal" and "external" interfaces
> and vlans for just setting up IPv4 addresses, but I still find support for
> IPv6 to be woefully inadequate, at least for my environment;
> netfilter/ipfilter support is also too rudimentary. What would be the
> "correct" (whatever that means!) way to run scripts after networkd has
> finished coming up, and before it has started going down? Essentially, I
> want to emulate the up/down feature of ifupdown.

  You may want to look at
  https://gitlab.com/craftyguy/networkd-dispatcher

  Please note, this isn't part of systemd project.  It's 3rd party software.


-- 
Tomasz Torcz   “Never underestimate the bandwidth of a station
to...@pipebreaker.plwagon filled with backup tapes.”  — Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Upstreaming systemd patch

2020-07-10 Thread Tomasz Torcz
On Fri, Jul 10, 2020 at 08:13:59PM +0530, Amit anand wrote:
> Hi systemd-devel group,
> 
> 
> I need to upstream systemd git patch for fixing systemd static code
> analysis warnings.
> 
> Can you please suggest me the correct mailgroup to send the git patch or
> relevant web url which have information to upstream git patch.

  The correct way is to create Pull Request on GitHub with your changes.
Here you have detailed documentation:
https://github.com/systemd/systemd/blob/master/docs/CONTRIBUTING.md

-- 
Tomasz TorczOnly gods can safely risk perfection,
to...@pipebreaker.pl it's a dangerous thing for a man.  — Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-07 Thread Tomasz Torcz
On Thu, May 07, 2020 at 08:56:24AM +0200, Lennart Poettering wrote:
> > > >  Is there an API in systemd to move specific program to a dedicated
> > > >  slice?
> > >
> > > Use Slice= in the service file.
> >
> >   That would require having a service file.  I don't have it. I just have a
> > single process in session which I need to treat specially.  Thus I move
> > it to separate slice.  I have /etc/systemd/system/kodi.slice to define
> > this separate slice and resource controls for it.
> 
> use "systemd-run --scope --slice=kodi.slice …" for that.

  That's not moving, that's starting a new instance.

> Really, if you muck around with the cgroup tree yourself you void all
> warranty. I mean, it's Linux you can do whatever you want, but it's
> certainly outside of how this is intended to be used, i.e. the
> cgroupsv2 "single writer" concept.
> 
> Please read up on this here:
> 
> https://systemd.io/CGROUP_DELEGATION
> It's documented in all length...

  From quick glance, it talks about a bit different concepts.
I'm not delegating, I'm using systemd to manage tree for me.
There are no multiple writers - only systemd (no kubernetes and such).

  But let me read this webpage carefully first.

-- 
Tomasz Torcz   72->|   80->|
to...@pipebreaker.pl   72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-07 Thread Tomasz Torcz
On Wed, May 06, 2020 at 11:53:14PM +0200, Lennart Poettering wrote:
> > > >
> > > >   You can use low-level cgroup access to move it. Something like:
> > > > systemctl show --property MainPID --value your.service >
> > > > /sys/fs/cgroup/NEW.slice/cgroup.procs
> > >
> > > You void your warranty if you do that. Moreover, on cgroupvs2 this
> > > doesn't work really, since inner cgroups cannot have processes and
> > > slices are by definition inner cgroups.
> >
> >   Doesn't work? I beg to differ, the following is on Fedora 31:
> >
> > Control group /:
> > -.slice
> > ├─kodi.slice
> > │ └─2872766 /usr/lib64/kodi/kodi-wayland  ← here it has process
> 
> 
> >  Is there an API in systemd to move specific program to a dedicated
> >  slice?
> 
> Use Slice= in the service file.
 
  That would require having a service file.  I don't have it. I just have a
single process in session which I need to treat specially.  Thus I move
it to separate slice.  I have /etc/systemd/system/kodi.slice to define
this separate slice and resource controls for it.


> >   In my usecase, I've created a top-level .slice for Kodi player. I want
> > it to have priority over everything on my machine - over other users'
> > processes, over virtual machines, over everything in system.slice.
> > I achieve it by having this top-level slice with CPUShares, CPUWeight,
> > BlockIOWeight, IOWeight much higher and IODeviceLatencyTargetSec
> > much lower than rest of the slices.  Seems to work.
> 
> I presume you you mean a top-level slice in the system manager? If so
> you need to run kodi as a system service too.

  That wouldn't work, Kodi is strictly tied to user session - file
permissions, configurations, access to screen and audio (Kodi is a media
player), interaction with other parts of user session.

> If you want to run kodi as user service, then assign your user the
> resources you want to assign to kodi, and then distribute them from
> there to kodi, and reduce it for the rest.

  This user has a bunch of other things running (compilation, emails,
batch jobs, torrents). I want Kodi to be isolated from the interference.
Slices/scopes (are they different? Manpage descriptions of them seem to say the
same things using slightly different words) should do the trick.

 P.S. I'm sorry for hijacking original poster's thread.

-- 
Tomasz Torcz   72->|   80->|
to...@pipebreaker.pl   72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-06 Thread Tomasz Torcz
On Wed, May 06, 2020 at 05:18:34PM +0200, Lennart Poettering wrote:
> On Mo, 04.05.20 08:31, Tomasz Torcz (to...@pipebreaker.pl) wrote:
> 
> > On Mon, May 04, 2020 at 11:52:37AM +0530, nitish nagesh wrote:
> > > Hello,
> > >
> > >We have this odd want to move a daemon between different systemd 
> > > slices.
> > > Not sure if that's even a valid thing to do, but here is the requirement.
> >
> >   You can use low-level cgroup access to move it. Something like:
> > systemctl show --property MainPID --value your.service >
> > /sys/fs/cgroup/NEW.slice/cgroup.procs
> 
> You void your warranty if you do that. Moreover, on cgroupvs2 this
> doesn't work really, since inner cgroups cannot have processes and
> slices are by definition inner cgroups.

  Doesn't work? I beg to differ, the following is on Fedora 31:

Control group /:
-.slice
├─kodi.slice
│ └─2872766 /usr/lib64/kodi/kodi-wayland  ← here it has process
├─user.slice
│ ├─user-1001.slice
│ ├─user-0.slice
│ └─user-1000.slice
│   ├─user@1000.service
│   │ └─init.scope
│   │   ├─2914978 /usr/lib/systemd/systemd --user
│   │   └─2914990 (sd-pam)
│   ├─session-356.scope
│   │ └─2915060 /usr/libexec/openssh/sftp-server
│   └─session-354.scope
│ └─2915015 /usr/libexec/openssh/sftp-server
├─init.scope
│ └─1 /usr/lib/systemd/systemd --system --deserialize 214
├─system.slice
│ ├─rngd.service
│ ├─abrt-oops.service
[…]
│ └─smokeping.service
│   ├─5423 /usr/bin/perl /usr/sbin/smokeping --nodaemon
│   ├─7804 /usr/sbin/smokeping [FPing]
│   └─7805 /usr/sbin/smokeping [FPing6]
└─machine.slice
  ├─machine-qemu\x2d67\x2dkaitain.scope
  │ ├─2905751 /usr/bin/qemu-system-x86_64 -machine accel=kvm -name guest=kaitai…
  │ ├─vcpu0
  │ └─emulator
  ├─machine-qemu\x2d9\x2dnaib.scope
[…]

 (heavily trimmed, but shows the idea)

> There is supposed to be only one manager of the top-level cgroup
> tree. On systemd systems. If you muck with the cgroup tree anyway you
> are interfering with systemd#s management and things will fall apart
> sooner or later.
> if you want to muck around in the cgroup tree, acquire a delegated
> cgroup subtree, where you can do whatever you want.

 Is there an API in systemd to move specific program to a dedicated slice?
I know recent gnome-shell starts every application in dedicate scope,
but it's under *user* instance. Which means:
– no ability to increase priority of program in such scope
- still fights over resources with other user scopes, and other users in
  general.

  In my usecase, I've created a top-level .slice for Kodi player. I want
it to have priority over everything on my machine - over other users'
processes, over virtual machines, over everything in system.slice.
I achieve it by having this top-level slice with CPUShares, CPUWeight,
BlockIOWeight, IOWeight much higher and IODeviceLatencyTargetSec
much lower than rest of the slices.  Seems to work.

-- 
Tomasz Torcz   72->|   80->|
to...@pipebreaker.pl   72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd service fails to start rhel7.8

2020-05-05 Thread Tomasz Torcz
On Tue, May 05, 2020 at 08:48:17AM +, Aviram, Nimrod wrote:
> After upgrading OS to RHEL 7.8 , the service fails to start.
> I'm usually creating a basic user (cfrm) to run Catalina but I've also tried 
> with root and received the same exception.
> 
> [Unit]
> Description=cfrmic
> [Service]
> User=cfrm
> Environment=JAVA_HOME=$JAVA_HOME

  This line is weird.

> PIDFile=/opt/ic/Appserver/logs/tomcat.pid
> WorkingDirectory=/opt/ic
> Type=forking
> ExecStart=/opt/ic/manager.sh start
> ExecStop=/opt/ic/manager.sh stop
> TimeoutStartSec=60
> TimeoutStopSec=180
> 
> [Install]
> WantedBy=multi-user.target
> 
> 
> 
> Journalctl -xe -->
> 
> May 05 04:45:13 US02VLAPP8519 systemd[1]: Starting cfrmic...
> -- Subject: Unit cfrmic.service has begun start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit cfrmic.service has begun starting up.
> May 05 04:45:13 US02VLAPP8519 su[2249]: pam_unix(su-l:auth): auth could not 
> identify password for [cfrm]
> May 05 04:45:13 US02VLAPP8519 su[2249]: pam_sss(su-l:auth): authentication 
> failure; logname= uid=1001 euid=0 tty= ruser=cfrm rhost= user=cfrm
> May 05 04:45:13 US02VLAPP8519 su[2249]: pam_sss(su-l:auth): received for user 
> cfrm: 10 (User not known to the underlying authentication module)


  Clearly user cfrm does not exists from PAM point of view. That's the
problem.
  I also doubt you have the same problem when running as root. Maybe you
didn't do 'systectl daemon-reload' after changing the unit file?


-- 
Tomasz TorczOnce you've read the dictionary,
to...@pipebreaker.plevery other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-04 Thread Tomasz Torcz
On Mon, May 04, 2020 at 11:52:37AM +0530, nitish nagesh wrote:
> Hello,
> 
>We have this odd want to move a daemon between different systemd slices.
> Not sure if that's even a valid thing to do, but here is the requirement.

  You can use low-level cgroup access to move it. Something like:
systemctl show --property MainPID --value your.service > 
/sys/fs/cgroup/NEW.slice/cgroup.procs

Process can only be in one cgroup at the time, so it will be moved.

-- 
Tomasz TorczOnce you've read the dictionary,
to...@pipebreaker.plevery other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Trying to set a boot splash screen using objcopy

2020-04-04 Thread Tomasz Torcz
On Sat, Apr 04, 2020 at 05:30:11AM -0500, io mintz wrote:
> Hi! I'm on arch using systemd-boot 242.84-2-arch. I'm using this command to
> set my boot splash:
> 
> sudo objcopy --update-section
> .splash=/usr/share/systemd/bootctl/splash-arch.bmp --change-section-vma
> .splash=0x4 /boot/EFI/systemd/systemd-bootx64.efi{,}
> 
> A dump using objdump confirms that it's been set. However, I still don't see
> a splash screen. Am I doing something wrong?

  Custom boot splash was removed few years ago:
https://github.com/systemd/systemd/commit/7361099e4245ee31f6d70dc659d78fc533952893

  Was it re-added recently?

-- 
Tomasz Torcz Morality must always be based on practicality.
to...@pipebreaker.pl — Baron Vladimir Harkonnen

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to handle staged installs with a Systemd unit?

2019-12-27 Thread Tomasz Torcz
On Thu, Dec 26, 2019 at 07:37:05PM -0500, Jeffrey Walton wrote:
> > It looks like the problem is (to me), GNU Coding Standards does not
> > provide guidance on the use case. There is no procedure detailed by
> > the standard. Confer, the entire standard as a single web page:
> > https://www.gnu.org/prep/standards/standards.html . The word service
> > appears once in the context of "long distance telephone service".
> >
> > Let me ping them and ask them to add a section on Services with both
> > init and systemd.
> 
> Sent to the Foundation:


  I don't know why do you want to involve GNU here.  Their operating
system (Hurd) does not run systemd.  

-- 
Tomasz TorczTo co nierealne – tutaj jest normalne.
to...@pipebreaker.pl  Ziomale na życie mają tu patenty specjalne.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failed to restart xxxx.service: "Unit tmp.mount is masked"

2019-09-28 Thread Tomasz Torcz
On Sun, Sep 29, 2019 at 02:15:19AM +0800, 沙包妖梦 wrote:
> Hello, and help, I ran into an issue for several times. I don't know when
> and why it happen.
> 
> When I want to restart some service, it sais: "Failed to start
> xx.service: Unit .mount is masked".
> .mount has "RequiresMountsFor" or "PrivateTmp".
> When this happens, I will see ALL mountpoint units is masked by "systemctl
> status *.mount". (except something like sys-kernel-config.mount)

  "masked" means there is a symlink with the name of *.mount unit, 
in one of the unit search paths (listed in "man systemd.unit"),
pointing to /dev/null.
  You have to: 1) remove the symlinks; 2) figure what creates those
symlinks on your system.


-- 
Tomasz TorczTo co nierealne -- tutaj jest normalne.
xmpp: zdzich...@chrome.pl  Ziomale na życie mają tu patenty specjalne.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Antw: systemd prerelease 243-rc2

2019-08-22 Thread Tomasz Torcz
On Thu, Aug 22, 2019 at 03:38:05PM +0200, Ulrich Windl wrote:
> >>> systemd tag bot  schrieb am 22.08.2019
> um
> 13:56 in Nachricht <20190822115637.1.05c510c92b339...@refi64.com>:
> > A new systemd ☠️ pre-release ☠️ has just been tagged. Please download the 
> > tarball here:
> 
> 
> > * On 64 bit systems, the "kernel.pid_max" sysctl is now bumped to
> >   4194304 by default, i.e. the full 22bit range the kernel allows, 
> > up
> >   from the old 16bit range. This should improve security and
> >   robustness, as PID collisions are made less likely (though 
> 
> I doubt it's increasing robustness for any existing application as
> pid_traditionally was 16 bit. I don't know if some applications try to
> sprintf() a pid into a char[6], but if they do, it might cause an application
> failure...

  What kind of tradition would that be?  Could you please point the
specific standard and implentation?  Everywhere I look pid_t is
"signed integer type" which is implemented as 32 bits.


-- 
Tomasz   .. oo o.   oo o. .o   .o o. o. oo o.   ..
Torcz.. .o .o   .o .o oo   oo .o .. .. oo   oo
o.o.o.   .o .. o.   o. o. o.   o. o. oo .. ..   o.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] connection failure

2019-07-02 Thread Tomasz Torcz
On Tue, Jul 02, 2019 at 03:39:04PM +0200, ABDUL MAJITH wrote:
> Hi all,
> 
> I am trying to use the Docker in GNS3, when I try to launch it show the
> error as follows,

  What kind of distribution is that?  We have to report a bug to them,
 they are spreading false support addresses,

> -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel


-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] amavis broken

2019-06-16 Thread Tomasz Torcz
On Sun, Jun 16, 2019 at 06:11:46PM +, Dorian ROSSE wrote:
> Hello,
> 
> 
> My clam AV broken I follow It web page :
> 
> ● amavis.service - LSB: Starts amavisd-new mailfilter
>Loaded: loaded (/etc/init.d/amavis; generated)
>Active: failed (Result: exit-code) since Sun 2019-06-16 18:07:17 UTC; 13s 
> ago
>  Docs: man:systemd-sysv-generator(8)
>   Process: 24991 ExecStart=/etc/init.d/amavis start (code=exited, 
> status=1/FAILURE)
> 
> juin 16 18:07:16 bitfenix-server systemd[1]: Starting LSB: Starts amavisd-new 
> mailfilter...
> juin 16 18:07:17 bitfenix-server amavis[24991]: Starting amavisd: Number 
> found where operator expected at /etc/amavis/conf.d/50-user line 13, near "1"
> juin 16 18:07:17 bitfenix-server amavis[24991]: (Missing semicolon on 
> previous line?)
> juin 16 18:07:17 bitfenix-server amavis[24991]: Error in config file 
> "/etc/amavis/conf.d/50-user": Bareword "bitfenix" not allowed while "strict 
> subs" in use at /etc/amavis/conf.d/50-user line 13.

  Dorian,

   You have made a mistake in the configuration file.  And this is clearly
 stated in the error message.

   Anyway, you are emaling this list constantly with issues which are
 not related to systemd development. From the archives, I see you even
 encountered abrasive individuals like Reindl, whose emails are
 blacklisted by many.
   Please, stay on topic. If you need help wth your system, go to the
 support forums of the distribution you use. Continuing to send offtopic
 mails here will cause you to be killfiled and receive no help
 whatsoever.


-- 
Tomasz TorczOnce you've read the dictionary,
xmpp: zdzich...@chrome.pl   every other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] WantedBy=default.target

2019-03-07 Thread Tomasz Torcz
On Thu, Mar 07, 2019 at 06:55:21PM +0100, Reindl Harald wrote:
> 
> 
> Am 07.03.19 um 18:48 schrieb Tomasz Torcz:
> > On Thu, Mar 07, 2019 at 11:24:08AM +0100, Lennart Poettering wrote:
> >> 2. rtags (it uses default.target in a socket file, which is even
> >>weirder, should use sockets.target)
> > 
> >   sockets.target is rather odd for me. If I had (hypothetical)
> > socket-activable service, which is only relevant in GUI environment,
> > I would like its socket to be pulled in by graphical.target. Using
> > sockets.target would let my hypothetical service to be available in
> > text-only boot.
> 
> why should it be only relevant in GUI environment?

  Please stop evading my killfile by answering my emails.

-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] WantedBy=default.target

2019-03-07 Thread Tomasz Torcz
On Thu, Mar 07, 2019 at 11:24:08AM +0100, Lennart Poettering wrote:
> 2. rtags (it uses default.target in a socket file, which is even
>weirder, should use sockets.target)

  sockets.target is rather odd for me. If I had (hypothetical)
socket-activable service, which is only relevant in GUI environment,
I would like its socket to be pulled in by graphical.target. Using
sockets.target would let my hypothetical service to be available in
text-only boot.


-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Question on Before=

2019-02-02 Thread Tomasz Torcz
On Sat, Feb 02, 2019 at 03:03:22PM -0500, Steve Dickson wrote:
> 
> 
> On 2/2/19 2:48 PM, Tomasz Torcz wrote:
> > On Sat, Feb 02, 2019 at 02:42:15PM -0500, Steve Dickson wrote:
> >> Hello,
> >>
> >> In a.service  I have 
> >>
> >> [Unit]
> >> Before=b.service 
> >>
> >> [Install]
> >> RequiredBy=b.service
> >>
> >> when I systemd start b.service (which happens to fail) 
> >> but... a.service is not being run.
> >>
> >> So I guess my question is what do I have to do
> >> to ensure a.service is *always* run before b.service?
> > 
> >   Have you enabled a.service?
> > 
> No... I did not think I had to... I figured 
> when b.service was started, a.service would be 
> run regardless of being enabled or disabled.
> 
> Is that not the case?

  Not really.  It would work, if you had in b.service line like
Requires=a.service (*).
  But apparently you do not want to modify b.service, so you
put RequiredBy= in a.service's [Install] section. Directives
in [Install] section requires "systemctl enable" to have symlinks
created and to have effect. After enable, it will work identical to (*).

  Nb. most services have RequireBy=multi-user.target (or WantedBy=). For
such services, enabling mean they will start at boot (beacuse
multi-user.target is part of boot process).  But there is not
requirement for services to be Wanted/Required by not boot-related
services and target.
  Thus, you often find in tutorials assertion that 
"systemctl enable" equals "start during boot". This is not true.


-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Question on Before=

2019-02-02 Thread Tomasz Torcz
On Sat, Feb 02, 2019 at 02:42:15PM -0500, Steve Dickson wrote:
> Hello,
> 
> In a.service  I have 
> 
> [Unit]
> Before=b.service 
> 
> [Install]
> RequiredBy=b.service
> 
> when I systemd start b.service (which happens to fail) 
> but... a.service is not being run.
> 
> So I guess my question is what do I have to do
> to ensure a.service is *always* run before b.service?

  Have you enabled a.service?

-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Bugfix release(s)

2019-01-17 Thread Tomasz Torcz
On Wed, Jan 16, 2019 at 07:18:15PM +0100, Lennart Poettering wrote:
> On Mi, 16.01.19 01:06, Christian Hesse (l...@eworm.de) wrote:
> 
> > Lennart Poettering  on Tue, 2019/01/15 20:00:
> > > Note that we don't branch releases right now. Instead when we are
> > > getting closer to a release we simply don't merge PRs we don't
> > > consider appropriate for the release anymore until after the
> > > release. Or in other words: the master branch simply "stops" for a
> > > while getting new stuff, and only gets bugfixes until we release the
> > > version, which reopens the floodgates
> >
> > Most people do not notice when this happens. Having milestones on github is
> > nice, but most of us miss that. Just make it obvious: add a tag when
> > you start preparation for a release - no matter if you call it 
> > 'v241-freeze',
> > 'v241-rc' or whatever. I guess 'communication' on the lowest level can help 
> > a
> > lot here.
> 
> (Hmm, are you sure a git tag is more "visible" than a github
> milestone?  I am not so sure)

 It is. `git pull` lists new tags:

Resolving deltas: 100% (8291/8291), completed with 1265 local objects.
From https://github.com/systemd/systemd
   8724defeae..80aff27aeb master -> origin/master
* [new tag]   v240   -> v240
Updating 8724defeae..80aff27aeb

  It does not list any GitHub milestones.

  Having said that, I'm against proliferation of tags.

-- 
Tomasz Torcz   72->|   80->|
xmpp: zdzich...@chrome.pl  72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Requires and After

2019-01-01 Thread Tomasz Torcz
On Tue, Jan 01, 2019 at 08:20:19PM +0100, Olaf van der Spek wrote:
> On Tue, Jan 1, 2019 at 8:17 PM Ian Pilcher  wrote:
> >
> > On 1/1/19 5:44 AM, Jérémy Rosen wrote:
> > > The short answer is that Requires without after makes little sense,
> > > since you can't reliably know if your dependency is here without it
> > > (if it fails at startup, you might or might not be started, depending
> > > on the startup order systemd chooses)
> >
> > There are cases where it makes sense.  For example, most OpenStack
> > services require both a message bus and a database, but they are smart
> > enough to wait and re-attempt their connections if either of those
> > services isn't immediately available.
> 
> What's the benefit of not having After= for those services?

  I guess they can start and do their initialization in parallel with
the service they require.

-- 
Tomasz   .. oo o.   oo o. .o   .o o. o. oo o.   ..
Torcz.. .o .o   .o .o oo   oo .o .. .. oo   oo
o.o.o.   .o .. o.   o. o. o.   o. o. oo .. ..   o.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] a user here - ReloadPropagatedFrom=

2018-11-29 Thread Tomasz Torcz
On Thu, Nov 29, 2018 at 02:43:13PM +, lejeczek wrote:
> dear devel
> 
> is something like: ReloadPropagatedFrom...Restart/Start/Stop possible to
> achieve on v219(centos 7.6) ?

  Use backports from Facebook:
  https://github.com/facebookincubator/rpm-backports

  Or buy Red hat support and ask your sales representative to backport
this functionality.  It will trickle to CentOS eventually.

-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd logging..

2018-11-22 Thread Tomasz Torcz
On Wed, Nov 21, 2018 at 02:23:50PM +0530, deepan muthusamy wrote:
> Hi,
> How to log systemd service into log.txt file.
> This file should be available after system  restart also.
> How to do this?

  You can use file:path in StandardOutput=
  
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardOutput=

-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Environment-variable security?

2018-11-13 Thread Tomasz Torcz
On Wed, Nov 14, 2018 at 02:17:02AM +0100, Marek Howard wrote:
> Marek Howard píše v St 14. 11. 2018 v 01:35 +0100:
> > Lennart Poettering píše v Út 13. 11. 2018 v 15:17 +0100:
> > > On Di, 13.11.18 07:49, David Parsley (pars...@linuxjedi.org) wrote:
> > > Well, you are of course welcome to ignore whatever I say, but again,
> > > environment blocks are leaky, they propagate down the process tree,
> > > and are *not* generally understood as being secret.
> > 
> > It is not *that* common to pass secrets via environment variable but
> > it's nothing unusual, and many programs offer this interface. OpenVPN
> > comes to bind. Where such interface is offered, propagating down the
> > process tree is usually not a concern, because such programs usually
> > don't fork "untrusted" programs.
> > 
> > It's quite handy way to pass secrets and as I said above, there's
> > really no risk if it's done in cases where it makes sense. Of course
> > systemd leaking it to everyone makes it not usable with systemd, but
> > that's not really a problem with environment variables.
> 
> If you want some examples:
> 
> borgbackup - BORG_PASSPHRASE
> restic - RESTIC_PASSWORD
> openssl - env:var
> rsync - RSYNC_PASSWORD
> hub - GITHUB_PASSWORD, GITHUB_TOKEN
> rclone - RCLONE_CONFIG_PASS
> smbclient - PASSWD
> 
> Again, it's not so common, but it's not unusual and it's not insecure
> if you know what you're doing (which you usually are when you have
> powers to create system services).

  Generally, storing secret data in environment is common in
web microservices world, popularised by https://12factor.net/config
But those apps are supposed to be run by Kubernetes or other
container runtime - with dedicated clusters, PID namespaces and so on.
  Running them as plain unix (systemd) services is the wrong way
to run them ;)

-- 
Tomasz TorczThere exists no separation between gods and men:
xmpp: zdzich...@chrome.pl   one blends softly casual into the other.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to keep the new kernel running features ?

2018-09-17 Thread Tomasz Torcz
On Mon, Sep 17, 2018 at 09:27:20AM +, Dorian ROSSE wrote:
> Hello Dear IT team worker,
> 
> Since yesterday my running kernel is 4.18.8 instead 4.17.2 but at each reboot 
> I have a system crashed,
> How to keep this laster running kernel without have a crash at each reboot ?


  Dorian,
this is not a support list.  Please direct your question elsewhere – the
lists run by distribution you use would be best.

-- 
Tomasz Torcz  ,,If you try to upissue this patchset I shall be 
seeking
xmpp: zdzich...@chrome.pl   an IP-routable hand grenade.'' -- Andrew Morton 
(LKML)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Tomasz Torcz
On Mon, Aug 13, 2018 at 11:51:46AM +0200, Silvio Knizek wrote:
> Am Montag, den 13.08.2018, 11:28 +0200 schrieb Cecil Westerhof:
> > I have a service that is run as a different user as root. But only
> > root can
> > restart the service. Is there a way to make 'systemctl restart' work
> > for
> > the user that runs the service?
> 
> Hi,
> 
> you can either define a sudo-rule or you use policykit (polkit) for
> this. See 
> https://wiki.archlinux.org/index.php/Polkit#Allow_management_of_individual_systemd_units_by_regular_users
>  for an example. Keep in mind that the polkit feature depends on your
> available systemd version.

Or, if the service has Restart= setting, user can kill the MainPID.
-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to debug why a unit is started when?

2018-03-16 Thread Tomasz Torcz ️
On Fri, Mar 16, 2018 at 04:49:28PM +0100, Paul Menzel wrote:
> Dear systemd folks,
> 
> 
> I am trying to get the GDM login screen started earlier on a Dell XPS 13
> 9370 with Debian Sid/unstable system with systemd 238. Currently, after
> selecting the Linux kernel in GRUB it’s only displayed after roughly eight
> to ten seconds while Linux takes around two seconds [1].
> 
> Using systemd-bootchart I see that GDM is started quite late [1], and I
> wondering if there is an option to find out why.

  Not a direct answer to your question, but you can use systemd-bootchart
to get graphical timeline of how long did it take to start different
units.  Then you will have to find box for GDM and see which other
boxes ended at the moment GDM started.

-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Service to pause startup and wait for user input

2018-01-25 Thread Tomasz Torcz ️
On Thu, Jan 25, 2018 at 05:24:28PM +, Boyce, Kevin P [US] (AS) wrote:
> Good Afternoon List,
> 
> Does anyone know if there is a way to create a service unit that pauses early 
> on in the boot sequence and asks the user a question?
> A reply would be required via keyboard.

  This is an antipattern, but I guess you can hask around password
asking mechanism,
  https://www.freedesktop.org/software/systemd/man/systemd-ask-password.html


-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to stop systemctl --user processes before backup runs then restart

2018-01-04 Thread Tomasz Torcz ️
On Thu, Jan 04, 2018 at 07:35:05PM +, Barry Scott wrote:
> On Thursday, 4 January 2018 13:08:33 GMT Colin Guthrie wrote:
> > Barry Scott wrote on 31/12/17 17:41:
> > > I think that for my backups to run for a user I will need to stop their
> > > systemd user services.
> > Out of curiosity, why do you think that the process needs to be stopped
> > for the backups to run?
> 
> The process of concern are running fetchmail that is calling into dovecot.
> 
> If I do not stop dovecot the Mail dir will not be consistent.
> If I do not stop the fetchmail process then dovecot will be called
> and the backup can see an inconsistent state.


  In such cases you should use "fsreeze" around backups.

-- 
Tomasz Torcz "God, root, what's the difference?"
xmpp: zdzich...@chrome.pl "God is more forgiving."

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Back trace systemd service unit by pid

2017-12-21 Thread Tomasz Torcz ️
On Thu, Dec 21, 2017 at 01:48:29PM +0800, Kevin Hsu wrote:
> Hi folks,
> 
> I am looking for a good way to backtrace systemd service by a process id.
> The "systemctl status " command is available to do the magic. It will
> show a full status of the service that creates the
> pid. But this command gives too many details. The only thing I need is the
> service unit name. Is there any simple way instead of parsing results from
> "systemctl status" ?
> 
> For example like
> 
> > systemctl service-get 5566
> > nginx.service


 Look into /proc//cgroup

-- 
Tomasz TorczOnce you've read the dictionary,
xmpp: zdzich...@chrome.pl   every other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] journalctl --unit and pattern

2017-12-18 Thread Tomasz Torcz ️
On Mon, Dec 18, 2017 at 06:01:21PM +0100, Cecil Westerhof wrote:
> At the moment I am using:
> journalctl --boot --follow --no-tail --unit storeSystemStatistics
> --unit vmstatLog
> 
> But instead of unit names you  should be able to use a pattern. I tried the
> following:
> --unit "storeSystemStatistics|vmstatLog"
> 
> ​And variants on it, but could not make it work.
> 
> How should I use a pattern. (I could not find info about it.)​

  You can pass multiple --unit parameters:
journalctl  --unit storeSystemStatistics --unit vmstatLog

-- 
Tomasz TorczThere exists no separation between gods and men:
xmpp: zdzich...@chrome.pl   one blends softly casual into the other.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Spec for journalctl log entry data structure

2017-11-29 Thread Tomasz Torcz
November 29, 2017 1:27 PM, "Thomas Güttler"  
wrote:
> is there a spec or docs about the datastructure of a log entry in journalctl?
> 
> Which fields does a log record have?

There's a handy man page:
https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html

If you look for low-level journal file format, go to 
https://www.freedesktop.org/wiki/Software/systemd/journal-files
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Prosody Failed on start

2017-08-11 Thread Tomasz Torcz
On Sat, Aug 12, 2017 at 01:08:08AM +0530, Sabir Mohammed wrote:
> Hi,
> 
> I am installed prosody successfully and it worked without any problem at
> first. After that I reboot the server and again started prosody. But at
> this time, it shows failed message.
> 
> 
> * prosody.service - LSB: Flexible communications server for Jabber/XMPP

  First, this is completely wrong. Prosody has system support 
(https://github.com/daurnimator/mod_systemd),
you should be using normal systemd unit. Here you use init.d SYSV script
via the compatibility layer.
  Probably your distribution shipped something wrong, please open a bug
with them.

> Aug 11 22:35:08 server prosody[1384]: Prosody is still not running. Please
> give it some time or check your log files for errors.
> 
> What is the solution.? Anyone help..

  Do as the message say and check the log files. Those should be
in /var/log/prosody/ IIRC.  

-- 
Tomasz Torcz  ,,If you try to upissue this patchset I shall be 
seeking
xmpp: zdzich...@chrome.pl   an IP-routable hand grenade.'' -- Andrew Morton 
(LKML)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Significant performance loss caused by commit a65f06b: journal: return -ECHILD after a fork

2017-07-11 Thread Tomasz Torcz
On Tue, Jul 11, 2017 at 05:20:10PM +0200, Lennart Poettering wrote:
> On Tue, 11.07.17 16:55, Tomasz Torcz (to...@pipebreaker.pl) wrote:
> > > Forgot to mention:
> > > 
> > > $ rpm -qa glibc
> > > glibc-2.24-4.fc25.x86_64
> > > 
> > > Apparently, this regressed between this version and
> > > glibc-2.24-9.fc25.x86_64 hence.
> > > 
> > 
> >   From glibc changelog:
> > 
> > * Wed Jun 07 2017 Arjun Shankar <arjun...@lostca.se> - 2.24-6
> > - Auto-sync with upstream release/2.24/master,
> >   commit 7b60553e360731338631ccdda71590ac5deca137, fixing:
> > - Remove the PID cache  (#1443976)
> 
> I commented on that bug now. It doesn#t really have a proper
> explanation, all it says is that "The glibc PID cache negatively
> interacts with setting up containers and namespaces."...

  Upstream commit has longer rationale:
http://repo.or.cz/glibc.git/commit/c579f48edba88380635ab98cb612030e3ed8691e

But I'm not competent enough to judge t.


-- 
Tomasz TorczTo co nierealne -- tutaj jest normalne.
xmpp: zdzich...@chrome.pl  Ziomale na życie mają tu patenty specjalne.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Significant performance loss caused by commit a65f06b: journal: return -ECHILD after a fork

2017-07-11 Thread Tomasz Torcz
On Tue, Jul 11, 2017 at 04:10:38PM +0200, Lennart Poettering wrote:
> On Tue, 11.07.17 16:07, Lennart Poettering (lenn...@poettering.net) wrote:
> > Hmm, so I run a slightly older glibc, as I haven#t updated my system
> > in a while:
> > 
> > $ strace -c journalctl --since -1hour 2>&1 >/dev/null | head -10
> > % time seconds  usecs/call callserrors syscall
> > -- --- --- - - 
> >  25.950.001276   7   195   mmap
> >  23.210.001141   7   16430 open
> >  22.290.001096   9   119   munmap
> >   6.530.000321   2   134   close
> >   6.100.000300   2   135   fstat
> >   5.150.000253   556   mprotect
> >   4.880.000240   2   102   fstatfs
> >   2.300.000113   432   read
> > 
> > getpid() is nowhere to be seen in this... Seems Fedora regressed on
> > this too recently. Meh.
> 
> Forgot to mention:
> 
> $ rpm -qa glibc
> glibc-2.24-4.fc25.x86_64
> 
> Apparently, this regressed between this version and
> glibc-2.24-9.fc25.x86_64 hence.
> 

  From glibc changelog:

* Wed Jun 07 2017 Arjun Shankar <arjun...@lostca.se> - 2.24-6
- Auto-sync with upstream release/2.24/master,
  commit 7b60553e360731338631ccdda71590ac5deca137, fixing:
- Remove the PID cache  (#1443976)

-- 
Tomasz TorczTo co nierealne -- tutaj jest normalne.
xmpp: zdzich...@chrome.pl  Ziomale na życie mają tu patenty specjalne.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] rules: block - add dm devices to whitelist

2017-07-10 Thread Tomasz Torcz
On Mon, Jul 10, 2017 at 10:38:38AM +0200, Lennart Poettering wrote:
> On Wed, 05.07.17 13:01, David Disseldorp (dd...@suse.de) wrote:
> 
> > Ceph relies on by-partuuid symlinks, in order to locate the journal
> > partition from a given OSD partition. For details, see
> > http://tracker.ceph.com/issues/19489.
> 
> This appears way too broad, as it would apply to all LVM and all other
> devices.
> 
> It appears to me Ceph should do the same as LVM does for this, and
> ship its own set of rules, and be careful to only match against the
> actual devices it creates.

 Ceph does not create any devices (except /dev/rbd/* but it's not the case 
here).
Ceph block storage uses any kind of block device for its operation, be it plain
partition, LUKS encrypted storage, LVM, dm-multipath devices and so on.

  Ceph block storage contains few parts - actual storage, write-ahead log,
journal etc. Any of those parts can utilize block devices, so ceph
uses symlinks to point to proper block device:

# ls -l /var/lib/ceph/osd/ceph-11/block
lrwxrwxrwx. 1 root root 33 Jul 10 10:51 /var/lib/ceph/osd/ceph-11/block -> 
/dev/disk/by-partuuid/43bdcb85-06


 Nb. ceph already ships rules for autodetecting if given partition belongs
to ceph (discriminating by partition type, see
https://github.com/ceph/ceph/blob/master/udev/95-ceph-osd.rules ), but 
'by-partuuid'
links should be created by earlier udev rules - like they are for some 
whitelisted
set of device nodes names.

-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] 回复: 回复: [systemd-de vel] systemctl can't execute stop actually,whenservice is started by other way

2017-06-29 Thread Tomasz Torcz
On Thu, Jun 29, 2017 at 11:51:53AM +0200, Oliver Neukum wrote:
> Am Donnerstag, den 29.06.2017, 11:45 +0200 schrieb Reindl Harald:
> > 
> > Am 29.06.2017 um 10:05 schrieb Oliver Neukum:
> > > 
> > > Am Mittwoch, den 28.06.2017, 13:29 +0200 schrieb Lennart Poettering:
> > > > 
> > > > Well, it's a service manager. As such it keeps track of services,
> > > > knows when they are started and when they aren't. Why would it stop
> > > > services that aren't started?
> > > 
> > > Because you command it to do so.
> > > The check systemd does adds no value. There is a reason to not start
> > > something that is running. The reverse does not apply
> > 
> > this is nonsense - how in the world should systemmd know what to stop 
> > when it has no clue about the involved processes because it did not 
> > start the service and hence has no tracking at all
> > 
> 
> So try and fail. That is still no excuse for ruling out that you can
> stop a service you have not started. That is pure politics.

  There's no service if it wasn't started by systemd. It's just a random 
binary. 



-- 
Tomasz Torcz Morality must always be based on practicality.
xmpp: zdzich...@chrome.pl-- Baron Vladimir Harkonnen

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] 回复: 回复: [systemd-de vel] systemctl can't execute stop actually,whenservice is started by other way

2017-06-29 Thread Tomasz Torcz
On Thu, Jun 29, 2017 at 10:05:08AM +0200, Oliver Neukum wrote:
> Am Mittwoch, den 28.06.2017, 13:29 +0200 schrieb Lennart Poettering:
> > Well, it's a service manager. As such it keeps track of services,
> > knows when they are started and when they aren't. Why would it stop
> > services that aren't started?
> 
> Because you command it to do so.
> The check systemd does adds no value. There is a reason to not start
> something that is running. The reverse does not apply.

  By starting nscd in some shell session, there's no mapping between
running executable and a service.  Systemd has no way of knowing
that random nscd binary is supposed to be killed when 'systemctl stop nscd'
is invoked. How would it know?

  That is really the question! How systemd would know that unrelated
binary should be killed when user invokes 'systemctl stop' on service,
service which has not been started?  Is systemd supposed to compare full
path of all running binaries to ExecStart= lines in unit files? But what
about situation when you have multiple services with the same ExecStart=?

  Maybe user starting random binaries in login session should echo their
PIDs into 'tasks' file in relevant cgroup? What if the cgroup does not exists
yet (because service wasn't started)? This quickly becames a dangerous hackery.

  I'm all ears – what's your solution?

-- 
Tomasz Torcz Morality must always be based on practicality.
xmpp: zdzich...@chrome.pl-- Baron Vladimir Harkonnen

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] template service unit include.d directory

2017-05-03 Thread Tomasz Torcz
On Wed, May 03, 2017 at 07:51:45PM +0530, Anoop Alias wrote:
> Hi,
> 
> I am trying to include extra config for a template service file
> 
> PHP70@.service
> 
> ##
> 
> I created /etc/systemd/system/PHP70@.service.d/something.d/test.conf
> 
> According to the doc:
> https://www.freedesktop.org/software/systemd/man/systemd.unit.html
> 
> "Along with a unit file foo.service, a "drop-in" directory foo.service.d/
> may exist. All files with the suffix ".conf" from this directory will be
> parsed after the file itself is parsed. This is useful to alter or add
> configuration settings for a unit, without having to modify unit files.
> Each drop-in file must have appropriate section headers. Note that for
> instantiated units, this logic will first look for the instance ".d/"
> subdirectory and read its ".conf" files, followed by the template ".d/"
> subdirectory and the ".conf" files there"
> 
> What am I doing wrong here?

  I think "instance .d/ subdirectory" would be:

 /etc/systemd/system/PHP70@something.service.d/

 and the "teplate .d/ subdirectory":

 /etc/systemd/system/PHP70@.service.d/

 rather than your scheme. 

> # systemctl --version
> systemd 219
> +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
> +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
> 
> OS: CentOS Linux release 7.3.1611 (Core)

  Always check local man pages. The online pages are appropriate for latest
systed version.  The features described may not exist in such old versions
as 219.

-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Service Type for Tomcat

2017-04-18 Thread Tomasz Torcz
On Tue, Apr 18, 2017 at 10:44:59AM -0700, Igal @ Lucee.org wrote:
> I've read about the difference between "forking" and "notify", but am not
> sure how it really applies in real life.
> 
> Can someone tell me what would be the consequences of setting Tomcat (or any
> Java-based service, for that matter) to Type=notify instead of Type=forking?
> Examples I see online use forking but I'm not sure that that's the right way
> to go.

 For “notify”, application has to have explicit support for systemd.  It has to
send READY=1 notification using socket. Usually, when application authors 
implement
type=notify support, they ship example unit, so you don't have to guess.
 Implementing Type=notify is very simple, see https://github.com/faljse/SDNotify
You can ask Tomcat developers to implement it.
 Also, if you use wrong type, your application may not fail instantly. Sometimes
minute and a half passes before it fails. See 
https://enotty.pipebreaker.pl/2014/10/08/failure-modes-of-incorrect-type-in-systemd-units/

-- 
Tomasz Torcz   72->|   80->|
xmpp: zdzich...@chrome.pl  72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] feature request: implement macsec interface configuration in systemd-networkd

2017-04-18 Thread Tomasz Torcz
On Mon, Apr 17, 2017 at 01:46:29PM +, george Nopicture wrote:
> Are there any plans on implementing macsec interface configuration from
> systemd-networkd? Since its already added in kernel as a loadable
> module, fedora misses a patched iproute2 to support macsec and also
> lacks automatic interface configuration (i dunno if nm supports it?)
> preferably from systemd-networkd.

  MACSec is supported by Network Manager. But how much cryptography does
MACSec require? If it's anything more than trivial amount, probably iwd or
wpa_supplicant would be a better place to implement it.

-- 
Tomasz Torcz   72->|   80->|
xmpp: zdzich...@chrome.pl  72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] My experience with MySQL and systemctl

2017-04-12 Thread Tomasz Torcz
On Wed, Apr 12, 2017 at 11:01:04AM -0700, Auke Kok wrote:
> On 04/11/2017 06:08 AM, Lennart Poettering wrote:
> > On Tue, 11.04.17 13:41, Samuel Williams (space.ship.travel...@gmail.com) 
> > wrote:
> >> - If a daemon fails to start up, trying to kill it.. may not be the
> >> best option. It's probably a matter of the systemctl service file
> >> detecting that a rollback is in progress and accepting that as a valid
> >> startup state, but I'm not really sure. In any case, I ended up having
> >> to do this process manually.
> > 
> > The timeouts for killing services that don't start up correctly are
> > configurable per service, and by setting them to "infinity" you may
> > even turn them off entirely. This is configurable precisely so that
> > services that can take ages to start-up in real-life can increase or
> > turn off the timeout the way they need. Or in other words: please make
> > sure that your mysql.service carries the right
> > StartTimeoutSec=/StopTimeoutSec= settings, and please contact your
> > unit file vendor to fix this.
> 
> Actually, that seems as bad of a solution as the standard setting.
> 
> Recovery of a very large db could take days. You can't estimate a good
> value for StartTimeoutSec=, since undoubtedly someone can come up with a
> worse case.
> 
> The right (or, better) solution IMHO would be for mysqld to signal to
> systemd that it's running OK before recovery starts, using type=notify.
> This way recovery can take as long as needed, and if it fails, it could
> signal this failure as normal back to systemd. Then systemd would retry
> the recovery a few times this way and finally give up.

  It wouldn't be good solution.  READY=1 means clients can connect and 
talk to the database. Signalling readiness prematurely would break 
functionality..
Other solution would be introducing mysql-recover.service unit, which
would be Requires= & After= of main mysql unit. Similarly to how SSH key 
generation
is handled.
  This recover unit could have infinit timeout, even.

> This, of course, means modifying mysql.

  Well, MariaDB implemented systemd support (sd_notify() and stuff), it's
high time to abandon MySQL.

-- 
Tomasz Torcz Morality must always be based on practicality.
xmpp: zdzich...@chrome.pl-- Baron Vladimir Harkonnen

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] more verbose debug info than systemd.log_level=debug?

2017-04-09 Thread Tomasz Torcz
On Sun, Apr 09, 2017 at 10:37:36PM -0600, Chris Murphy wrote:
> On Sun, Apr 9, 2017 at 5:17 AM, Lennart Poettering
> <lenn...@poettering.net> wrote:
> 
> > That said, are you sure FIFREEZE is really what we want there? it
> > appears to also pause any further writes to disk (until FITHAW is
> > called).
> 
> > So, I am still puzzled why the file system people think that "sync()"
> > isn't supposed to actually sync things to disk...
> 
> https://www.spinics.net/lists/linux-xfs/msg05113.html
> 

  So the “solution” seems to be adding FIFREEZE/FITHAW ioctls after sync()?

-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Main process exit status variables not being sent to ExecStopPost= script

2017-04-07 Thread Tomasz Torcz
On Thu, Apr 06, 2017 at 08:55:05PM +, ithinki cant wrote:
> 
> Per systemd documentation, for ExecStopPost=, some environment variables are 
> supposed to be set for the executed script/binary:
> 
> "Note that all commands that are configured with this setting are invoked 
> with the result code of the service, as well as the main process' exit code 
> and status, set in the $SERVICE_RESULT, $EXIT_CODE and $EXIT_STATUS 
> environment variables"


   Those were introduced with v232.
 
> 
> I'm using systemd-231-2 on CentOS7, kernel 4.6.7
> Am I doing something wrong?

  The version you are using is too old. Ask you distributor to update it or 
backport
patches providing above mentione variables.
  Alternatively you can try to use Facebook's backport of latest systemd.

-- 
Tomasz Torcz "God, root, what's the difference?"
xmpp: zdzich...@chrome.pl "God is more forgiving."

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] udev rules: add udev rule to create /dev/ptp_kvm

2017-02-28 Thread Tomasz Torcz
On Tue, Feb 28, 2017 at 04:54:00PM +, Daniel P. Berrange wrote:
> > > Also, what's the benefit of shipping this upstream? Why not ship that
> > > rule with kvm?
> > 
> > qemu-kvm package? Sure i can do that, but then all distributions 
> > have to do the same with their own packages.
> 
> qemu-kvm is installed in the host OS only, but this rule needs to be
> set in the guest OS, unless you want to bundle it in with qemu-guest-agent
> RPM, but that's not really a directly related package, so we'd liekly have
> to create a new package for this and try and get distros to ensure it is
> installed in all guest OS. We've had qemu-guest-agent for years now and
> we've still not got all distros installing it. So not shipping this kind
> of rule with udev means that it'll almost certainly end up being missing
> in the majority of guest installs for many years to come.

  If distros do not care about optimal performance, why would we care
and try to make everyone happy by sneaking this change in udev?
  If this feature is important to end user, then the user should change
the distribution to one providing the feature.

-- 
Tomasz Torcz  ,,If you try to upissue this patchset I shall be 
seeking
xmpp: zdzich...@chrome.pl   an IP-routable hand grenade.'' -- Andrew Morton 
(LKML)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] how make systemd NOT to clutter dmesg?

2017-02-27 Thread Tomasz Torcz
On Mon, Feb 27, 2017 at 11:03:09AM +, lejeczek wrote:
> 
> 
> On 27/02/17 10:10, Reindl Harald wrote:
> > 
> > 
> > Am 27.02.2017 um 10:55 schrieb lejeczek:
> > > hi there
> > > 
> > > I'm trying to solve problem which to you guys must be trivial, but
> > > it's
> > > a puzzle to me.
> > > I've searched the net & man pages but ... failed to find how/where
> > > systemd is told to put stuff like:
> > > 
> > > Got message type...
> > 
> > seriously - could you at least post *one* uncutted message
> 
> I said, it seemed the whole lot went there.. does it not make it simpler?
> I did not want to clutter the mailing list, here:
> 
> 
> [67142.383939] systemd[1]: Got notification message for unit httpd.service
> [67142.383956] systemd[1]: httpd.service: Got notification message from PID
> 7722 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current
> traffic:   0 B/sec)
> [67142.383963] systemd[1]: httpd.service: got READY=1
> [67142.383972] systemd[1]: httpd.service: got STATUS=Total requests: 0;
> Current requests/sec: 0; Current traffic:   0 B/sec

  Looks like you have debugging enabled (increased log level).
Get back to normal level and those message won't appear.


-- 
Tomasz Torcz  ,,If you try to upissue this patchset I shall be 
seeking
xmpp: zdzich...@chrome.pl   an IP-routable hand grenade.'' -- Andrew Morton 
(LKML)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] misleadin email Re: Fw: Installing VirtualBox on Debian Jessie - Problem with Linux kernel Name

2017-02-04 Thread Tomasz Torcz
On Sat, Feb 04, 2017 at 10:34:39PM +, gilesaj wrote:
> The only reason I posted here is because that is what is in the text of the 
> error.
> 
> root@ns527415:~#journalctl -xn-- The start-up result is done.Feb 04 15:31:03 
> ns527415.ip-192-99-6.net systemd[1]: Starting LSB: VirtualBox Linux kernel 
> module...-- Subject: Unit virtualbox.service has begun with start-up-- 
> Defined-By: systemd-- Support: systemd-devel Info Page
> systemd-devel Info Page


  This misleading message was removed from systemd in July last year.
Maybe it is worth opening bugs with popular distribution and asking them
to backport 4b930ded8391c7552820f8f162b4e6ceebf50ca4 into their supported
branches? How do you think?

-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Unit raidcom.service has failed

2016-12-28 Thread Tomasz Torcz
On Wed, Dec 28, 2016 at 10:01:45AM -0500, Marvin Chancán wrote:
> Dear all,
> 
> I am performing the OpenStack configuration on VirtualBox but, when using
> the below comand, there is a error message as follow:
> 
> [root@ucp2kos-configurator ~]# systemctl start raidcom
> Job for raidcom.service failed because the control process exited with
> error code. See "systemctl status raidcom.service" and "journalctl -xe" for
> details.
> 
> *The actual raidcom status is:*
> 
> Dec 27 11:50:13 ucp2kos-configurator horcm[2461]: [HORCM_009] Could not
> connect to HORC through raw-IO. Lookup HORCM startup log
> /HORCM/log/curlog/horcm_ucp2kos-configurator.log for details
> 
> Dec 27 11:50:13 ucp2kos-configurator horcm[2461]: [HORCM_007] Illegal
> parameter values in HORCM configuration file. Lookup HORCM startup log file
> /HORCM/log/cu


  Hi, 

  please look into the files mentioned in log output above.  This
is not error related to systemd, we can't help you.


-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-networkd in initrd

2016-12-23 Thread Tomasz Torcz
On Fri, Dec 23, 2016 at 04:43:32PM +0100, Thijs Cramer wrote:
> In that case, is there any guide on what's required to get it working?
> 
> My current scripting only adds the binary (and library dependancies)
> and adds the systemd-network and resolve users to /etc/passwd.
> When it starts it says: "Cannot resolve user name systemd-network: No
> such file or directory".
> 
> Which seems to me as if it lacks some dependency?

  Lack of configuration – it cannot find *user* named systemd-network.
Put the user data in /etc/passwd or whatever user database are you using
in initrd.

-- 
Tomasz TorczOnce you've read the dictionary,
xmpp: zdzich...@chrome.pl   every other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] news on Issue # 4078 ?

2016-12-15 Thread Tomasz Torcz
On Thu, Dec 15, 2016 at 04:37:19PM +, arnaud gaboury wrote:
> I am still with a broken UID/GID container for some specific directories.
> This is described in issue #4078 [0].
> 
> It start to be annoying as I can't upgrade some packages on the Fedora
> container. At least, I think failed upgrades are related to this issue.
> Let's take one example:
> 
> # dnf upgrade iputils
> ...
>   Upgrading   :
> iputils-20161105-1.fc25.x86_64
> 1/2
> Error unpacking rpm package iputils-20161105-1.fc25.x86_64
> Error unpacking rpm package iputils-20161105-1.fc25.x86_64
> error: unpacking of archive failed on file /usr/bin/ping;5852c405: cpio:
> cap_set_file
> 
> First, are these errors probably due to my UID/GID issues?

  This error is because ping in Fedora is not suid, instead uses filesystem
capabilities* to grant only necessary permissions. If you use any filesystem
lacking fscaps (like for example NFS), you get this error and ping will
work only for root.



* https://lwn.net/Articles/313838/


-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Best way to limit per-user system-wide units

2016-12-13 Thread Tomasz Torcz
On Wed, Dec 14, 2016 at 01:23:14AM +1300, Samuel Williams wrote:
> I'd like my http user to be able to install unit files and start/stop them.
> 
> Starting and stopping them is fairly easy with a sudo rule..
> 
> But adding them is a bit trickier. I could also use sudo but it seems
> fairly specific.
> 
> Is there some way to add a new directory, e.g.
> /etc/systemd/system/http which has permissions specific for http user?
> 
> I can install targets/services/etc into that directory and then use
> sudo systemctl start/stop

  Keep in mind that allowing user to define services is basically giving
him root permissions (user can create unit with ExecStart=/usr/bin/rm -rf /)*.
So there's no point in separating directories.
  You can make this safer by using user instance units. You get canonical
path with this solution: ~/.config/systemd/user/


 * I know about --no-preserve-root
-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-timesyncd with read-only root filesystem

2016-12-09 Thread Tomasz Torcz
On Fri, Dec 09, 2016 at 10:46:51AM +0100, André Hartmann wrote:
> Hi Martin,
> 
> thanks for keeping our dialog alive :)
> 
> To sum up again what I actually want to achive:
> 
> I want to use NTP after bootup by default, but in case no NTP is available,
> the user should be able to set the date and time by hand
> with timedatectl. But timedatectl refuses to do so, if "NTP is enabled".
> 
> And this is my main problem: I don't know how timedatectl decides
> if NTP is enabled or not.

  Just use the source code? Anyway, if you use systemd's implementation
of that API (systemd-timesyncd), the check is here:
https://github.com/systemd/systemd/blob/master/src/timedate/timedated.c#L180

i.e. timedated checks if systemd-timesyncd is enabled.

  If you use other implementations, the check can be different.
For example timedatex checks if any of units listed in
/etc/systemd/ntp-units.d:/usr/lib/systemd/ntp-units.d
is enabled.

  Implementation in systembsd runs "/etc/rc.d/ntpd status" and checks status.

  And so on.

-- 
Tomasz   .. oo o.   oo o. .o   .o o. o. oo o.   ..
Torcz.. .o .o   .o .o oo   oo .o .. .. oo   oo
o.o.o.   .o .. o.   o. o. o.   o. o. oo .. ..   o.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/2] ima: Have IMA policy loaded from /etc/sysconfig or /etc/default.

2016-11-28 Thread Tomasz Torcz
On Mon, Nov 28, 2016 at 02:17:19PM -0500, Stefan Berger wrote:
> From: Stefan Berger <stef...@us.ibm.com>
> 
> Fedora has its policy in /etc/sysconfig/ima-policy while Ubuntu
> has it in /etc/default/ima-policy. So we try to read the IMA policy
> from one location and try it from another location if it couldn't
> be found. To maintainer backwards compatibility, we also try
> /etc/ima/ima-policy.

  Shouldn't we work to get rid of those pointless differences, instead
of legitimizing them?

-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Tomasz Torcz
On Tue, Nov 08, 2016 at 05:01:59PM +0530, Raghavendra. H. R wrote:
> Hi All,
> 
> I'm a newbie in Systemd init system and I'm exploring sd_notify which is
> basically used for notification purpose in SystemD.

  It is written “systemd” (all lowercase).
 
> I have created one unit file which is of type "notify" and in my
> application I have written sd_notify(0, "READY=1"); from which SystemD can
> be notified that my process in totally up and running.
> 
> Below given is my Service file.
> 
> *[Unit]*
> *Description=Sd_notify example*
> 
> *[Service]*
> *ExecStart=/etc/Myapp*


  This is not 'unit of type notify'. This is unit of type 'simple'.
Please read "man systemd.service" and paragraph Type= and choose
correctly.


> Need help in understanding what value should be set in the environment
> varaible NOTIFY_SOCKET.
> But there's no much information/documentation available on NOTIFY_SOCKET.

  NOTIFY_SOCKET is filled-in by systemd and it is available when you 
correctly defined unit type.  If you want to check it's value, you can
user getenv() inside you program and print the value.
  I think amount of documentation about NOTIFY_SOCKET is enough, if
you think there's something specific missing, let us know.


-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] nfs-server.service starts before _netdev iscsi mount completes (required)... how can I fix this?

2016-11-04 Thread Tomasz Torcz
On Thu, Nov 03, 2016 at 04:01:15PM -0700, c...@endlessnow.com wrote:
> so I'm using CentOS 7, and we're mounting a disk from our iSCSI
> SAN and then we want to export that via NFS.  But on a fresh boot the
> nfs-server service fails because the filesytem isn't there yet.  Any
> ideas on how to fix this?

 Add RequiresMountsFor=/your/export/path to nfs-server.service

-- 
Tomasz TorczOnce you've read the dictionary,
xmpp: zdzich...@chrome.pl   every other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Problem Configuring a 3rd monitor and running displaylink

2016-10-13 Thread Tomasz Torcz
On Thu, Oct 13, 2016 at 10:56:21AM -0700, Mick Whiffin wrote:
> Hi there.
> 
> I'm not sure if you can help but I'm new to Manjaro and I'm having a
> problem getting displaylink up and running.
> 
> Oct 13 10:43:10 manjaro modprobe[28409]: modprobe: FATAL: Module evdi not
> found in directory /lib/modules/4.1.26-1-MANJARO


   Here, you are missing the module.  How to resolve this is out of scope
on this mailing list – please ask Manjaro guys.

  Thanks,

-- 
Tomasz Torcz "God, root, what's the difference?"
xmpp: zdzich...@chrome.pl "God is more forgiving."

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] thoughts on different command structure

2016-10-05 Thread Tomasz Torcz
On Wed, Oct 05, 2016 at 07:00:11PM +0200, Xen wrote:

>  [ … renaming propositions … ]

  Uh, it is way too late for such changes.  Maybe if you brought this
five years ago… Right now it would only bring pointless differentation
between older and newer distributions.  We just started
unification of all differences in distributions.

> 
> Close to that is that many useful programs are called systemd-something
> which is already that modularisation I speak of.
> 
> But "systemd" is not a user tool. However you are inclined to type "systemd"
> after having used on one the other tools.
 
  Binaries prefixed with systemd- are either not to be started manually
(systemd-journald, networkd etc) or not stable/mature enough to be widely
used – like cgtop, cgls.  The latter kind can be renamed if it
matured enough - that what happened with systemd-journalctl → journalctl.

  As for /usr/libexec/systemd/systemd … well, maybe it should be called
systemd-initd from the start.  Now it's too late.

-- 
Tomasz TorczThere exists no separation between gods and men:
xmpp: zdzich...@chrome.pl   one blends softly casual into the other.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] tomcat start up script wait for message

2016-10-04 Thread Tomasz Torcz
On Tue, Oct 04, 2016 at 08:57:09PM +0300, Mantas Mikulėnas wrote:
> On Tue, Oct 4, 2016 at 8:32 PM, Tyler Couto <tco...@certain.com> wrote:
> 
> > Hi all,
> >
> > We have a tomcat application that requires some initialization after
> > tomcat starts up. That is, we run an initialize script after catalina.out
> > says ?'Server startup in:'. Currently we do this in a number of ways:
> > manually, through a custom tail script, or through logstash. But I¹m
> > thinking it might be best to let the init system do it. Is this a good
> > idea? And if so, how best to implement it?
> >
> 
> systemd will not react to stdout messages, but it does have Type=notify
> which will react to a "READY=1" message sent via Unix socket – ideally
> directly by the program (see sd_notify, $NOTIFY_SOCKET) but also possibly
> via the `systemd-notify` tool:
> 
> sd_notify(0, "READY=1");
> 
> systemd-notify --ready
> 


  In other words, Tyler, you have to:

1) implement above sd_notify support int Tomcat, for which many users
   would be thankful;

2) use some waiting mechanism; I know that Spacewalk project has some
   Tomcat-waiting implemented, you can check their units.

-- 
Tomasz TorczThere exists no separation between gods and men:
xmpp: zdzich...@chrome.pl   one blends softly casual into the other.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] mysql open_files_limit controlled by systemd

2016-09-29 Thread Tomasz Torcz
On Thu, Sep 29, 2016 at 11:20:34AM +0200, Hajo Locke wrote:
> Hello List,
> 
> we found out that mysql open_files_limit ist controlled by systemd-service
> file. We used LimitNOFILE to increase default value.
> This value is always overwriting the value from my.cnf file.
> Is there a way to tell systemd to not control a service in this way so
> control completely goes back to original my.cnf values?
> At the moment i did not found a promising directive.

  Set LimitNOFILE=infinity.  Then your MySL may set the limit
on it own, to the value from my.cnf.


-- 
Tomasz Torcz   72->|   80->|
xmpp: zdzich...@chrome.pl  72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to stop service by timer

2016-09-12 Thread Tomasz Torcz
On Mon, Sep 12, 2016 at 09:13:26PM +0300, Федор Короткий wrote:
> Hi,
> 
> We are trying to setup a service that runs every day from 10:00 to 18:45.
> 
> Starting is not a problem, we just used timer. But our solution for
> stopping the service seems ugly. We have second service with
> Type=oneshot which runs "systemctl stop first.service" at 18.45(by
> using second timer).
> 
> Is there a better way to achieve this?

  That's basically the way.  Or you can make second service ”empty”
(execing /bin/true) with Conflicts=first.service.

  I would be glad to see .timers extended with TimerAction= option,
being ”start” be default, but allowing stop, isolate, restart etc.
  Maybe open and RFE issue on github?


-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Tomasz Torcz


  Could you please stop breaking threads?  Every reply you send starts
a new thread, while they all belong to one mail thread.

-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Unable to get Systemd to work with Phoenix/Elixir Exrm Release

2016-07-07 Thread Tomasz Torcz
On Thu, Jul 07, 2016 at 07:29:20AM -0700, Michael Chavez wrote:
> Hello,
> 
> I am a newbie trying to get systemd to load my phoenix/elixir app.
> 
> I have tried many variations of my hello-phoenix service file, the version
> that I feel is closest to being correct looks like this:
> 
> [Service]
> WorkingDirectory=/home/hello-phoenix/app/bin
> ExecStart=/home/hello-phoenix/app/bin/hello_phoenix start
> Environment=MIX_ENV=prod PORT=
> Restart=always
> StandardOutput=syslog
> StandardError=syslog
> SyslogIdentifier=hello-phoenix
> User=hello-phoenix
> 
> after reloading daemon, enabling and starting the hello-phoenix.service,
> systemctl status hello-phoenix.service outputs:
> 
> ● hello-phoenix.service - hello-phoenix service
>Loaded: loaded (/etc/systemd/system/hello-phoenix.service; enabled)
>Active: failed (Result: start-limit) since Thu 2016-07-07 10:14:30 EDT;
> 9min ago
>   Process: 4281 ExecStart=/home/hello-phoenix/app/bin/hello_phoenix start
> (code=exited, status=0/SUCCESS)
>  Main PID: 4281 (code=exited, status=0/SUCCESS)
> 

  Does it fork?  If so, you need Type=forking in you [Service] section (default
is Type=simple, e.g. application running in foreground).
  See 
https://enotty.pipebreaker.pl/2014/10/08/failure-modes-of-incorrect-type-in-systemd-units/
for longer explanation.


-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Let journalctl give only output of script

2016-05-08 Thread Tomasz Torcz
On Sat, May 07, 2016 at 12:47:45PM +0200, Cecil Westerhof wrote:
> I made my own service and I can get info about it with:
> ​journalctl -u firefoxCPUUsageStore​
> 
> ​But this gives also info about starting, restarting and the like. Is it
> possible to get only the logging that is generated by the script itself?​
> 

  Use
journalctl _SYSTEMD_UNIT=firefoxCPUUsageStore.service

 Nb. if you use ”-o export” you will see all the fields stored in journal,
so you will be able to choose on which fields you should filter.

-- 
Tomasz TorczThere exists no separation between gods and men:
xmpp: zdzich...@chrome.pl   one blends softly casual into the other.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Shutdown root fs on loop device

2016-04-22 Thread Tomasz Torcz
On Fri, Apr 22, 2016 at 11:49:09AM +0200, Michael Lipp wrote:
> Hi,
> 
> I have some PCs where I have to store the Linux root file system as a
> large file in Window's NTFS file system. Everything boots fine. The NTFS
> file system is mounted as ntfs-3g in the initial ramfs as /host, the
> loopback device is created (using /host/Linux/image.img) and used as root.
> 
> However, the system doesn't shut down cleanly, usually it simply hangs.
> I admit that it isn't easy to solve this situation on shutdown. When
> executing findmnt in the running Linux system, the only "hint" is
> /dev/loop0 being mounted as root. The NTFS mount doesn't appear at all.
> It only shows in systemctl status, which starts with
> 
> init.scope
> |.   1 /sbin/init
> |- 155 mount.ntfs-3g -o permissions /dev/sda2 /host
> 
> Is it possible to configure systemd-shutdown somehow (e.g. hook
> scripts)? Or do I have to write my own systemd-shutdown?

  You have to patch ntfs-3g to marks itself as non-killable 
root storage provider (with '@'):
https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/

-- 
Tomasz Torcz   ,,(...) today's high-end is tomorrow's embedded processor.''
xmpp: zdzich...@chrome.pl  -- Mitchell Blank on LKML

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Fwd: Stopping a service at a specific time or after a specific duration

2016-04-20 Thread Tomasz Torcz
On Wed, Apr 20, 2016 at 01:52:39PM +0100, Jamie Kitson wrote:
> Hi,
> 
> I want to start and stop a systemd.service at specific times. Presumably
> I will use a .timer unit to start the job, but is there a built in way
> to stop the job after a specific duration, or at a specific time, or do
> I have to create a second .timer unit that execs the stop? What is the
> standard/"correct" way to do this?

  For stopping after a duration you can use RuntimeMaxSec=, introduced in v229. 

-- 
Tomasz   .. oo o.   oo o. .o   .o o. o. oo o.   ..
Torcz.. .o .o   .o .o oo   oo .o .. .. oo   oo
o.o.o.   .o .. o.   o. o. o.   o. o. oo .. ..   o.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to troubleshoot 'step CHDIR spawning' failure.

2016-04-13 Thread Tomasz Torcz
On Wed, Apr 13, 2016 at 07:28:34AM -0400, MikeB wrote:
> I'm running systemd 215 on a fairly up-to-date Debian Jessie system.
> 
> I have a Type=forking service that fails on its first ExecStartPre command
> which is using /bin/mkdir to create a directory.
> 
> The service fails to start with the following.
> 
> Apr 13 10:07:42 localhost systemd[1]: Starting OVSDB Server Daemon...
> Apr 13 10:07:42 localhost systemd[4069]: Failed at step CHDIR spawning
> /bin/mkdir: No such file or directory
> Apr 13 10:07:42 localhost systemd[1]: ovsdb-server.service: control process
> exited, code=exited status=200
> Job for ovsdb-server.service failed. See 'systemctl status
> ovsdb-server.service' and 'journalctl -xn' for details.
> Apr 13 10:07:42 localhost systemd[1]: Failed to start OVSDB Server Daemon.
> Apr 13 10:07:42 localhost systemd[1]: Unit ovsdb-server.service entered
> failed state.
> a
> 
> I've verified that '/bin/mkdir' does exist and does run fine.  So I assume
> the the 'No such file or directory' refers to the target of the chdir.
> 
> My question is how do I troubleshoot from here?  What can I do to determine
> exactly what file or directory is not being found.  I'd like to understand
> what is wrong and fix it.

  CHDIR failure points to something related with directory.  Check
what directives you have in unit file - maybe WorkingDirectory= with
dir that do not exists? Or RootDirectory= ?
  Speculating further - maybe you are trying to mkdir directory which
you also put in RootDirectory= ?  This won't work, because /bin/mkdir is
run in the same environment that main process; but you can
 – investigate if PermissionStartOnly= (man systemd.service) will help you
 – use RuntimeDirectory= (man systemd.service) to automate directory
   creation
 - use tmpfiles to precreate all directories


-- 
Tomasz   .. oo o.   oo o. .o   .o o. o. oo o.   ..
Torcz.. .o .o   .o .o oo   oo .o .. .. oo   oo
o.o.o.   .o .. o.   o. o. o.   o. o. oo .. ..   o.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Fwd: Random X crash on nvidia card on Gnome 3.20

2016-04-10 Thread Tomasz Torcz

Bob,

  There is so much wrong with this email, I'll be brief:
– this is gnome-shell crashing, nothing related to systemd (and this is 
  systemd-devel)
- you are using binary nvidia drivers, which is nothing community can
  help you with
- you are using this driver in unsupported configuration, which is 
  clearly communicated in attached log; so I think even nVidia won't
  take your bug report.


-- 
Tomasz TorczOnce you've read the dictionary,
xmpp: zdzich...@chrome.pl   every other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Formal syntax of unit file format

2016-03-28 Thread Tomasz Torcz
On Sun, Mar 27, 2016 at 07:04:57PM +0200, Damiano Albani wrote:
> Hello,
> 
> I've searched quite extensively but I haven't been able to find a *formal*
> description of the unit file format (e.g. via ABNF).
> Wouldn't that be useful, in order to build a unit file validator / parser
> for example?
> Do such (standalone) tools already exist by the way?

  There is “systemd-analyze verify …”.

-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemctl --user fails because no D-BUS.

2016-03-24 Thread Tomasz Torcz
On Thu, Mar 24, 2016 at 08:01:23PM +0200, Mantas Mikulėnas wrote:
> On Thu, Mar 24, 2016 at 6:21 PM, Flavio Leitner <f...@sysclose.org> wrote:
> 
> >
> > Hi,
> >
> > I am trying to create services and timers per user but on a recent
> > CentOS minimal installation it doesn't work out of the box:
> >
> > $ ssh 
> > server$ systemctl --user daemon-reload
> > Failed to get D-Bus connection: No such file or directory
> >
> 
> First check `systemctl status user@$UID.service` to make sure you actually
> *have* a `systemd --user` instance, as some distros have ripped it out
> entirely.

 ”Some distros” include CentOS:
https://git.centos.org/blob/!!!rpms!systemd.git/4e2e74ff857d63b164391a16e8a42c78e8a935be/SOURCES!0004-remove-user-.service.patch


-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd 208->229 update. Problems with udev rules mounting disks

2016-02-25 Thread Tomasz Torcz
On Thu, Feb 25, 2016 at 10:30:47AM +, warpme wrote:
> Hi *
> 
> I updated my system and one aspect of update was systemd update from 208 to 
> 229.
> 
> After this update my custom udev rules dealing with USB as stopped working.
> 
> It looks like triggered by udev mount lives only during udev rule life.
> 
> I#39;m stuck and don#39;t have idea why this so maybe somebody will 
> help me to understand whats going on here

  udevd mount namespace is private for 2 years now, see

https://github.com/systemd/systemd/commit/c2c13f2df42e0691aecabe3979ea81cd7faa35c7
 

-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Support for large applications

2016-02-19 Thread Tomasz Torcz
On Fri, Feb 19, 2016 at 12:49:53PM +, Zbigniew Jędrzejewski-Szmek wrote:
> On Fri, Feb 19, 2016 at 01:42:12PM +0100, Michal Sekletar wrote:
> > On Wed, Feb 17, 2016 at 1:35 PM, Avi Kivity <a...@scylladb.com> wrote:
> > 
> > > 3. watchdog during startup
> > >
> > > Sometimes we need to perform expensive operations during startup (log
> > > replay, rebuild from network replica) before we can start serving. Rather
> > > than configure a huge start timeout, I'd prefer to have the service report
> > > progress to systemd so that it knows that startup is still in progress.
> > >
> > 
> > Did you have a look at sd_notify (man 3 sd_notify)? Basically, you can
> > easily patch your service to report status to systemd and tell to
> > systemd exactly when it is ready to serve the clients. Thus you can
> > avoid hacks like huge start timeout you've mentioned.
> 
> I don't think that helps, unless the service "lies" to systemd and
> tells it has finished startup when it really hasn't (systemd would
> ignore watchdog notifications during startup, and would do nothing if
> they stopped coming, so the service has to tell systemd first that it
> has started successfully, for the watchdog to be effective). Doing
> that would fix this issue, but would have that systemd wouldn't know
> that the service is still starting and would for example start
> subsequent jobs.
> 
> I don't think there's a way around the issue short of allowing
> watchdog during startup. Databases which do long recovery are a bit
> special, most programs don't exhibit this kind of behaviour, but maybe
> this case is important enough to add support for it.

  Maybe systemd could ignore watchdog notification during startup UNTIL
first WATCHDOG=1 notification comes? Then normal watchdog logic would kick in.
  This way we retain current logic (ignore watchdog during startup) unless
application WANTS to tickle watchdog during startup.
  Or is it too much magic?

-- 
Tomasz Torcz  ,,If you try to upissue this patchset I shall be 
seeking
xmpp: zdzich...@chrome.pl   an IP-routable hand grenade.'' -- Andrew Morton 
(LKML)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to prevent an initramfs service from being stopped at switch-root ?

2016-01-11 Thread Tomasz Torcz
On Mon, Jan 11, 2016 at 12:39:10PM +, John Lane wrote:
> I have some services in my initramfs that unlock some crypto volumes to
> make the root and some other filesystems available.

  This seems relevant:
https://wiki.freedesktop.org/www/Software/systemd/RootStorageDaemons/

-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Subprocess

2016-01-11 Thread Tomasz Torcz
On Mon, Jan 11, 2016 at 07:58:30PM +0300, Mihamina RAKOTOMANDIMBY wrote:
> Hi all,
> 
> Walking trhough my virtual machines, I noticed something strange:
> The sensu process is inside the CFEngine CGroup.
> 
> This is mainly because of the way I launch Sensu after install
> 
> Please have a look at
>  https://bitbucket.org/snippets/rakotomandimby/nLkaM
> 
> How should I launch Sensu on systemd enabled system in order to have it
> in a dedicated CGroup? Should I create the service file and start it
> instead?

  Yes, that would be preferable.  But you can use systemd's SYSV compatibility
and replace lines 4 and 5 by:

 "sensu[command][start]" string => "/bin/systemctl start sensu-client";
 "sensu[command][restart]" string => "/bin/systemctl restart sensu-client";

-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] info/request

2016-01-10 Thread Tomasz Torcz
On Sun, Jan 10, 2016 at 02:45:30PM +0200, Moreanu Robert - Nicolae wrote:
> how i would resolve this
> 
> user system [474]: Failed at step EXEC spawning /usr/sbin/alsactl: No such
> file or directory
> - subject: Process /usr/sbin/alsactl could not be executed
> - The process /usr/sbin/alsactl could not be executed and failed

  You need to install package providing /usr/sbin/alsactl

-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Unable to store fds with systemd and reterive it back again

2016-01-04 Thread Tomasz Torcz
On Tue, Jan 05, 2016 at 01:11:16AM -0500, Pathangi Janardhanan wrote:
> Hi,
> 
>  I am using the function sd_pid_notify_with_fds and am unable to store the
> fds with systemd. My service is a simple echo server,
> and here is the snippet of code that is being called to store the FDS. I
> have also included the debug code.
> 
>  // Store the FDs with systemd
> e = getenv("NOTIFY_SOCKET");
> if (e == NULL) {
> syslog(LOG_NOTICE, "environment variable Notify socket is null");
> } else {
> syslog(LOG_NOTICE, "env. variable Notify Socket =%s %d", e,
>strlen(e));
> }
> 
> syslog(LOG_NOTICE, "Storing %d number of fds", num_fd);
> ret = sd_pid_notify_with_fds(0, 0, "FDSTORE=1\n", (const int *) fd,
>num_fd);
> syslog(LOG_NOTICE, "Result of sd notify %d", ret);
> 
>  From the debug printf I see
> Jan  5 00:37:23 ctoserver11 /usr/bin/myechoser[13640]: env. variable Notify
> Socket =/run/systemd/notify 19
> Jan  5 00:37:23 ctoserver11 /usr/bin/myechoser[13640]: Storing 1 number of
> fds
> Jan  5 00:37:23 ctoserver11 /usr/bin/myechoser[13640]: Result of sd notify
> -22
> 
> 
>  The return value seems to be -EINVAL, but looking at the code and the
> above debug, I am not sure why this is happening?
> 
>  Any help would be great.

  You need to set FileDescriptorStoreMax= to nonzero value in your service's
unit file.  See man systemd.service


-- 
Tomasz TorczThere exists no separation between gods and men:
xmpp: zdzich...@chrome.pl   one blends softly casual into the other.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Additional error details when resource limits are exceeded

2015-12-23 Thread Tomasz Torcz
On Wed, Dec 23, 2015 at 04:07:16PM +0100, Kai Krakow wrote:
> Am Wed, 23 Dec 2015 22:55:13 +0800
> schrieb Peter Hoeg <pe...@hoeg.com>:
> 
> > >So, Type=forking is the only way to have synchronization points
> > >between service that depend on each other.
> > 
> > In all fairness, the presence of a PID really doesn't say anything
> > either about availability. The only way to be sure is to use
> > Type=Notify with a cooperating daemon.
> 
> Okay, remove "only" from my sentence. It is _one_ way to signal the
> service manager that a service is ready. Apparently, some services
> (like MySQL) do early forking and write the PID file, and only then do
> their initializations. Still, it's better in most cases
> than Type=simple until Type=notify becomes more widely used (as you
> write it needs cooperation of the service).

  MySQL in the form of MariaDB has proper support: 
https://github.com/MariaDB/server/pull/83

>  Apparently, notifying
> requires including a small systemd specific lib (which does no harm
> when used on non-systemd systems) as far as I understood. But many
> upstreams and even more users would deny or rage against including such
> a library, just because it says "systemd" on its name tag. :-(

  sd_notify() is really couple lines of code which may be reimplemented
easily.  No library required, really.

-- 
Tomasz Torcz "God, root, what's the difference?"
xmpp: zdzich...@chrome.pl "God is more forgiving."

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Query regarding "EnvironmentFile"

2015-12-20 Thread Tomasz Torcz
On Sun, Dec 20, 2015 at 02:30:30PM +0100, Marc Haber wrote:
> On Fri, Dec 18, 2015 at 05:00:32PM +0100, Michael Biebl wrote:
> > and then tell admin to use systemctl edit
> > [Unit]
> > Environment=OPTS=-baz
> 
> How would I do the equivalent of systemctl edit with a declarative
> configuration management tool like puppet?

  You have to make sure directory /etc/systemd/system/nfs-ganesha.service.d/
exists, then inside you create something.conf file with above content.

  Alternatively you can create /etc/systemd/system/nfs-ganesha.service file
with required customisation, using puppet.

  Afterwards you need to issue "systemctl daemon-reload" (or send signal
to PID1) to have the changes read.

-- 
Tomasz TorczOnce you've read the dictionary,
xmpp: zdzich...@chrome.pl   every other book is just a remix.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] about pam_systemd

2015-11-18 Thread Tomasz Torcz
On Thu, Nov 19, 2015 at 01:57:22PM +0800, yan...@iscas.ac.cn wrote:
> In my machine,therr is nohing  in /run/user/,so there is problem with 
> pam_systemd or the systemd-logind and  do you think where is it?

  Hi,

  This sort of integration should be made by distribution.  Please contact 
developers of the
distarobution you are using.

-- 
Tomasz Torcz   "Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Detect if a script runs during bootup

2015-11-11 Thread Tomasz Torcz
On Wed, Nov 11, 2015 at 12:03:10PM +0100, Frank Steiner wrote:
> Hi,
> 
> is there an easy way to figure out if a LSB script in /etc/init.d/
> is called during bootup by systemd? I need to distinguish the first
> execution during boot from subsequent calls (cron, manually etc.).
> 
> It seems that /sbin/runlevel returns "unknown" during bootup, but
> I'm not sure if this reliable or not.

  I would suggest splitting the "on boot only" part into separate
unit, with RemainAfterExit=true.  The main part should require boot-only
part.
  First of all, create a proper unit and drop LSB script.
 

-- 
Tomasz TorczThere exists no separation between gods and men:
xmpp: zdzich...@chrome.pl   one blends softly casual into the other.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd.network defaults (was: Re: ip forwarding)

2015-11-06 Thread Tomasz Torcz
On Fri, Nov 06, 2015 at 11:40:13AM +0100, Michael Laß wrote:
> 
> Although this is clearly documented in the man page I think it would be
> less surprising behavior to generally default to kernel for such
> configuration items. Is there a specific reason against that?

  I believe this is (was) being discussed here:
https://github.com/systemd/systemd/issues/1411

-- 
Tomasz Torcz   72->|   80->|
xmpp: zdzich...@chrome.pl  72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Keeping track of usage time

2015-11-03 Thread Tomasz Torcz
On Tue, Nov 03, 2015 at 07:27:39AM +0100, Umut Tezduyar Lindskog wrote:
> journalctl --list-boots seems great actually but wouldn't work for us.
> We cannot keep lots of logs in our products.
> 
> Ultimately we are trying to answer the question of how long one of our
> product has been in use.
> 
> We will implement it with a .timer/.service which periodically adds
> /proc/uptime to a file and the file gets preserved over reboot.

  Hi,

  there's a daemon which does this: https://github.com/rpodgorny/uptimed

It keeps database in file: 
9932957:1354374472:Linux 3.6.8-1.fc18.x86_64
7635334:1400571727:Linux 3.14.2-200.fc20.x86_64
…

  And has text frontend for interactive use:
% uprecords -M
 #   Uptime | System Boot up
+---
 1   114 days, 23:09:17 | Linux 3.6.8-1.fc18.x86_6  Sat Dec  1 16:07:52 2012
 288 days, 08:55:34 | Linux 3.14.2-200.fc20.x8  Tue May 20 09:42:07 2014
 372 days, 14:59:41 | Linux 3.8.8-203.fc18.x86  Sun Apr 28 18:17:18 2013
 468 days, 03:35:07 | Linux 3.17.1-302.fc21.x8  Mon Oct 20 08:53:07 2014
 566 days, 02:38:32 | Linux 3.12.5-302.fc20.x8  Sun Dec 29 14:38:53 2013
 665 days, 18:50:12 | Linux 3.13.5-202.fc20.x8  Sun Mar  9 20:36:38 2014
 761 days, 15:45:36 | Linux 3.18.1-2.fc22.x86_  Sat Dec 27 15:43:00 2014
 859 days, 12:08:43 | Linux 4.0.0-0.rc2.git0.1  Sun Mar 22 11:13:26 2015
 948 days, 13:06:38 | Linux 3.4.0-1.fc17.x86_6  Thu Jun  7 18:51:12 2012
1044 days, 02:41:34 | Linux 3.11.3-201.fc19.x8  Fri Oct 11 14:34:46 2013
+---
->  2917 days, 18:31:09 | Linux 4.2.3-200.fc22.x86  Fri Oct 16 16:07:22 2015
+---
1up in 0 days, 03:04:28 | atTue Nov  3 12:42:59 2015
t10 in26 days, 08:10:26 | atSun Nov 29 17:48:57 2015
no1 in97 days, 04:38:09 | atMon Feb  8 14:16:40 2016
mst in 7 days, 05:28:52 | twenty-five days  Tue Nov 10 15:07:23 2015
up  1413 days, 06:30:17 | since Sun Jan  1 03:11:26 2012
  down  -11 days, 00:-03:-1 | since Sun Jan  1 03:11:26 2012
   %up  100.785 | since Sun Jan  1 03:11:26 2012


  I see no need to merge it in systemd, really.

-- 
Tomasz Torcz   72->|   80->|
xmpp: zdzich...@chrome.pl  72->|   80->|

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


  1   2   3   >