[systemd-devel] make pystemd part of systemd repo.

2022-08-16 Thread aleivag
Hello systemd developers: We talked last week about entertaining the idea of make pystemd part of systemd github org and eventually merge (in functionalities, not literally merge both) with the current python-systemd, This is our proposal to do this. happy to hear feedback :) What do we propose

Re: [systemd-devel] unit been dead before been running

2019-03-13 Thread aleivag
aleivag wrote: > > Hi All: > > i notice a change of behaviour that broke a couple of my scripts between > v239 and v240, and wanted to know that maybe i was always assuming the > wrong thing, so here it goes: > > so i subscribe to > > "ty

[systemd-devel] unit been dead before been running

2019-02-18 Thread aleivag
Hi All: i notice a change of behaviour that broke a couple of my scripts between v239 and v240, and wanted to know that maybe i was always assuming the wrong thing, so here it goes: so i subscribe to "type='signal'," "sender='org.freedesktop.systemd1',"

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

2018-11-12 Thread aleivag
the measure is effective. > > Regards, > -David > > On Mon, Nov 12, 2018 at 4:23 PM aleivag wrote: > >> hi Reindl: I was protecting against "systemctl cat/show" disclosure of >> information, as stated in the question; but i agree with you, and there are >>

Re: [systemd-devel] Playground ...

2018-07-03 Thread aleivag
This is great! thanks Alvaro Leiva On Tue, Jul 3, 2018 at 9:03 AM Bruno Vernay wrote: > More users, more feedbacks, that is the goal ! > Bruno > > > On Tue, Jul 3, 2018 at 9:28 AM Jérémy Rosen wrote: > >> Very nice... >> >> I am writing a systemd course and I am missing exercises and

Re: [systemd-devel] How to set `InitRDTimestampMonotonic` from console?

2018-07-03 Thread aleivag
Hi Paul: properties on the manager object, you can get them with: [~] sudo systemctl show -p InitRDTimestampMonotonic InitRDTimestampMonotonic=0 there is also the long way: [~] busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager

Re: [systemd-devel] systemd-nspawn: starting multiple shells

2018-06-23 Thread aleivag
a On Sat, Jun 23, 2018 at 2:02 PM Nikolaus Rath wrote: > On Jun 23 2018, Nikolaus Rath wrote: > > On Jun 23 2018, aleivag wrote: > >> short answer, yes, `machinectl login` is only suppported for > systemd-init , > >> and `machinectl shell` `systemd-run` will try to t

Re: [systemd-devel] systemd-nspawn: starting multiple shells

2018-06-23 Thread aleivag
short answer, yes, `machinectl login` is only suppported for systemd-init , and `machinectl shell` `systemd-run` will try to talk to the container via dbus, so i dont think you are force to have systemd runing inside the container (i may be wrong) but you do need to have dbus (and its easy to just

Re: [systemd-devel] systemd-nspawn: starting multiple shells

2018-06-23 Thread aleivag
Hi: to get a shell on your running container , you need to get it's name (execute `machinectl` to get a list of containers) and then if you just want a shell you can run `systemd-run --machine= --pty /bin/bash` or `machinectl shell /bin/bash` and if you want a real login promp machinectl

Re: [systemd-devel] getgroups returning a diferent result

2018-06-15 Thread aleivag
Thanks Michael, Jérémy i found the code https://github.com/systemd/systemd/blob/b0450864f1723ad12176d7956377d89ff4a84d8c/src/core/execute.c#L963 and you are right systemd explicitly dont load groups for root, and i guess that is why getgroups return empty instead of failing. the good news (at

[systemd-devel] getgroups returning a diferent result

2018-06-14 Thread aleivag
hi systemd'ers , i'm sure this is known, but for the life of me i cant seems to know why. tldr; aparently i loose all auxiliary groups of root when i execute a unit. i'll explain (i try this on v238). when i'm logged in as root, and i execute `id` i get all the groups that root belong to. but

Re: [systemd-devel] systemd DB2 StartUp/Shutdown service on Red Hat Enterprise Linux Server release 7.4 (Maipo)

2018-05-24 Thread aleivag
`Before` means that if your service and everything in `Before` (e.g. shutdown.target) is started at the same time, your service will be started Before the other, but when all are been stopped, your service will get Stoped After the other (you can see why you don't want your service stopped after

Re: [systemd-devel] safe and fast shutdown/reboot

2018-03-16 Thread aleivag
> > > Won't work. Status changes only when job for a unit completes and jobs > are executed in order of dependencies. Actually, jobs are *queued* in > order of dependencies so nothing would indicate that you are going to > shutdown until it is too late (i.e. all normal services are stopped). > >

Re: [systemd-devel] safe and fast shutdown/reboot

2018-03-15 Thread aleivag
One other thing that may work, is that you could implement a ExecStop action in your service unit, that checks if the system is been shutting down (by checking status of {shutdown,reboot,halt}.target [or maybe also the runlevel may work?]), and kill the unit if there is one of those operations.

Re: [systemd-devel] Best practice for prepopulating the CacheDirectory of dynamic users

2018-02-28 Thread aleivag
Hi Antoine: 2 disclosure before reading this: 1) i'm not part of systemd-devel team, and 2) this is also a shameless plug because i'm talking about a lib i created. with that out of the way, here is my advice/solution. do everything in python and use `pystemd` (pip install pystemd, just have

Re: [systemd-devel] custom var in sd_notify

2018-02-26 Thread aleivag
It make sense, Thank you for the clarification! El 25 feb. 2018 10:09 p. m., "Mantas Mikulėnas" <graw...@gmail.com> escribió: On Mon, Feb 26, 2018 at 12:32 AM, aleivag <alei...@gmail.com> wrote: > Hi all, hope you are doing: > > i was toying aroud sd_n

[systemd-devel] custom var in sd_notify

2018-02-25 Thread aleivag
Hi all, hope you are doing: i was toying aroud sd_notify and sd-daemon.h and found this section in https://github.com/systemd/systemd/blob/master/src/ systemd/sd-daemon.h#L234-L235 it said: Daemons can choose to send additional variables. However, it is recommended to prefix variable names not

[systemd-devel] pystemd a cython wrapper around libsystemd

2018-01-12 Thread aleivag
Hi all, shameless plug, hope its ok, i've seen people do this,, but that does not means is ok... so created a nice python wrapper arround sd-bus.h (and other parts of libsystemd) the idea is to make accesible to python developer what is already accesible to c developers. so you can do stuff

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

2017-12-20 Thread aleivag
the simplest way is to use busctl as aleivag@algx:~$ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager GetUnitByPID u 28729 o "/org/freedesktop/systemd1/unit/nginx_2eservice" from that you are a awk away of what you want. if you want to

Re: [systemd-devel] [Question]: About systemctl and its related commands

2017-11-28 Thread aleivag
Hi, i asked similar question a few weeks ago, and you probably will get a oficial answer soon :P, but in a nutshell would be: /run/systemd/private is a private socket and its meant for systemd tools to communicate with systemd even if dbus daemon is down. this is specially true during boot and

Re: [systemd-devel] proper use of /run/{user/, }/systemd/private sockets

2017-11-14 Thread aleivag
> > > Don't connect directly to it. Use the official bus instead. Forget > that you know about the private connection at all... > > Lennart > > got it, "this aren't the sockets you're looking for" :), will use then propper `sd_bus_open_*` Thanks Guys! Alvaro

[systemd-devel] proper use of /run/{user/, }/systemd/private sockets

2017-11-13 Thread aleivag
Hi all: hope you guys are doing great!. So i have a few questions, hope this is the best place for them. I've been doing a lot of work with `sd-bus.h` (basically i've been trying to bind it to other languages to then interact with systemd natively). I've been reading the man pages/blog