Re: [systemd-devel] Is there a way to override the "Where" option in mount units?

2017-11-01 Thread Lennart Poettering
On Mi, 01.11.17 22:15, NeilBrown (ne...@suse.com) wrote:

> > Hmm, rpc_pipefs is a virtual API fs, right? If so, it really shouldn't
> > be mounted below /var in the first place. Any chance you can work with
> > the NFS folks to maybe move it below /run (or /sys or so) where API
> > file systems really belong? Otherwise everybody who wants to run /var
> > on FNS will run into the same problems sooner or later.
> >
> > Neil, maybe you could comment on this? Thanks!
> 
> What good timing.. nfs-utils-2.2.1 was just released yesterday.
> It contains
>   
> http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=3892174834ea1a4729348f0ecd3078cc1d5458e4
> 
> If you have a file /etc/nfs.conf which contains
> 
> [general]
>  pipefs-directory = /run/nfs/rpc-pipefs
> 
> then a generator will create the required .mount unit, and all
> tools and daemons will know where to look for the filesystem.

Any chance this can be made the default? Otherwise everybody who wants
/var on NFS will first have to reconfigure things.

BTW, I quickly glanced over the patch you linked, and one thing I
noticed: you enumerate through /etc/mtab in the generator. However,
mtab is long obsolete, and should not be used anymore. In fact we
nowadays will "taint" systemd if we notice that /etc/mtab is not a
symlink to /proc/self/mounts. It's simply unsupported, and new code
really should not reference the concept anymore... (oh, and the
offical way to refernce mtab is through libc's _PATH_MOUNTED define
btw...)

Now, one step better than still using /etc/mtab is using
/proc/self/mounts, but that's kinda legacy too, the new thing du jour
is /proc/self/mountinfo now.

But then again, I'd suggest using statfs and comparing the magic. It's
so much simpler...

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] 回复: 回复: 回复: 回复: 回复: 回复: 回复: 回复: [systemd-d e vel] sys t emctl can't executestopactually,whenserviceisstarted by other way

2017-11-01 Thread Lennart Poettering
On Mi, 01.11.17 19:07, 清辰 (624001...@qq.com) wrote:

> Hi Lennart,
> 
> For example, shell command: ulimit -Sn `ulimit -Hn`
> It will set soft limit to hard limit.
>
> I want to achieve it in systemd.unit.
> 
> Can you get my point?

This is not supported. But do note that the kernel sets RLIMIT_NOFILE
to 1024:4096 by default, and this is what systemd passes on to the
processes it forks off. Also note, that the resource limit code in
systemd will actually bump the limits to the configured value with a
fallback of the highest permitted limit if the requested one is
prohibited for some policy reason.

That means, if you set LimitNOFILE=4096 in your service, you get what
you are asking for.

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] udev

2017-11-01 Thread David Henderson
On 11/1/17, Mike Gilbert  wrote:
> On Wed, Nov 1, 2017 at 10:49 AM, David Henderson
>  wrote:
>> On 11/1/17, Greg KH  wrote:
>>> On Wed, Nov 01, 2017 at 10:36:16AM -0400, David Henderson wrote:
 Is there a place to just get the udev code instead of all of systemD?
>>>
>>> No.
>>>
 I tried looking online, but it appears that the only solo versions are
 old.  I guess this got merged into systemD for some reason?
>>>
>>> Yes, it all got merged many many years ago for the obvious reasons that
>>> you will find out if you try to tear them apart :)
>>
>> lol Thanks Greg, I will give it another shot later today to see if I
>> can get things resolved with some of the suggestions provided!
>
> On the topic of ripping udev out of systemd:
>
> Some Gentoo people actually forked udev out of systemd a while ago.
> You might consider using their "eudev" fork if it meets your needs. We
> use this as the default udev implementation for Gentoo systems that do
> not use systemd. Just don't ask for support for it on this mailing
> list. ;-)
>
> https://wiki.gentoo.org/wiki/Project:Eudev
>
> https://github.com/gentoo/eudev
>

Thanks Mike, that might be a better solution for me than attempting
the systemD version!  I will give that a shot later today as well!

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


Re: [systemd-devel] udev

2017-11-01 Thread Mike Gilbert
On Wed, Nov 1, 2017 at 10:49 AM, David Henderson
 wrote:
> On 11/1/17, Greg KH  wrote:
>> On Wed, Nov 01, 2017 at 10:36:16AM -0400, David Henderson wrote:
>>> Is there a place to just get the udev code instead of all of systemD?
>>
>> No.
>>
>>> I tried looking online, but it appears that the only solo versions are
>>> old.  I guess this got merged into systemD for some reason?
>>
>> Yes, it all got merged many many years ago for the obvious reasons that
>> you will find out if you try to tear them apart :)
>
> lol Thanks Greg, I will give it another shot later today to see if I
> can get things resolved with some of the suggestions provided!

On the topic of ripping udev out of systemd:

Some Gentoo people actually forked udev out of systemd a while ago.
You might consider using their "eudev" fork if it meets your needs. We
use this as the default udev implementation for Gentoo systems that do
not use systemd. Just don't ask for support for it on this mailing
list. ;-)

https://wiki.gentoo.org/wiki/Project:Eudev

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


Re: [systemd-devel] udev

2017-11-01 Thread David Henderson
On 11/1/17, Greg KH  wrote:
> On Wed, Nov 01, 2017 at 10:36:16AM -0400, David Henderson wrote:
>> Is there a place to just get the udev code instead of all of systemD?
>
> No.
>
>> I tried looking online, but it appears that the only solo versions are
>> old.  I guess this got merged into systemD for some reason?
>
> Yes, it all got merged many many years ago for the obvious reasons that
> you will find out if you try to tear them apart :)

lol Thanks Greg, I will give it another shot later today to see if I
can get things resolved with some of the suggestions provided!

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


Re: [systemd-devel] udev

2017-11-01 Thread David Henderson
On 11/1/17, Lennart Poettering  wrote:
> On Di, 31.10.17 14:49, David Henderson (dhender...@digital-pipe.com) wrote:
>
>> Good afternoon all.  So is there another place I can get help for
>> this problem?
>
> Sorry, but this isn't really the right forum for help regarding
> building your distribution. Most of us just base our work on the work
> established distributions already did for us in this regard. If that
> doesn't work for you, then please contact a community such as LFS,
> whose focus it explicitly is to build a distribution from scratch,
> without resuing any work from other distributions. I am pretty sure
> they have more experience with putting together their own working
> build tool chain than us.
>
> Sorry,
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>

Good morning Lennart, thanks for the follow-up!  At this point I am
only interested in building a particular program (udev) from the
systemD collection, not help building a distribution.  And I think if
I tried to contact LFS about this, they would direct me to this
communication channel since this is where the people who build and
support the programs are located.  As a side question, is there a
place to just acquire the udev portion without all the other parts or
did that get merged into this suite only?

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


Re: [systemd-devel] udev

2017-11-01 Thread Greg KH
On Wed, Nov 01, 2017 at 10:04:19AM -0400, David Henderson wrote:
> Good morning Lennart, thanks for the follow-up!  At this point I am
> only interested in building a particular program (udev) from the
> systemD collection, not help building a distribution.  And I think if
> I tried to contact LFS about this, they would direct me to this
> communication channel since this is where the people who build and
> support the programs are located.  As a side question, is there a
> place to just acquire the udev portion without all the other parts or
> did that get merged into this suite only?

Again, I would look at how Gentoo does it in their build scripts.
That's your best bet, and if that doesn't work, you really are on your
own as the source code is not set up to only extract one program from
the whole system, for obvious reasons.

good luck!

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


Re: [systemd-devel] 回复: 回复: 回复: 回复: 回复: 回复: 回复: [systemd-d e vel] sys temctl can't executestopactually,whenservice isstarted by other way

2017-11-01 Thread Colin Guthrie
Lennart Poettering wrote on 01/11/17 10:17:
> On Mi, 01.11.17 17:59, 清辰 (624001...@qq.com) wrote:
> 
>> Hi Lennart,
>> That is important for me. Could you tell me that?
> 
> I am sorry, but I don't understand the question? 
> 
>> This documentation says I can set by
>> LimitCORE="0;0"
>>
>>
>> But my request is:
>> For example, now system hard limit of core is infinity, I want to set soft 
>> limit to infinity.
>> But when hard limit is 0, I want to set soft limit to 0.
>> when hard limit is 100, I want to set soft limit to 100.

From how I read it, the OP is asking for the syntax to set the soft
limit in the .service file to whatever the current system-wide hard
limit is.

I'm afraid I'm not sure of the underlying concepts there to say whether
this is supported (or indeed sensible)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] ?????? ?????? ?????? ?????? ?????? ?????? ?????? ?????? [systemd-d e vel] sys t emctl can't executestopactually,whenserviceisstarted by other way

2017-11-01 Thread ????
Hi Lennart,

For example, shell command: ulimit -Sn `ulimit -Hn`
It will set soft limit to hard limit.


I want to achieve it in systemd.unit.


Can you get my point?




--  --
??: "Lennart Poettering"; 
: 2017??11??1??(??) 6:17
??: ""<624001...@qq.com>; 
: "Oliver Neukum"; 
"systemd-devel"; 
: Re: ?? ?? ?? ?? ?? [systemd-devel] ?? ??  
[systemd-d e vel] sys t emctl can't executestopactually,whenserviceisstarted by 
other way



On Mi, 01.11.17 17:59,  (624001...@qq.com) wrote:

> Hi Lennart,
> That is important for me. Could you tell me that?

I am sorry, but I don't understand the question? 

> This documentation says I can set by
> LimitCORE="0;0"
> 
> 
> But my request is:
> For example, now system hard limit of core is infinity, I want to set soft 
> limit to infinity.
> But when hard limit is 0, I want to set soft limit to 0.
> when hard limit is 100, I want to set soft limit to 100.
> 
> 
> But how to know system hard limit? Is there a petty way to get hard limit?


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] Is there a way to override the "Where" option in mount units?

2017-11-01 Thread NeilBrown
On Wed, Nov 01 2017, Lennart Poettering wrote:

> On Di, 31.10.17 11:19, Dennis Jacobfeuerborn (denni...@conversis.de) wrote:
>
>> Hi,
>> I'm trying to set up a redundant nfs server but the problem I'm
>> currently running into is that I need to move the
>> /var/lib/nfs/rpc_pipefs mountpoint outside of /var/lib/nfs.
>
> Hmm, rpc_pipefs is a virtual API fs, right? If so, it really shouldn't
> be mounted below /var in the first place. Any chance you can work with
> the NFS folks to maybe move it below /run (or /sys or so) where API
> file systems really belong? Otherwise everybody who wants to run /var
> on FNS will run into the same problems sooner or later.
>
> Neil, maybe you could comment on this? Thanks!

What good timing.. nfs-utils-2.2.1 was just released yesterday.
It contains
  
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=3892174834ea1a4729348f0ecd3078cc1d5458e4

If you have a file /etc/nfs.conf which contains

[general]
 pipefs-directory = /run/nfs/rpc-pipefs

then a generator will create the required .mount unit, and all
tools and daemons will know where to look for the filesystem.

NeilBrown


>
>> The original mountpoint is handled by
>> /usr/lib/systemd/system/var-lib-nfs-rpc_pipefs.mount which comes as part
>> of the nfs-utils RPM.
>> So my initial naive idea was to create a drop-in in /etc/systemd/system
>> and override the "Where" option but that's when I learned that this
>> option cannot differ from the mount unit filename.
>
> Yeah, something like that isn't really supported. However, you could
> make it a bind mount, and first mount rpc_pipefs to /run somewhere,
> and the just bind mount it over to /var/lib later?
>
> Lennart
>
> -- 
> Lennart Poettering, Red Hat


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


Re: [systemd-devel] Is there a way to override the "Where" option in mount units?

2017-11-01 Thread Lennart Poettering
On Mi, 01.11.17 11:40, Michael Biebl (mbi...@gmail.com) wrote:

> 2017-11-01 10:56 GMT+01:00 Lennart Poettering :
> >
> > Hmm, rpc_pipefs is a virtual API fs, right? If so, it really shouldn't
> > be mounted below /var in the first place. Any chance you can work with
> > the NFS folks to maybe move it below /run (or /sys or so) where API
> > file systems really belong? Otherwise everybody who wants to run /var
> > on FNS will run into the same problems sooner or later.
> 
> Fwiw, in Debian rpc_pipefs is mounted under /run:
> 
> $ systemctl cat run-rpc_pipefs.mount
> # /lib/systemd/system/run-rpc_pipefs.mount
> [Unit]
> Description=RPC Pipe File System
> DefaultDependencies=no
> Conflicts=umount.target
> 
> [Mount]
> What=sunrpc
> Where=/run/rpc_pipefs
> Type=rpc_pipefs

I wished people would stop placing stuff directly below /run, and
instead stick to per-subsystem subdirs, i.e /run/nfs/rpc_pipefs would
be the better place I think.

So, Fedora/RHEL/upstream go the subsystem directory part right, and
Debian got the /run thing right. I wished people could agree on
/run/nfs as a common solution now ;-)

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] Is there a way to override the "Where" option in mount units?

2017-11-01 Thread Michael Biebl
2017-11-01 11:40 GMT+01:00 Michael Biebl :
> See 
> https://anonscm.debian.org/cgit/collab-maint/nfs-utils.git/tree/debian/patches/24-systemd-pipefs_in_run.patch?h=debian/sid

Also requires
https://anonscm.debian.org/cgit/collab-maint/nfs-utils.git/tree/debian/patches/unbreak-gssd-rpc_pipefs-run.patch?h=debian/sid
https://anonscm.debian.org/cgit/collab-maint/nfs-utils.git/tree/debian/patches/unbreak-blkmapd-rpc_pipefs-run.patch?h=debian/sid


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Is there a way to override the "Where" option in mount units?

2017-11-01 Thread Michael Biebl
2017-11-01 10:56 GMT+01:00 Lennart Poettering :
>
> Hmm, rpc_pipefs is a virtual API fs, right? If so, it really shouldn't
> be mounted below /var in the first place. Any chance you can work with
> the NFS folks to maybe move it below /run (or /sys or so) where API
> file systems really belong? Otherwise everybody who wants to run /var
> on FNS will run into the same problems sooner or later.

Fwiw, in Debian rpc_pipefs is mounted under /run:

$ systemctl cat run-rpc_pipefs.mount
# /lib/systemd/system/run-rpc_pipefs.mount
[Unit]
Description=RPC Pipe File System
DefaultDependencies=no
Conflicts=umount.target

[Mount]
What=sunrpc
Where=/run/rpc_pipefs
Type=rpc_pipefs


See 
https://anonscm.debian.org/cgit/collab-maint/nfs-utils.git/tree/debian/patches/24-systemd-pipefs_in_run.patch?h=debian/sid
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] 回复: 回复: 回复: 回复: 回复: 回复: 回复: [systemd-d e vel] sys temctl can't executestopactually,whenservice isstarted by other way

2017-11-01 Thread Lennart Poettering
On Mi, 01.11.17 17:59, 清辰 (624001...@qq.com) wrote:

> Hi Lennart,
> That is important for me. Could you tell me that?

I am sorry, but I don't understand the question? 

> This documentation says I can set by
> LimitCORE="0;0"
> 
> 
> But my request is:
> For example, now system hard limit of core is infinity, I want to set soft 
> limit to infinity.
> But when hard limit is 0, I want to set soft limit to 0.
> when hard limit is 100, I want to set soft limit to 100.
> 
> 
> But how to know system hard limit? Is there a petty way to get hard limit?


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] Is there a way to override the "Where" option in mount units?

2017-11-01 Thread Lennart Poettering
On Di, 31.10.17 11:19, Dennis Jacobfeuerborn (denni...@conversis.de) wrote:

> Hi,
> I'm trying to set up a redundant nfs server but the problem I'm
> currently running into is that I need to move the
> /var/lib/nfs/rpc_pipefs mountpoint outside of /var/lib/nfs.

Hmm, rpc_pipefs is a virtual API fs, right? If so, it really shouldn't
be mounted below /var in the first place. Any chance you can work with
the NFS folks to maybe move it below /run (or /sys or so) where API
file systems really belong? Otherwise everybody who wants to run /var
on FNS will run into the same problems sooner or later.

Neil, maybe you could comment on this? Thanks!

> The original mountpoint is handled by
> /usr/lib/systemd/system/var-lib-nfs-rpc_pipefs.mount which comes as part
> of the nfs-utils RPM.
> So my initial naive idea was to create a drop-in in /etc/systemd/system
> and override the "Where" option but that's when I learned that this
> option cannot differ from the mount unit filename.

Yeah, something like that isn't really supported. However, you could
make it a bind mount, and first mount rpc_pipefs to /run somewhere,
and the just bind mount it over to /var/lib later?

Lennart

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


[systemd-devel] ?????? ?????? ?????? ?????? ?????? ?????? ?????? [systemd-d e vel] sys temctl can't executestopactually,whenservice isstarted by other way

2017-11-01 Thread ????
Hi Lennart,
That is important for me. Could you tell me that?




-- --

 

This documentation says I can set by
LimitCORE="0;0"


But my request is:
For example, now system hard limit of core is infinity, I want to set soft 
limit to infinity.
But when hard limit is 0, I want to set soft limit to 0.
when hard limit is 100, I want to set soft limit to 100.


But how to know system hard limit? Is there a petty way to get hard limit?




--  --
??: "Lennart Poettering"; 
: 2017??11??1??(??) 4:15
??: ""<624001...@qq.com>; 
: "Oliver Neukum"; 
"systemd-devel"; 
: Re: ?? ?? ?? ?? [systemd-devel] ?? ??  [systemd-d 
e vel] sys temctl can't executestopactually,whenservice isstarted by other way



On Mi, 01.11.17 16:13,  (624001...@qq.com) wrote:

> But this documentations seems to not show how to get a hard limit in
> systemd.unit. Could you tell me how?

It documents how to configure the pair pair of soft and hard
limit. Please read the documentation I linked. Thanks.

Lennart

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


[systemd-devel] ?????? ?????? ?????? ?????? ?????? ?????? ?????? [systemd-d e vel] sys temctl can't executestopactually,whenservice isstarted by other way

2017-11-01 Thread ????
Sorry, I has read the documentation.

This documentation says I can set by
LimitCORE="0;0"


But my request is:
For example, now system hard limit of core is infinity, I want to set soft 
limit to infinity.
But when hard limit is 0, I want to set soft limit to 0.
when hard limit is 100, I want to set soft limit to 100.


But how to know system hard limit? Is there a petty way to get hard limit?




--  --
??: "Lennart Poettering"; 
: 2017??11??1??(??) 4:15
??: ""<624001...@qq.com>; 
: "Oliver Neukum"; 
"systemd-devel"; 
: Re: ?? ?? ?? ?? [systemd-devel] ?? ??  [systemd-d 
e vel] sys temctl can't executestopactually,whenservice isstarted by other way



On Mi, 01.11.17 16:13,  (624001...@qq.com) wrote:

> But this documentations seems to not show how to get a hard limit in
> systemd.unit. Could you tell me how?

It documents how to configure the pair pair of soft and hard
limit. Please read the documentation I linked. Thanks.

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] udev

2017-11-01 Thread Lennart Poettering
On Di, 31.10.17 14:49, David Henderson (dhender...@digital-pipe.com) wrote:

> Good afternoon all.  So is there another place I can get help for
> this problem?

Sorry, but this isn't really the right forum for help regarding
building your distribution. Most of us just base our work on the work
established distributions already did for us in this regard. If that
doesn't work for you, then please contact a community such as LFS,
whose focus it explicitly is to build a distribution from scratch,
without resuing any work from other distributions. I am pretty sure
they have more experience with putting together their own working
build tool chain than us.

Sorry,

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] 回复: 回复: 回复: 回复: 回复: 回复: [systemd-d e vel] sys temctl can't executestopactually,whenservice isstarted by other way

2017-11-01 Thread Lennart Poettering
On Mi, 01.11.17 16:13, 清辰 (624001...@qq.com) wrote:

> But this documentations seems to not show how to get a hard limit in
> systemd.unit. Could you tell me how?

It documents how to configure the pair pair of soft and hard
limit. Please read the documentation I linked. Thanks.

Lennart

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


[systemd-devel] ?????? ?????? ?????? ?????? ?????? ?????? [systemd-d e vel] sys temctl can't executestopactually,whenservice isstarted by other way

2017-11-01 Thread ????
But this documentations seems to not show how to get a hard limit in 
systemd.unit. Could you tell me how?



--  --
??: "Lennart Poettering"; 
: 2017??11??1??(??) 3:48
??: ""<624001...@qq.com>; 
: "Oliver Neukum"; 
"systemd-devel"; 
: Re: ?? ?? ?? [systemd-devel] ?? ??  [systemd-d e vel] 
sys temctl can't executestopactually,whenservice isstarted by other way



On Di, 31.10.17 16:46,  (624001...@qq.com) wrote:

> Hi Lennart,
>Is there a way to get hard ulimit in systemd.unit. Because I want to set 
> soft ulimit to hard ulimit value by LimitCORE.
>Thank you.

See the documentation:

https://www.freedesktop.org/software/systemd/man/systemd.exec.html#LimitCPU=

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] Is there a way to recover from a crashed systemd without rebooting?

2017-11-01 Thread Lennart Poettering
On Di, 31.10.17 17:04, Daniel Wang (wonder...@google.com) wrote:

> I hit a bug in systemd-232 and it crashed. Anything I tried to do with
> `systemctl`, including `systemctl daemon-reexec` seemed to rely on the
> systemd dbus service, which all resulted in `Failed to activate service
> 'org.freedesktop.systemd1': timed out`.
> 
> systemd runs as PID 1. Is there any way to recover without a reboot?

When PID 1 crashes by a signal this is caught and PID 1 will freeze,
but first close all file descriptors. This normally means that you
cannot contact it anymore, but you should get immediate failure
replies about any attempts as all communication channels are
terminated and not left hanging.

I wished we could make PID 1 recover fully on such crashes, i.e. by
execing ourselves again on failure signal, however the last time I
looked (which was when we started working on systemd) the kernel
doesn't actually allows reexecing PID 1 anymore after it caught a
deadly signal once...

Long story short: no you cannot recover from PID 1 crashing. Sorry!

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] 回复: 回复: 回复: 回复: 回复: [systemd-d e vel] sys temctl can't execute stopactually,whenservice isstarted by other way

2017-11-01 Thread Lennart Poettering
On Di, 31.10.17 16:46, 清辰 (624001...@qq.com) wrote:

> Hi Lennart,
>Is there a way to get hard ulimit in systemd.unit. Because I want to set 
> soft ulimit to hard ulimit value by LimitCORE.
>Thank you.

See the documentation:

https://www.freedesktop.org/software/systemd/man/systemd.exec.html#LimitCPU=

Lennart

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


[systemd-devel] Is there a way to get hard ulimit in systemd.unit?

2017-11-01 Thread ????
Hi,
   Is there a way to get hard ulimit in systemd.unit. Because I want to set 
soft ulimit to hard ulimit value by LimitCORE.
   Thank you for your help.___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel