Re: [systemd-devel] not able to access system service from session service

2018-09-10 Thread Lennart Poettering
On Di, 21.08.18 10:08, deepan muthusamy (deepan.m2...@gmail.com) wrote:

> Hi,
> Thank you for the reply. Since I can't use session service to access system
> service, how can I start a application as service having session dbus as
> system service?

The system service manager instance (i.e. PID 1) is for system
services, and the user service manager instance (of which there is one
for each logged in user) is for session services. system services are
started by the service manager and should only access other system
services, but not user services. OTOH user services may access any
service they like, including system and user services. However, what
you cannot do is have *dependencies* (which means explicit systemd
unit dependencies, i.e. Requires=, Wants=, Before=, After= and
thelike) between user and system services, and both live in different
worlds when it comes to the dependency system. But this should not be
a problem normally, as the system services should all be started up
already at the time the user service manager starts anyway, hence
ordering between them should be unnecessary.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] not able to access system service from session service

2018-08-20 Thread deepan muthusamy
Hi,
Thank you for the reply. Since I can't use session service to access system
service, how can I start a application as service having session dbus as
system service?

On Tue, 21 Aug 2018, 5:22 am , 
wrote:

> Send systemd-devel mailing list submissions to
> systemd-devel@lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> or, via email, send a message with subject or body 'help' to
> systemd-devel-requ...@lists.freedesktop.org
>
> You can reach the person managing the list at
> systemd-devel-ow...@lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of systemd-devel digest..."
>
>
> Today's Topics:
>
>1.  Enforcing journald diskspace limit. (Frédéric HILPERT)
>2.  Not able to access system device from session service
>   (deepan muthusamy)
>3. Re:  Not able to access system device from session service
>   (Silvio Knizek)
>4.  systemd oneshot service stop on shutdown problem
>   (Radoslaw Garbacz)
>5. Re:  systemd oneshot service stop on shutdown problem
>   (Filipe Brandenburger)
>6. Re:  systemd oneshot service stop on shutdown problem
>   (Ryan Gonzalez)
>
>
> --
>
> Message: 1
> Date: Mon, 20 Aug 2018 14:08:49 +0200
> From: Frédéric HILPERT 
> To: systemd-devel@lists.freedesktop.org
> Subject: [systemd-devel] Enforcing journald diskspace limit.
> Message-ID: 
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi,
>
> I have a question about systemd. Not wanting to create an issue on
> githbub because there are already plenty and this may not be a bug.
>
> I have a 1GB /var/log/ partition (on a stock Centos 7) and set
> SystemMaxUse=150M in journald configuration. When I restart journald I
> have this message :
>
> /systemd-journal[53564]: Permanent journal is using 8.0M (max allowed
> 101.4M, trying to leave 152.1M free of 501.0M available → current limit
> 101.4M).//
> /
> Everything looks fine here, but a few days later :
> /
> //MyServer# journalctl --disk-usage //
> //Archived and active journals take up 232.8M on disk.//
> //MyServer# du -sh /var/log/journal///
> //185M/var/log/journal//
>
> --> Am I missing something in order to enforce journal not use more than
> 150 (or 101.4)MB ?
>
> Regards,
> Frédéric HILPERT
>
>
>
>
> --
>
> Message: 2
> Date: Mon, 20 Aug 2018 19:22:09 +0530
> From: deepan muthusamy 
> To: Systemd ,
> d...@lists.freedesktop.org
> Subject: [systemd-devel] Not able to access system device from session
> service
> Message-ID:
>  2jyenr...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I started one application as system service in /etc/systemd/system by
> giving command "systemctl  start mysystem.service".
> I have one more application which i have to start as session service in
> etc/systemd/user by giving command "systemctl --user start
> mysession.service".
>
> My session.service  has dependency on mysystem.service, so I mentioned in
> Requires and After command in session.service.
>
> But when iam trying to session.service it is showing "mysystem.service" not
> found. Can anyone help me with this?
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> https://lists.freedesktop.org/archives/systemd-devel/attachments/20180820/41e5b22f/attachment-0001.html
> >
>
> --
>
> Message: 3
> Date: Mon, 20 Aug 2018 15:57:28 +0200
> From: Silvio Knizek 
> To: systemd-devel@lists.freedesktop.org
> Subject: Re: [systemd-devel] Not able to access system device from
> session service
> Message-ID: <9064a335891804c359801498667c1dd603a8cf43.ca...@gmx.net>
> Content-Type: text/plain; charset="UTF-8"
>
> Am Montag, den 20.08.2018, 19:22 +0530 schrieb deepan muthusamy:
> > I started one application as system service in /etc/systemd/system by
> > giving command "systemctl  start mysystem.service".
> > I have one more application which i have to start as session service
> > in etc/systemd/user by giving command "systemctl --user start
> > mysession.service".
> >
> > My session.service  has dependency on mysystem.service, so I
> > mentioned in Requires and After command in session.service.
> >
> > But when iam trying to session.service it is showing
> > "mysystem.service" not found. Can anyone help me with this?
>
> Hi,
>
> the systemd --user session don't know about the systemd --system
> session (and vice versa). So you can't have dependencies among them.
> They are completly seperated (except for .device and .mount units)
>
> BR
>
>
>
> --
>
> Message: 4
> Date: Mon, 20 Aug 2018 18:00:48 -0500
> From: Radoslaw Garbacz 
> To: systemd-devel@lists.freedesktop.org
> Subject: [systemd-devel] systemd oneshot service stop o