Re: [systemd-devel] Question regarding the NotifyAccess parameter

2013-12-12 Thread salil GK
I think my system had a bit older minor version of systemd (
systemd-204-8.fc19.x86_64 ). In another system I have tested where I have
systemd higher version - where the issue is not there - (
systemd-204-17.fc19.x86_64 ).

Thanks
Salil


On 11 December 2013 06:15, salil GK gksa...@gmail.com wrote:

 Thanks Lennart for the reply.

 The issue that I am facing is with the restart feature of systemd.

 I  have configured my unit file as Restart=on-failure

 when the service fail to send watchdog signal the expectation is - systemd
 will restart the service.

 what I observed is - systemd started one more service rather than
 restarting.

 my previous mail describe what exactly I see in the console.

 If you need any more clarification I will provide.

 Thanks and regards
 Salil


 On 11 December 2013 04:55, Lennart Poettering lenn...@poettering.netwrote:

 On Mon, 09.12.13 09:47, salil GK (gksa...@gmail.com) wrote:

  Hello
 
 did any body get a chance to look into this. I am a kind of stuck on
  this. I can work around using ExecStartPre script where I can kill the
  previous instances. But if systemd is capable to do  it by itself, that
  would be the neat solution.

 Hmm, the mail you pasted and the archives do not really give me any hint
 what your the problem you are trying to solve is?

 Lennart

 --
 Lennart Poettering, Red Hat



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


Re: [systemd-devel] Question regarding the NotifyAccess parameter

2013-12-10 Thread Lennart Poettering
On Mon, 09.12.13 09:47, salil GK (gksa...@gmail.com) wrote:

 Hello
 
did any body get a chance to look into this. I am a kind of stuck on
 this. I can work around using ExecStartPre script where I can kill the
 previous instances. But if systemd is capable to do  it by itself, that
 would be the neat solution.

Hmm, the mail you pasted and the archives do not really give me any hint
what your the problem you are trying to solve is?

Lennart

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


Re: [systemd-devel] Question regarding the NotifyAccess parameter

2013-12-10 Thread salil GK
Thanks Lennart for the reply.

The issue that I am facing is with the restart feature of systemd.

I  have configured my unit file as Restart=on-failure

when the service fail to send watchdog signal the expectation is - systemd
will restart the service.

what I observed is - systemd started one more service rather than
restarting.

my previous mail describe what exactly I see in the console.

If you need any more clarification I will provide.

Thanks and regards
Salil


On 11 December 2013 04:55, Lennart Poettering lenn...@poettering.netwrote:

 On Mon, 09.12.13 09:47, salil GK (gksa...@gmail.com) wrote:

  Hello
 
 did any body get a chance to look into this. I am a kind of stuck on
  this. I can work around using ExecStartPre script where I can kill the
  previous instances. But if systemd is capable to do  it by itself, that
  would be the neat solution.

 Hmm, the mail you pasted and the archives do not really give me any hint
 what your the problem you are trying to solve is?

 Lennart

 --
 Lennart Poettering, Red Hat

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


Re: [systemd-devel] Question regarding the NotifyAccess parameter

2013-12-10 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 11, 2013 at 06:15:02AM +0530, salil GK wrote:
 Thanks Lennart for the reply.
 
 The issue that I am facing is with the restart feature of systemd.
 
 I  have configured my unit file as Restart=on-failure
 
 when the service fail to send watchdog signal the expectation is - systemd
 will restart the service.
What verion of systemd are you using?

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Question regarding the NotifyAccess parameter

2013-12-08 Thread salil GK
Hello

   did any body get a chance to look into this. I am a kind of stuck on
this. I can work around using ExecStartPre script where I can kill the
previous instances. But if systemd is capable to do  it by itself, that
would be the neat solution.

Thanks
~S


On 5 December 2013 13:19, salil GK gksa...@gmail.com wrote:

 Hello

  I am using Fedora 19 and systemd in it is 204 I guess. The issue is
 present in there. The following is whatmy unit file is

 
 cat /usr/lib/systemd/system/Myservice.service
 [Unit]
 Description=This is a test service

 [Service]
 #PIDFile=/var/run/Myservice.pid
 #ExecStartPre=/tmp/one_start_pre.sh
 #ExecStartPre=/bin/systemctl stop Myservice
 ExecStartPost=/tmp/one_start_post.sh
 #ExecStartPre=/usr/bin/systemctl stop Myservice
 RemainAfterExit=yes

 ExecStart=/tmp/one.sh
 *Restart=on-failure*
 NotifyAccess=all
 WatchdogSec=10
 User=admin
 Group=admin

 [Install]
 Alias=myservice.services

 

 systemctl output

 

 sudo systemctl status Myservice
 Myservice.service - This is a test service
Loaded: loaded (/usr/lib/systemd/system/Myservice.service; disabled)
Active: active (running) since Thu 2013-12-05 18:39:36 IST; 1s ago
   Process: 20968 ExecStartPost=/tmp/one_start_post.sh (code=exited,
 status=0/SUCCESS)
  Main PID: 20967 (one.sh)
CGroup: name=systemd:/system/Myservice.service
├─*20967* /bin/bash /tmp/one.sh
└─20971 sleep 5


 After some time I made the watchdog timer fail.

 sudo systemctl status Myservice
 Myservice.service - This is a test service
Loaded: loaded (/usr/lib/systemd/system/Myservice.service; disabled)
Active: active (running) since Thu 2013-12-05 18:40:52 IST; 2s ago
   Process: 21180 ExecStartPost=/tmp/one_start_post.sh (code=exited,
 status=0/SUCCESS)
  Main PID: 21179 (one.sh)
CGroup: name=systemd:/system/Myservice.service
├─*20967* /bin/bash /tmp/one.sh
├─21006 /bin/bash /tmp/one.sh
├─21030 /bin/bash /tmp/one.sh
├─21058 /bin/bash /tmp/one.sh
├─21092 /bin/bash /tmp/one.sh
├─21133 /bin/bash /tmp/one.sh
├─21166 sleep 5
├─21169 sleep 5
├─21172 sleep 5
├─21175 sleep 5
├─21178 sleep 5
├─21179 /bin/bash /tmp/one.sh
├─21184 sleep 5
└─21191 sleep 5


 

 $$ ] systemctl --version
 systemd 204
 +PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL
 +XZ

 Thanks
 Salil



 On 26 November 2013 20:27, Hoyer, Marko (ADITG/SW2) mho...@de.adit-jv.com
  wrote:

  One more issue I observed is - if I specify Restart=on-failure, if
   watchdog timer expire, it restart the service. But I can see that it
   create two processes rather than restarting the process. But if I do
   systemctl restart Myservice , it kills the previous instance of
   service and start a new service. Any pointers on why it happens so.

 This part has been already reported as a bug in May:
 http://lists.freedesktop.org/archives/systemd-devel/2013-May/011030.html

 Best to my knowledge, this has been fixed in systemd 203, 204, or 205 ...
 Please note that the link above does not contain the final bug fix. Some
 discussions followed which led to the final solution at a certain point.
 Follow the threads, you'll find it ...


 Best regards

 Marko Hoyer
 Software Group II (ADITG/SW2)

 Tel. +49 5121 49 6948



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


Re: [systemd-devel] Question regarding the NotifyAccess parameter

2013-12-04 Thread salil GK
Hello

 I am using Fedora 19 and systemd in it is 204 I guess. The issue is
present in there. The following is whatmy unit file is


cat /usr/lib/systemd/system/Myservice.service
[Unit]
Description=This is a test service

[Service]
#PIDFile=/var/run/Myservice.pid
#ExecStartPre=/tmp/one_start_pre.sh
#ExecStartPre=/bin/systemctl stop Myservice
ExecStartPost=/tmp/one_start_post.sh
#ExecStartPre=/usr/bin/systemctl stop Myservice
RemainAfterExit=yes

ExecStart=/tmp/one.sh
*Restart=on-failure*
NotifyAccess=all
WatchdogSec=10
User=admin
Group=admin

[Install]
Alias=myservice.services



systemctl output



sudo systemctl status Myservice
Myservice.service - This is a test service
   Loaded: loaded (/usr/lib/systemd/system/Myservice.service; disabled)
   Active: active (running) since Thu 2013-12-05 18:39:36 IST; 1s ago
  Process: 20968 ExecStartPost=/tmp/one_start_post.sh (code=exited,
status=0/SUCCESS)
 Main PID: 20967 (one.sh)
   CGroup: name=systemd:/system/Myservice.service
   ├─*20967* /bin/bash /tmp/one.sh
   └─20971 sleep 5


After some time I made the watchdog timer fail.

sudo systemctl status Myservice
Myservice.service - This is a test service
   Loaded: loaded (/usr/lib/systemd/system/Myservice.service; disabled)
   Active: active (running) since Thu 2013-12-05 18:40:52 IST; 2s ago
  Process: 21180 ExecStartPost=/tmp/one_start_post.sh (code=exited,
status=0/SUCCESS)
 Main PID: 21179 (one.sh)
   CGroup: name=systemd:/system/Myservice.service
   ├─*20967* /bin/bash /tmp/one.sh
   ├─21006 /bin/bash /tmp/one.sh
   ├─21030 /bin/bash /tmp/one.sh
   ├─21058 /bin/bash /tmp/one.sh
   ├─21092 /bin/bash /tmp/one.sh
   ├─21133 /bin/bash /tmp/one.sh
   ├─21166 sleep 5
   ├─21169 sleep 5
   ├─21172 sleep 5
   ├─21175 sleep 5
   ├─21178 sleep 5
   ├─21179 /bin/bash /tmp/one.sh
   ├─21184 sleep 5
   └─21191 sleep 5




$$ ] systemctl --version
systemd 204
+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ

Thanks
Salil



On 26 November 2013 20:27, Hoyer, Marko (ADITG/SW2)
mho...@de.adit-jv.comwrote:

  One more issue I observed is - if I specify Restart=on-failure, if
   watchdog timer expire, it restart the service. But I can see that it
   create two processes rather than restarting the process. But if I do
   systemctl restart Myservice , it kills the previous instance of
   service and start a new service. Any pointers on why it happens so.

 This part has been already reported as a bug in May:
 http://lists.freedesktop.org/archives/systemd-devel/2013-May/011030.html

 Best to my knowledge, this has been fixed in systemd 203, 204, or 205 ...
 Please note that the link above does not contain the final bug fix. Some
 discussions followed which led to the final solution at a certain point.
 Follow the threads, you'll find it ...


 Best regards

 Marko Hoyer
 Software Group II (ADITG/SW2)

 Tel. +49 5121 49 6948

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


Re: [systemd-devel] Question regarding the NotifyAccess parameter

2013-11-26 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Nov 21, 2013 at 08:56:25PM +0530, salil GK wrote:
 Hello
 
I have a service in shell script in which I am sending notification to
 systemd using `systemd-notify WATCHDOG=1` command. What happens is -
 systemd-notify will be a child process and in the systemd notification will
 not be honoured if NotifyAccess is set to main. Is there any work around
 for this.
Use NotifyAccess=all?

One more issue I observed is - if I specify Restart=on-failure, if
 watchdog timer expire, it restart the service. But I can see that it create
 two processes rather than restarting the process. But if I do systemctl
 restart Myservice , it kills the previous instance of service and start a
 new service. Any pointers on why it happens so.
That would be a significant bug! Can you post a short example which shows
the bug?

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Question regarding the NotifyAccess parameter

2013-11-26 Thread Hoyer, Marko (ADITG/SW2)
 One more issue I observed is - if I specify Restart=on-failure, if
  watchdog timer expire, it restart the service. But I can see that it
  create two processes rather than restarting the process. But if I do
  systemctl restart Myservice , it kills the previous instance of
  service and start a new service. Any pointers on why it happens so.

This part has been already reported as a bug in May:
http://lists.freedesktop.org/archives/systemd-devel/2013-May/011030.html

Best to my knowledge, this has been fixed in systemd 203, 204, or 205 ...
Please note that the link above does not contain the final bug fix. Some 
discussions followed which led to the final solution at a certain point. Follow 
the threads, you'll find it ...


Best regards

Marko Hoyer
Software Group II (ADITG/SW2)

Tel. +49 5121 49 6948
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel