{"action":"closed","issue":{"url":"https://api.github.com/repos/SUSE/Enceladus/issues/194","repository_url":"https://api.github.com/repos/SUSE/Enceladus","labels_url":"https://api.github.com/repos/SUSE/Enceladus/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/SUSE/Enceladus/issues/194/comments","events_url":"https://api.github.com/repos/SUSE/Enceladus/issues/194/events","html_url":"https://github.com/SUSE/Enceladus/issues/194","id":299036464,"node_id":"MDU6SXNzdWUyOTkwMzY0NjQ=","number":194,"title":"Clean up on SIGTERM","user":{"login":"ChrisBr","id":3799140,"node_id":"MDQ6VXNlcjM3OTkxNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/3799140?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisBr","html_url":"https://github.com/ChrisBr","followers_url":"https://api.github.com/users/ChrisBr/followers","following_url":"https://api.github.com/users/ChrisBr/following{/other_user}","gists_url":"https://api.github.com/users/ChrisBr/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisBr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisBr/subscriptions","organizations_url":"https://api.github.com/users/ChrisBr/orgs","repos_url":"https://api.github.com/users/ChrisBr/repos","events_url":"https://api.github.com/users/ChrisBr/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisBr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-21T16:24:39Z","updated_at":"2018-06-20T12:09:24Z","closed_at":"2018-06-20T12:09:24Z","author_association":"MEMBER","body":"As you know, we use ec2uploadimg as the \"backend\" for the OBS cloud uploader. We also provide the user the possibility to \"abort\" the upload which currently sends SIGTERM to ec2uploadimg which potentially leaves resources (e.g. helper instance, volumes etc) in AWS left.\r\n\r\nI'm opening this issue to discuss some potential solutions to properly clean up when aborting the upload. \r\n\r\nOne solution I'm currently trying is to install a [signal handler](https://docs.python.org/2/library/signal.html) in ec2uploadimg. \r\n\r\n```\r\ndef signal_handler(signal, frame):\r\n    if uploader:\r\n      uploader.clean_up()\r\n    if setup:\r\n      setup.clean_up()\r\n\r\nsignal.signal(signal.SIGTERM, signal_handler)\r\n```\r\n\r\nHowever, I don't really like this solution too much and also it seems it is not that reliable.\r\n\r\n@rjschwei is a signal hanlder sth you would consider to include into ec2uploadimg? Do you have any other / better solution we could try out?\r\n\r\nThank you"}}
{"actor":{"display_login":"rjschwei"}}