[2/2] volatile-binds: Remove TimeoutSec and allow DefaultTimeoutSec to be used

Message ID 20220429073440.136829-2-stephensportia@gmail.com
State Accepted, archived
Commit 86aea324e423ce5f411a21afa18356339e3545a8
Headers show
Series [1/2] volatile-binds: Change DefaultDependencies from false to no | expand

Commit Message

Portia April 29, 2022, 7:34 a.m. UTC
Remove setting TimeoutSec and allow the DefaultTimeSec to be set for the
volatile-binds services.

Signed-off-by: Portia Stephens <stephensportia@gmail.com>
---
 meta/recipes-core/volatile-binds/files/volatile-binds.service.in | 1 -
 1 file changed, 1 deletion(-)

Comments

Khem Raj April 29, 2022, 3:38 p.m. UTC | #1
On 4/29/22 12:34 AM, Portia wrote:
> Remove setting TimeoutSec and allow the DefaultTimeSec to be set for the
> volatile-binds services.
> 

Whats the default value? I hope it does not go into infinite loop in 
case the service gets stuck

> Signed-off-by: Portia Stephens <stephensportia@gmail.com>
> ---
>   meta/recipes-core/volatile-binds/files/volatile-binds.service.in | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
> index 8fe7d8d4f9..52384c8264 100644
> --- a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
> +++ b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
> @@ -10,7 +10,6 @@ ConditionPathIsReadWrite=!@where@
>   [Service]
>   Type=oneshot
>   RemainAfterExit=Yes
> -TimeoutSec=0
>   Environment=MOUNT_COPYBIND_AVOID_OVERLAYFS=@avoid_overlayfs@
>   ExecStart=/sbin/mount-copybind @what@ @where@
>   ExecStop=/bin/umount @where@
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#164998): https://lists.openembedded.org/g/openembedded-core/message/164998
> Mute This Topic: https://lists.openembedded.org/mt/90771601/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Portia April 29, 2022, 10:17 p.m. UTC | #2
On Sat, Apr 30, 2022 at 1:39 AM Khem Raj <raj.khem@gmail.com> wrote:
>
>
>
> On 4/29/22 12:34 AM, Portia wrote:
> > Remove setting TimeoutSec and allow the DefaultTimeSec to be set for the
> > volatile-binds services.
> >
>
> Whats the default value? I hope it does not go into infinite loop in
> case the service gets stuck
>

Timeout=0 sets the Timeout to infinity, so the current behavior is
that if the service gets stuck
it never gets killed. DefaultTimeout will depend on what is set in the
/etc/systemd/system.conf.

> > Signed-off-by: Portia Stephens <stephensportia@gmail.com>
> > ---
> >   meta/recipes-core/volatile-binds/files/volatile-binds.service.in | 1 -
> >   1 file changed, 1 deletion(-)
> >
> > diff --git a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
> > index 8fe7d8d4f9..52384c8264 100644
> > --- a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
> > +++ b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
> > @@ -10,7 +10,6 @@ ConditionPathIsReadWrite=!@where@
> >   [Service]
> >   Type=oneshot
> >   RemainAfterExit=Yes
> > -TimeoutSec=0
> >   Environment=MOUNT_COPYBIND_AVOID_OVERLAYFS=@avoid_overlayfs@
> >   ExecStart=/sbin/mount-copybind @what@ @where@
> >   ExecStop=/bin/umount @where@
> >
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#164998): https://lists.openembedded.org/g/openembedded-core/message/164998
> > Mute This Topic: https://lists.openembedded.org/mt/90771601/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Khem Raj April 29, 2022, 10:45 p.m. UTC | #3
On Fri, Apr 29, 2022 at 3:17 PM Portia Stephens <stephensportia@gmail.com>
wrote:

> On Sat, Apr 30, 2022 at 1:39 AM Khem Raj <raj.khem@gmail.com> wrote:
> >
> >
> >
> > On 4/29/22 12:34 AM, Portia wrote:
> > > Remove setting TimeoutSec and allow the DefaultTimeSec to be set for
> the
> > > volatile-binds services.
> > >
> >
> > Whats the default value? I hope it does not go into infinite loop in
> > case the service gets stuck
> >
>
> Timeout=0 sets the Timeout to infinity, so the current behavior is
> that if the service gets stuck
> it never gets killed. DefaultTimeout will depend on what is set in the
> /etc/systemd/system.conf.


Right reading it from system default is fine I guess defaults are perhaps
around 90s which is enough for the service to load normally


>
> > > Signed-off-by: Portia Stephens <stephensportia@gmail.com>
> > > ---
> > >   meta/recipes-core/volatile-binds/files/volatile-binds.service.in |
> 1 -
> > >   1 file changed, 1 deletion(-)
> > >
> > > diff --git a/meta/recipes-core/volatile-binds/files/
> volatile-binds.service.in b/meta/recipes-core/volatile-binds/files/
> volatile-binds.service.in
> > > index 8fe7d8d4f9..52384c8264 100644
> > > --- a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
> > > +++ b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
> > > @@ -10,7 +10,6 @@ ConditionPathIsReadWrite=!@where@
> > >   [Service]
> > >   Type=oneshot
> > >   RemainAfterExit=Yes
> > > -TimeoutSec=0
> > >   Environment=MOUNT_COPYBIND_AVOID_OVERLAYFS=@avoid_overlayfs@
> > >   ExecStart=/sbin/mount-copybind @what@ @where@
> > >   ExecStop=/bin/umount @where@
> > >
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > View/Reply Online (#164998):
> https://lists.openembedded.org/g/openembedded-core/message/164998
> > > Mute This Topic: https://lists.openembedded.org/mt/90771601/1997914
> > > Group Owner: openembedded-core+owner@lists.openembedded.org
> > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
> [raj.khem@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
>

Patch

diff --git a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
index 8fe7d8d4f9..52384c8264 100644
--- a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
+++ b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
@@ -10,7 +10,6 @@  ConditionPathIsReadWrite=!@where@
 [Service]
 Type=oneshot
 RemainAfterExit=Yes
-TimeoutSec=0
 Environment=MOUNT_COPYBIND_AVOID_OVERLAYFS=@avoid_overlayfs@
 ExecStart=/sbin/mount-copybind @what@ @where@
 ExecStop=/bin/umount @where@