pywsman and SIGINT

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

pywsman and SIGINT

Imre Farkas
Hi,

I found a strange behavior using the pywsman library and not sure how to
resolve it: when the execution is handed over to pywsman, the OS signals
are not handled until the execution returns back to the original python
code. This results in process lock up and the user might be unable to
terminate the process for long time. Further details can be found at
https://bugs.launchpad.net/ironic/+bug/1454492

Is there a way to enable signal handlers in the library?

Thanks,
Imre

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pywsman and SIGINT

Klaus Kaempf
* Imre Farkas <[hidden email]> [Jul 09. 2015 13:54]:
> Hi,
>
> I found a strange behavior using the pywsman library and not sure how to
> resolve it: when the execution is handed over to pywsman, the OS signals
> are not handled until the execution returns back to the original python
> code.

Uhm, no idea. Except for the Openwsman daemon (wsmand), I don't see
references to signal handling in the Openwsman source code.

It might be related to the 'curl' library Openwsman uses for http
transport !?

Klaus
--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pywsman and SIGINT

Imre Farkas
On 07/10/2015 02:36 PM, Klaus Kaempf wrote:

> * Imre Farkas <[hidden email]> [Jul 09. 2015 13:54]:
>> Hi,
>>
>> I found a strange behavior using the pywsman library and not sure how to
>> resolve it: when the execution is handed over to pywsman, the OS signals
>> are not handled until the execution returns back to the original python
>> code.
>
> Uhm, no idea. Except for the Openwsman daemon (wsmand), I don't see
> references to signal handling in the Openwsman source code.
>
> It might be related to the 'curl' library Openwsman uses for http
> transport !?
>
> Klaus
>

Hi Klaus,

Thanks for looking into it. One more thing I found out recently is that
it works correctly with wsmancli, so I can terminate a wsman command at
any time. You mentioned the curl library. Is there any difference
between wsmancli and pywsman from curl's perspective? Or anything else
that might account for it?

Thanks,
Imre

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pywsman and SIGINT

Klaus Kaempf
* Imre Farkas <[hidden email]> [Jul 16. 2015 14:21]:
>
> Hi Klaus,
>
> Thanks for looking into it. One more thing I found out recently is that
> it works correctly with wsmancli, so I can terminate a wsman command at
> any time.

Now this is puzzling. wsmancli is just a CLI frontend to the Openwsman
client library and doesn't add any signal handling by itself.

> You mentioned the curl library. Is there any difference between
> wsmancli and pywsman from curl's perspective? Or anything else that
> might account for it?

pywsman just adds (SWIG-generated) Python bindings to Openwsman.

However, pywsman initializes the Python interpreter which is well known
for it's horrible thread implementation (rather non-existing
threading, Python 2.7 just uses a global lock).

I'd guess it's a Python-only thing and will work nicely with all other
language bindings.

Klaus
--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Loading...