Bug#758716: tgt: init script not LSB compliant

2014-09-17 Thread Patrick Matthäi
Am 16.09.2014 um 11:55 schrieb Apollon Oikonomopoulos:
 a) stop vs. forcedstop
 stop does not work if there are still open sessions:
  # /etc/init.d/tgt stop ; echo $?
  [FAIL] Stopping target framework daemon: tgtd failed!
  Some initiators are still connected - could not stop tgtd
  2
 I had to change the use of stop() to forcedstop(), so that tgt works with 
 HeartBeat.
 
 This is intentional and I am a bit reluctant to change the behavior at 
 this point (although under systemd we default to forcedstop, having no 
 ability to define custom actions). I'll think a bit more about 
 defaulting to a hard behavior before the next release. Note that failing 
 in this case does not seem to be an LSB violation.

Think about stopping a SQL or Webservice, where are still (and any time)
users. Not stopping on stop is buggy :(


-- 
/*
Mit freundlichem Gruß / With kind regards,
 Patrick Matthäi
 GNU/Linux Debian Developer

  Blog: http://www.linux-dev.org/
E-Mail: pmatth...@debian.org
patr...@linux-dev.org
*/



signature.asc
Description: OpenPGP digital signature


Bug#758716: tgt: init script not LSB compliant

2014-09-17 Thread Apollon Oikonomopoulos
Control: clone -1 -2
Control: retitle -2 tgt: init script stop action should always stop tgtd
Control: reopen -2
Control: found -2 1:1.0.50-1

On 19:17 Wed 17 Sep , Patrick Matthäi wrote:
 Am 16.09.2014 um 11:55 schrieb Apollon Oikonomopoulos:
  a) stop vs. forcedstop
  stop does not work if there are still open sessions:
 # /etc/init.d/tgt stop ; echo $?
 [FAIL] Stopping target framework daemon: tgtd failed!
 Some initiators are still connected - could not stop tgtd
 2
  I had to change the use of stop() to forcedstop(), so that tgt works with 
  HeartBeat.
  
  This is intentional and I am a bit reluctant to change the behavior at 
  this point (although under systemd we default to forcedstop, having no 
  ability to define custom actions). I'll think a bit more about 
  defaulting to a hard behavior before the next release. Note that failing 
  in this case does not seem to be an LSB violation.
 
 Think about stopping a SQL or Webservice, where are still (and any time)
 users. Not stopping on stop is buggy :(

You're right. However HTTP or MySQL clients might be able to deal with 
this in a graceful manner, whereas a system whose root fs resides on an 
iSCSI disks will probably not be excited if you pull the root fs under 
its feet.

Note that I don't like stop vs forcedstop either and as I said we 
already force-stop under systemd by default, so I'll probably change it.  
For the time being I'm cloning this as a different bug report and 
leaving it open.

Thanks again,
Apollon


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758716: tgt: init script not LSB compliant

2014-09-16 Thread Apollon Oikonomopoulos
Control: tags -1 pending

Hi Patrick and thanks for the report!

On 15:27 Wed 20 Aug , Patrick Matthäi wrote:
 Package: tgt
 Version: 1:1.0.48-1
 Severity: important
 
 Hi,
 
 the init script is not LSB compliant at all, because:
 
 a) stop vs. forcedstop
 stop does not work if there are still open sessions:
   # /etc/init.d/tgt stop ; echo $?
   [FAIL] Stopping target framework daemon: tgtd failed!
   Some initiators are still connected - could not stop tgtd
   2
 I had to change the use of stop() to forcedstop(), so that tgt works with 
 HeartBeat.

This is intentional and I am a bit reluctant to change the behavior at 
this point (although under systemd we default to forcedstop, having no 
ability to define custom actions). I'll think a bit more about 
defaulting to a hard behavior before the next release. Note that failing 
in this case does not seem to be an LSB violation.

 
 b) stop has to success
 If the daemon is not running and you stop it again, the script has to success!
   # /etc/init.d/tgt stop ; echo $?
   Force-stopping target framework daemon
   tgtd is not running
   1
 Errormessages from heartbeat:
 Aug 20 14:50:23 xav-share1-1 ResourceManager[5503]: ERROR: Return code 1 from 
 /etc/init.d/tgt
 Aug 20 14:50:24 xav-share1-1 ResourceManager[5503]: info: Retrying failed 
 stop operation [tgt]
 Aug 20 14:50:24 xav-share1-1 ResourceManager[5503]: info: Running 
 /etc/init.d/tgt  stop
 Aug 20 14:50:24 xav-share1-1 ResourceManager[5503]: ERROR: Return code 1 from 
 /etc/init.d/tgt
 Aug 20 14:50:25 xav-share1-1 ResourceManager[5503]: info: Retrying failed 
 stop operation [tgt]
 Aug 20 14:50:25 xav-share1-1 ResourceManager[5503]: info: Running 
 /etc/init.d/tgt  stop
 Aug 20 14:50:25 xav-share1-1 ResourceManager[5503]: ERROR: Return code 1 from 
 /etc/init.d/tgt
 Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: info: Retrying failed 
 stop operation [tgt]
 Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: info: Running 
 /etc/init.d/tgt  stop
 Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: ERROR: Return code 1 from 
 /etc/init.d/tgt
 Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: ERROR: Resource script 
 for tgt probably not LSB-compliant.
 Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: WARN: it (tgt) MUST 
 succeed on a stop when already stopped
 

True, this is an LSB violation and will be fixed in the next upload, 
which will also close the bug. If you feel that a) is an LSB violation, 
feel free to re-open it.

Regards,
Apollon


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758716: tgt: init script not LSB compliant

2014-08-20 Thread Patrick Matthäi
Package: tgt
Version: 1:1.0.48-1
Severity: important

Hi,

the init script is not LSB compliant at all, because:

a) stop vs. forcedstop
stop does not work if there are still open sessions:
# /etc/init.d/tgt stop ; echo $?
[FAIL] Stopping target framework daemon: tgtd failed!
Some initiators are still connected - could not stop tgtd
2
I had to change the use of stop() to forcedstop(), so that tgt works with 
HeartBeat.

b) stop has to success
If the daemon is not running and you stop it again, the script has to success!
# /etc/init.d/tgt stop ; echo $?
Force-stopping target framework daemon
tgtd is not running
1
Errormessages from heartbeat:
Aug 20 14:50:23 xav-share1-1 ResourceManager[5503]: ERROR: Return code 1 from 
/etc/init.d/tgt
Aug 20 14:50:24 xav-share1-1 ResourceManager[5503]: info: Retrying failed stop 
operation [tgt]
Aug 20 14:50:24 xav-share1-1 ResourceManager[5503]: info: Running 
/etc/init.d/tgt  stop
Aug 20 14:50:24 xav-share1-1 ResourceManager[5503]: ERROR: Return code 1 from 
/etc/init.d/tgt
Aug 20 14:50:25 xav-share1-1 ResourceManager[5503]: info: Retrying failed stop 
operation [tgt]
Aug 20 14:50:25 xav-share1-1 ResourceManager[5503]: info: Running 
/etc/init.d/tgt  stop
Aug 20 14:50:25 xav-share1-1 ResourceManager[5503]: ERROR: Return code 1 from 
/etc/init.d/tgt
Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: info: Retrying failed stop 
operation [tgt]
Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: info: Running 
/etc/init.d/tgt  stop
Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: ERROR: Return code 1 from 
/etc/init.d/tgt
Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: ERROR: Resource script for 
tgt probably not LSB-compliant.
Aug 20 14:50:26 xav-share1-1 ResourceManager[5503]: WARN: it (tgt) MUST succeed 
on a stop when already stopped



-- System Information:
Debian Release: 7.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org