{"action":"closed","issue":{"url":"https://api.github.com/repos/cfe-lab/Kive/issues/717","repository_url":"https://api.github.com/repos/cfe-lab/Kive","labels_url":"https://api.github.com/repos/cfe-lab/Kive/issues/717/labels{/name}","comments_url":"https://api.github.com/repos/cfe-lab/Kive/issues/717/comments","events_url":"https://api.github.com/repos/cfe-lab/Kive/issues/717/events","html_url":"https://github.com/cfe-lab/Kive/issues/717","id":268479003,"number":717,"title":"Interrupted docker wrapper leaves volume behind","user":{"login":"donkirkby","id":1639148,"avatar_url":"https://avatars1.githubusercontent.com/u/1639148?v=4","gravatar_id":"","url":"https://api.github.com/users/donkirkby","html_url":"https://github.com/donkirkby","followers_url":"https://api.github.com/users/donkirkby/followers","following_url":"https://api.github.com/users/donkirkby/following{/other_user}","gists_url":"https://api.github.com/users/donkirkby/gists{/gist_id}","starred_url":"https://api.github.com/users/donkirkby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donkirkby/subscriptions","organizations_url":"https://api.github.com/users/donkirkby/orgs","repos_url":"https://api.github.com/users/donkirkby/repos","events_url":"https://api.github.com/users/donkirkby/events{/privacy}","received_events_url":"https://api.github.com/users/donkirkby/received_events","type":"User","site_admin":false},"labels":[{"id":64265164,"url":"https://api.github.com/repos/cfe-lab/Kive/labels/bug","name":"bug","color":"fc2929","default":true},{"id":133490736,"url":"https://api.github.com/repos/cfe-lab/Kive/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":{"login":"rhliang","id":5862525,"avatar_url":"https://avatars2.githubusercontent.com/u/5862525?v=4","gravatar_id":"","url":"https://api.github.com/users/rhliang","html_url":"https://github.com/rhliang","followers_url":"https://api.github.com/users/rhliang/followers","following_url":"https://api.github.com/users/rhliang/following{/other_user}","gists_url":"https://api.github.com/users/rhliang/gists{/gist_id}","starred_url":"https://api.github.com/users/rhliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhliang/subscriptions","organizations_url":"https://api.github.com/users/rhliang/orgs","repos_url":"https://api.github.com/users/rhliang/repos","events_url":"https://api.github.com/users/rhliang/events{/privacy}","received_events_url":"https://api.github.com/users/rhliang/received_events","type":"User","site_admin":false},"assignees":[{"login":"rhliang","id":5862525,"avatar_url":"https://avatars2.githubusercontent.com/u/5862525?v=4","gravatar_id":"","url":"https://api.github.com/users/rhliang","html_url":"https://github.com/rhliang","followers_url":"https://api.github.com/users/rhliang/followers","following_url":"https://api.github.com/users/rhliang/following{/other_user}","gists_url":"https://api.github.com/users/rhliang/gists{/gist_id}","starred_url":"https://api.github.com/users/rhliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhliang/subscriptions","organizations_url":"https://api.github.com/users/rhliang/orgs","repos_url":"https://api.github.com/users/rhliang/repos","events_url":"https://api.github.com/users/rhliang/events{/privacy}","received_events_url":"https://api.github.com/users/rhliang/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/cfe-lab/Kive/milestones/19","html_url":"https://github.com/cfe-lab/Kive/milestone/19","labels_url":"https://api.github.com/repos/cfe-lab/Kive/milestones/19/labels","id":2417775,"number":19,"title":"0.11 - Slurm UI","description":"This milestone will continue on from the backend changes of 0.10 and focus on refinements on the front-end to match, such as incorporating updated UI elements that will take advantage of Slurm features such as run priorities and better queue monitoring.","creator":{"login":"rhliang","id":5862525,"avatar_url":"https://avatars2.githubusercontent.com/u/5862525?v=4","gravatar_id":"","url":"https://api.github.com/users/rhliang","html_url":"https://github.com/rhliang","followers_url":"https://api.github.com/users/rhliang/followers","following_url":"https://api.github.com/users/rhliang/following{/other_user}","gists_url":"https://api.github.com/users/rhliang/gists{/gist_id}","starred_url":"https://api.github.com/users/rhliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhliang/subscriptions","organizations_url":"https://api.github.com/users/rhliang/orgs","repos_url":"https://api.github.com/users/rhliang/repos","events_url":"https://api.github.com/users/rhliang/events{/privacy}","received_events_url":"https://api.github.com/users/rhliang/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":9,"state":"open","created_at":"2017-03-28T21:48:45Z","updated_at":"2017-11-30T23:02:38Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-10-25T17:15:00Z","updated_at":"2017-11-30T23:02:38Z","closed_at":"2017-11-30T23:02:37Z","author_association":"OWNER","body":"If you launch the `docker_wrap.py` script, and then press <kbd>Ctrl</kbd>+<kbd>C</kbd>, the wrapper script aborts without killing the docker process. That makes the `docker volume rm` fail.\r\n\r\nIt looks like the `docker_wrap.py --run` process also continues to run when the parent process is interrupted. For example, cancelling the slurm task doesn't stop the actual job process.\r\n\r\n* [x] clean up volume and container\r\n* [x] stop running child process\r\n\r\n```\r\n$ docker_wrap.py alpine --sudo -- sandbox1 sleep 30\r\nSession: don_sandbox1\r\nInput files:\r\n\r\nLaunching.\r\n^CTraceback (most recent call last):\r\n  File \"/usr/local/bin/docker_wrap.py\", line 252, in <module>\r\n    main()\r\n  File \"/usr/local/bin/docker_wrap.py\", line 244, in main\r\n    handle_run(args)\r\n  File \"/usr/local/bin/docker_wrap.py\", line 223, in handle_run\r\n    check_call(docker_args)\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 536, in check_call\r\n    retcode = call(*popenargs, **kwargs)\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 523, in call\r\n    return Popen(*popenargs, **kwargs).wait()\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 1392, in wait\r\n    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 476, in _eintr_retry_call\r\n    return func(*args)\r\nKeyboardInterrupt\r\nError response from daemon: unable to remove volume: remove don_sandbox1: volume is in use - [76ba81e5772f5ee9cc68831ac854b3482bd08757f98a16892760e2e1e0d99f46]\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/docker_wrap.py\", line 252, in <module>\r\n    main()\r\n  File \"/usr/local/bin/docker_wrap.py\", line 246, in main\r\n    handle_write(args)\r\n  File \"/usr/local/bin/docker_wrap.py\", line 229, in handle_write\r\n    clean_up(session)\r\n  File \"/usr/local/bin/docker_wrap.py\", line 236, in clean_up\r\n    check_output(['docker', 'volume', 'rm', session])\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 574, in check_output\r\n    raise CalledProcessError(retcode, cmd, output=output)\r\nsubprocess.CalledProcessError: Command '['docker', 'volume', 'rm', 'don_sandbox1']' returned non-zero exit status 1\r\n\r\nOutputs:\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/docker_wrap.py\", line 252, in <module>\r\n    main()\r\n  File \"/usr/local/bin/docker_wrap.py\", line 248, in main\r\n    handle_launch(args)\r\n  File \"/usr/local/bin/docker_wrap.py\", line 135, in handle_launch\r\n    raise CalledProcessError(exporter.returncode, export_args)\r\nsubprocess.CalledProcessError: Command '['sudo', '/usr/local/bin/docker_wrap.py', '--write', 'alpine', 'sandbox1']' returned non-zero exit status 1\r\n$ \r\n```"}}
{"actor":{"display_login":"rhliang"}}