Debian Bug report logs - #758093
ltspfsd: quietly fails with systemd as init system

version graph

Package: ltspfsd; Maintainer for ltspfsd is Debian LTSP Maintainers <team+ltsp@tracker.debian.org>; Source for ltspfsd is src:ltspfs (PTS, buildd, popcon).

Reported by: Vagrant Cascadian <vagrant@debian.org>

Date: Thu, 14 Aug 2014 08:33:01 UTC

Severity: serious

Tags: patch

Found in version ltspfs/1.3-1

Fixed in version ltspfs/1.4-1

Done: Vagrant Cascadian <vagrant@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, alkisg@gmail.com, Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#758093; Package ltspfsd. (Thu, 14 Aug 2014 08:33:05 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@debian.org>:
New Bug report received and forwarded. Copy sent to alkisg@gmail.com, Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (Thu, 14 Aug 2014 08:33:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@debian.org>
To: submit@bugs.debian.org
Subject: ltspfsd: quietly fails with systemd as init system
Date: Thu, 14 Aug 2014 01:30:51 -0700
[Message part 1 (text/plain, inline)]
Package: ltspfsd
Version: 1.3-1
Justification: unusable with default init system
Severity: serious
X-Debbugs-Cc: alkisg@gmail.com

When running systemd as the init system, ltspfsd quietly fails to start.
It's normally started from udev on device insertion or media change if
ltspfsd isn't already started.

Works fine if switching back to sysvinit-core... so there's something
specific to the systemd environment.


live well,
  vagrant
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#758093; Package ltspfsd. (Sat, 16 Aug 2014 06:27:05 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (Sat, 16 Aug 2014 06:27:05 GMT) (full text, mbox, link).


Message #10 received at 758093@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@debian.org>
To: 758093@bugs.debian.org
Subject: Re: ltspfsd: quietly fails with systemd as init system
Date: Fri, 15 Aug 2014 23:23:57 -0700
[Message part 1 (text/plain, inline)]
On 2014-08-14, Vagrant Cascadian wrote:
> When running systemd as the init system, ltspfsd quietly fails to start.
> It's normally started from udev on device insertion or media change if
> ltspfsd isn't already started.

This seems relevent:

  http://blog.fraggod.net/2012/06/16/proper-ish-way-to-start-long-running-systemd-service-on-udev-event-device-hotplug.html


live well,
  vagrant
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#758093; Package ltspfsd. (Mon, 18 Aug 2014 04:54:05 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (Mon, 18 Aug 2014 04:54:05 GMT) (full text, mbox, link).


Message #15 received at 758093@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@debian.org>
To: 758093@bugs.debian.org
Subject: Re: ltspfsd: quietly fails with systemd as init system
Date: Sun, 17 Aug 2014 21:52:15 -0700
[Message part 1 (text/plain, inline)]
Control: tags 758093 +patch

On 2014-08-15, Vagrant Cascadian wrote:
> On 2014-08-14, Vagrant Cascadian wrote:
>> When running systemd as the init system, ltspfsd quietly fails to start.
>> It's normally started from udev on device insertion or media change if
>> ltspfsd isn't already started.
>
> This seems relevent:
>
>   http://blog.fraggod.net/2012/06/16/proper-ish-way-to-start-long-running-systemd-service-on-udev-event-device-hotplug.html

Yeah, that article points out that systemd kills off processes started
From udev after a certain timeout...


With the following ltspfsd.service file:

  [Unit]
  Description=LTSP Filesystem Daemon

  [Service]
  Type=forking
  ExecStart=/usr/bin/ltspfsd


And the following patch:

From e6671110026355d77678a2eff9c8481296cb17fc Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Sat, 16 Aug 2014 20:54:17 -0700
Subject: [PATCH] Attempt to start ltspfsd using systemd unit, also drop the
 pid check, as it failed as often as it worked.

---
 scripts/ltspfs_entry | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/ltspfs_entry b/scripts/ltspfs_entry
index 4fc0fdf..fa84c40 100644
--- a/scripts/ltspfs_entry
+++ b/scripts/ltspfs_entry
@@ -101,14 +101,13 @@ remove_device()
 
 start_ltspfsd()
 {
-    if [ ! -e /var/run/ltspfsd.pid ] && [ -z "$(pgrep ltspfsd)" ]; then
+    if [ -z "$(pgrep ltspfsd)" ]; then
         # Make this sessions secret auth cookie for ltspfs
         if [ ! -f /var/run/ltspfs_token ]; then
             mcookie > /var/run/ltspfs_token
         fi
         # start up the ltspfsd daemon
-        /usr/bin/ltspfsd
-        echo $! >/var/run/ltspfsd.pid
+        systemctl start ltspfsd || /usr/bin/ltspfsd
     fi
 }
 
-- 
2.0.1


It's a little more expensive to always run pgrep, but haven't found a
simpler way to ensure that ltspfsd is actually running.

Ideally, it would at least detect if systemd was running, and then
respond accordingly, but at least this gets it working...


Could also add an init script and call "service ltspfsd start" instead,
which might work regardless of init system... ?


live well,
  vagrant
[Message part 2 (application/pgp-signature, inline)]

Added tag(s) patch. Request was from Vagrant Cascadian <vagrant@debian.org> to 758093-submit@bugs.debian.org. (Mon, 18 Aug 2014 04:54:05 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#758093; Package ltspfsd. (Mon, 18 Aug 2014 08:21:11 GMT) (full text, mbox, link).


Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (Mon, 18 Aug 2014 08:21:11 GMT) (full text, mbox, link).


Message #22 received at 758093@bugs.debian.org (full text, mbox, reply):

From: Petter Reinholdtsen <pere@hungry.com>
To: Vagrant Cascadian <vagrant@debian.org>, 758093@bugs.debian.org
Subject: Re: [Pkg-ltsp-devel] Bug#758093: ltspfsd: quietly fails with systemd as init system
Date: Mon, 18 Aug 2014 10:16:03 +0200
[Vagrant Cascadian]
> --- a/scripts/ltspfs_entry
> +++ b/scripts/ltspfs_entry
> @@ -101,14 +101,13 @@ remove_device()
>  
>  start_ltspfsd()
>  {
> -    if [ ! -e /var/run/ltspfsd.pid ] && [ -z "$(pgrep ltspfsd)" ]; then
> +    if [ -z "$(pgrep ltspfsd)" ]; then
>          # Make this sessions secret auth cookie for ltspfs
>          if [ ! -f /var/run/ltspfs_token ]; then
>              mcookie > /var/run/ltspfs_token
>          fi
>          # start up the ltspfsd daemon
> -        /usr/bin/ltspfsd
> -        echo $! >/var/run/ltspfsd.pid
> +        systemctl start ltspfsd || /usr/bin/ltspfsd
>      fi
>  }

Perhaps better to use a test like [ -d /run/systemd/system ] around the
call to systemctl to detect a running systemd, and keep using the pid
file for non-systemd environments?

-- 
Happy hacking
Petter Reinholdtsen



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#758093; Package ltspfsd. (Mon, 18 Aug 2014 17:30:05 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (Mon, 18 Aug 2014 17:30:05 GMT) (full text, mbox, link).


Message #27 received at 758093@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@debian.org>
To: Petter Reinholdtsen <pere@hungry.com>, 758093@bugs.debian.org
Subject: Re: Bug#758093: ltspfsd: quietly fails with systemd as init system
Date: Mon, 18 Aug 2014 10:27:09 -0700
[Message part 1 (text/plain, inline)]
On 2014-08-18, Petter Reinholdtsen wrote:
> Perhaps better to use a test like [ -d /run/systemd/system ] around the
> call to systemctl to detect a running systemd, and keep using the pid
> file for non-systemd environments?

Thanks for the suggestion, committed upstream and uploaded to debian...

live well,
  vagrant
[Message part 2 (application/pgp-signature, inline)]

Reply sent to Vagrant Cascadian <vagrant@debian.org>:
You have taken responsibility. (Mon, 18 Aug 2014 17:36:09 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@debian.org>:
Bug acknowledged by developer. (Mon, 18 Aug 2014 17:36:09 GMT) (full text, mbox, link).


Message #32 received at 758093-close@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@debian.org>
To: 758093-close@bugs.debian.org
Subject: Bug#758093: fixed in ltspfs 1.4-1
Date: Mon, 18 Aug 2014 17:33:37 +0000
Source: ltspfs
Source-Version: 1.4-1

We believe that the bug you reported is fixed in the latest version of
ltspfs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 758093@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vagrant Cascadian <vagrant@debian.org> (supplier of updated ltspfs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 18 Aug 2014 09:48:57 -0700
Source: ltspfs
Binary: ltspfs ltspfsd ltspfsd-core
Architecture: all source
Version: 1.4-1
Distribution: unstable
Urgency: medium
Maintainer: Debian LTSP Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>
Changed-By: Vagrant Cascadian <vagrant@debian.org>
Closes: 758090 758093
Description: 
 ltspfsd-core - Fuse based remote filesystem daemon for LTSP thin clients
 ltspfsd    - Fuse based remote filesystem hooks for LTSP thin clients
 ltspfs     - Fuse based remote filesystem for LTSP thin clients
Changes:
 ltspfs (1.4-1) unstable; urgency=medium
 .
   * New upstream version:
     - Fix filesystem size calculations. Thanks to datube for the initial
       patch! (LP: #1021579).
     - Mount ltspfs filesystem directly to /media/username/mountpoint
       (Closes: #758090).
     - Add support for starting ltspfsd from systemd service file when
       systemd is running (Closes: #758093).
     - ltspfsd: Don't add duplicate entries to ltspfs_fstab.
Checksums-Sha1: 
 c3c6eb96b9d03de7b829aee29f7b75cf34f16750 2061 ltspfs_1.4-1.dsc
 962839af8fefaeff068d3274b1692da46008b9e0 44329 ltspfs_1.4.orig.tar.gz
 bdcf927196e9a270d9a286d1d88631b49eb1554b 8460 ltspfs_1.4-1.debian.tar.xz
 7e96bfb46eed1274aa296fc0fa60606397a3e3ff 17158 ltspfsd_1.4-1_all.deb
Checksums-Sha256: 
 e76020eaaf97561a48cd213f36cb081ae33c61783891d37695d35c03f6298185 2061 ltspfs_1.4-1.dsc
 601f6a355c3494c6cf2eef3f02babd6043a1aea77e1d6170c7a9e6d0ad328a23 44329 ltspfs_1.4.orig.tar.gz
 0911488c701727a3aa1c4692ee6abc700475880dc55719f18e53b237ad92db5c 8460 ltspfs_1.4-1.debian.tar.xz
 9ada0236d68b6620dc140b7386b5e2e912b44263525c08241346a816d12d321f 17158 ltspfsd_1.4-1_all.deb
Files: 
 c0005daf491bcafdd26fa1dd0ab9c9ae 2061 net optional ltspfs_1.4-1.dsc
 c25775a308059f228697176119551325 44329 net optional ltspfs_1.4.orig.tar.gz
 cb7f723a763efcd14216c56a04f6082e 8460 net optional ltspfs_1.4-1.debian.tar.xz
 ed5a0fd92542601e3031e6cb58392e0b 17158 net optional ltspfsd_1.4-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJT8jbIAAoJELeLgtSBS5G2nK0P/2MQdLUhdyyxMeWY18NaB7xa
+EYrUcTccXn+bi0zNZMtQYJZbK0C0DNoq81I2MFGMox3m7UYJlcV5P9oStDs80NF
Bda0sabutzlrpUEmL+7PEQK0TfQNIwU9VWLqLtMnATBO44Nl909YpHts+rL+YThG
8uh99448B1WOUckl/2s6s7nFNx9BGF1frYdVw3R+gaRQNVUXLrrcc/Nd+vt2oIoy
rHwxyGuTcQI0m+TRq8n0egk2yrzWkFOmgLe5wBVyzWE82+zExAzWAMsT1Rq79Lz8
SefTWKbvnVlrW4cny3iCNUBbs+9TvctqpjJcHMynpvnJUpz4NOdwJjSd1BsivzQg
Hr7E6MZtE6cFZE8RKhnR3m4wXh2kBj2/09OJuhsBe9qcbbURqOI6A1FxoGyRVFE9
UThWpt4Xr1OFyxU6FQmcrj3/Y/Z/ruLpKFMuIknpmU3gtQtae/b3fvnLiCmFNfYb
F5QlQjJDgk+2O9LbMbamfSQV1HTH0eMVN/7FOk36ei1Gb6lyp286ovQm3q6IXBy7
ZPFfxdA+OlHJTA5a2IQbA26XVd0MPKWaeVfXu4cP+HW7kMTKqTBtlVmMqbyf8r9C
AeRSAvvbo7pCGmVAQX+c5dETAy5dmGitYOqSVgTXfm6mtAvyW6teLecq54X/FeFt
jMOWMOQk7rbFMKjh7W+h
=eL1e
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 21 Sep 2014 07:38:59 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jul 1 13:26:31 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.