Re: [openstack-dev] [oslo] How should oslo.service handle SIGINT?

2015-07-21 Thread Elena Ezhova
@Dims,

The main advantage of having a handler is a more clean output in case a
service is killed, which means there wouldn't be a stacktrace with
KeyboardInterrupt
exception, just messages like we have in nova now (nova Switch to
oslo.service patch hadn't merged yet):

2015-07-21 10:46:06.765 INFO nova.openstack.common.service
[req-b65dd702-4407-4442-941b-bdb45d935cfa None None] Caught SIGINT,
stopping children
2015-07-21 10:46:06.779 INFO nova.openstack.common.service
[req-b65dd702-4407-4442-941b-bdb45d935cfa None None] Waiting on 2 children
to exit
2015-07-21 10:46:06.823 INFO nova.openstack.common.service
[req-b65dd702-4407-4442-941b-bdb45d935cfa None None] Child 14490 killed by
signal 15
2015-07-21 10:46:06.830 INFO nova.openstack.common.service
[req-b65dd702-4407-4442-941b-bdb45d935cfa None None] Child 14491 killed by
signal 15

That looks more clean than KeyboardInterrupt:
http://paste.openstack.org/show/395226/


Elena




On Mon, Jul 20, 2015 at 8:22 PM, Davanum Srinivas dava...@gmail.com wrote:

 @Elena,

 What are the pro's and con's of having a handler as this was the
 existing behavior for all the projects that picked up code from
 oslo-incubator for this behavior?

 -- dims

 On Mon, Jul 20, 2015 at 1:12 PM, Elena Ezhova eezh...@mirantis.com
 wrote:
  Hi!
 
  Not so long ago oslo.service had a handler for SIGINT and on receiving
 this
  signal a process killed all children with SIGTERM and exited.
  Change [1], that added graceful shutdown on SIGTERM, removed all SIGINT
  handlers and currently all services that consume oslo.service generate
  KeyboardInterrupt exceptions on receiving SIGINT.
 
  My question is whether such behavior is what users and operators expect
 or
  having a handler is still the preferred way?
 
 
  Thanks, Elena
 
  [1]
 
 https://github.com/openstack/oslo.service/commit/fa9aa6b665f75e610f2b91a7d310f6499bd71770
 
 
 __
  OpenStack Development Mailing List (not for usage questions)
  Unsubscribe:
 openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
  http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
 



 --
 Davanum Srinivas :: https://twitter.com/dims

 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] How should oslo.service handle SIGINT?

2015-07-21 Thread Davanum Srinivas
Elena,

The cleaner output was the norm before oslo.service was merged and if
there are no downsides, then we should fix oslo.service to do the
same.

thanks,
dims

On Tue, Jul 21, 2015 at 6:49 AM, Elena Ezhova eezh...@mirantis.com wrote:
 @Dims,

 The main advantage of having a handler is a more clean output in case a
 service is killed, which means there wouldn't be a stacktrace with
 KeyboardInterrupt exception, just messages like we have in nova now (nova
 Switch to oslo.service patch hadn't merged yet):

 2015-07-21 10:46:06.765 INFO nova.openstack.common.service
 [req-b65dd702-4407-4442-941b-bdb45d935cfa None None] Caught SIGINT, stopping
 children
 2015-07-21 10:46:06.779 INFO nova.openstack.common.service
 [req-b65dd702-4407-4442-941b-bdb45d935cfa None None] Waiting on 2 children
 to exit
 2015-07-21 10:46:06.823 INFO nova.openstack.common.service
 [req-b65dd702-4407-4442-941b-bdb45d935cfa None None] Child 14490 killed by
 signal 15
 2015-07-21 10:46:06.830 INFO nova.openstack.common.service
 [req-b65dd702-4407-4442-941b-bdb45d935cfa None None] Child 14491 killed by
 signal 15

 That looks more clean than KeyboardInterrupt:
 http://paste.openstack.org/show/395226/


 Elena




 On Mon, Jul 20, 2015 at 8:22 PM, Davanum Srinivas dava...@gmail.com wrote:

 @Elena,

 What are the pro's and con's of having a handler as this was the
 existing behavior for all the projects that picked up code from
 oslo-incubator for this behavior?

 -- dims

 On Mon, Jul 20, 2015 at 1:12 PM, Elena Ezhova eezh...@mirantis.com
 wrote:
  Hi!
 
  Not so long ago oslo.service had a handler for SIGINT and on receiving
  this
  signal a process killed all children with SIGTERM and exited.
  Change [1], that added graceful shutdown on SIGTERM, removed all SIGINT
  handlers and currently all services that consume oslo.service generate
  KeyboardInterrupt exceptions on receiving SIGINT.
 
  My question is whether such behavior is what users and operators expect
  or
  having a handler is still the preferred way?
 
 
  Thanks, Elena
 
  [1]
 
  https://github.com/openstack/oslo.service/commit/fa9aa6b665f75e610f2b91a7d310f6499bd71770
 
 
  __
  OpenStack Development Mailing List (not for usage questions)
  Unsubscribe:
  openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
  http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
 



 --
 Davanum Srinivas :: https://twitter.com/dims

 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




-- 
Davanum Srinivas :: https://twitter.com/dims

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] How should oslo.service handle SIGINT?

2015-07-20 Thread Davanum Srinivas
@Elena,

What are the pro's and con's of having a handler as this was the
existing behavior for all the projects that picked up code from
oslo-incubator for this behavior?

-- dims

On Mon, Jul 20, 2015 at 1:12 PM, Elena Ezhova eezh...@mirantis.com wrote:
 Hi!

 Not so long ago oslo.service had a handler for SIGINT and on receiving this
 signal a process killed all children with SIGTERM and exited.
 Change [1], that added graceful shutdown on SIGTERM, removed all SIGINT
 handlers and currently all services that consume oslo.service generate
 KeyboardInterrupt exceptions on receiving SIGINT.

 My question is whether such behavior is what users and operators expect or
 having a handler is still the preferred way?


 Thanks, Elena

 [1]
 https://github.com/openstack/oslo.service/commit/fa9aa6b665f75e610f2b91a7d310f6499bd71770

 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




-- 
Davanum Srinivas :: https://twitter.com/dims

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [oslo] How should oslo.service handle SIGINT?

2015-07-20 Thread Elena Ezhova
Hi!

Not so long ago oslo.service had a handler for SIGINT and on receiving this
signal a process killed all children with SIGTERM and exited.
Change [1], that added graceful shutdown on SIGTERM, removed all SIGINT
handlers and currently all services that consume oslo.service generate
KeyboardInterrupt exceptions on receiving SIGINT.

My question is whether such behavior is what users and operators expect or
having a handler is still the preferred way?


Thanks, Elena

[1]
https://github.com/openstack/oslo.service/commit/fa9aa6b665f75e610f2b91a7d310f6499bd71770
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev