{"action":"created","issue":{"url":"https://api.github.com/repos/lxc/lxd/issues/2027","repository_url":"https://api.github.com/repos/lxc/lxd","labels_url":"https://api.github.com/repos/lxc/lxd/issues/2027/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/2027/comments","events_url":"https://api.github.com/repos/lxc/lxd/issues/2027/events","html_url":"https://github.com/lxc/lxd/issues/2027","id":154877547,"number":2027,"title":"Feature: Add container timeout as a configuration option","user":{"login":"JohnstonJ","id":13113915,"avatar_url":"https://avatars.githubusercontent.com/u/13113915?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnstonJ","html_url":"https://github.com/JohnstonJ","followers_url":"https://api.github.com/users/JohnstonJ/followers","following_url":"https://api.github.com/users/JohnstonJ/following{/other_user}","gists_url":"https://api.github.com/users/JohnstonJ/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnstonJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnstonJ/subscriptions","organizations_url":"https://api.github.com/users/JohnstonJ/orgs","repos_url":"https://api.github.com/users/JohnstonJ/repos","events_url":"https://api.github.com/users/JohnstonJ/events{/privacy}","received_events_url":"https://api.github.com/users/JohnstonJ/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lxc/lxd/labels/Easy","name":"Easy","color":"009800"},{"url":"https://api.github.com/repos/lxc/lxd/labels/Feature","name":"Feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lxc/lxd/milestones/5","html_url":"https://github.com/lxc/lxd/milestones/later","labels_url":"https://api.github.com/repos/lxc/lxd/milestones/5/labels","id":958477,"number":5,"title":"later","description":"","creator":{"login":"stgraber","id":2230599,"avatar_url":"https://avatars.githubusercontent.com/u/2230599?v=3","gravatar_id":"","url":"https://api.github.com/users/stgraber","html_url":"https://github.com/stgraber","followers_url":"https://api.github.com/users/stgraber/followers","following_url":"https://api.github.com/users/stgraber/following{/other_user}","gists_url":"https://api.github.com/users/stgraber/gists{/gist_id}","starred_url":"https://api.github.com/users/stgraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stgraber/subscriptions","organizations_url":"https://api.github.com/users/stgraber/orgs","repos_url":"https://api.github.com/users/stgraber/repos","events_url":"https://api.github.com/users/stgraber/events{/privacy}","received_events_url":"https://api.github.com/users/stgraber/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":0,"state":"open","created_at":"2015-01-30T15:58:15Z","updated_at":"2016-05-16T14:48:32Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-05-14T21:53:40Z","updated_at":"2016-05-16T14:56:51Z","closed_at":null,"body":"# Required information\r\n\r\n * Distribution: N/A (applies to master branch, commit b588fe35c359eca860d5230919cb9818ed4d6dac)\r\n\r\n# Issue description\r\n\r\nContainer shutdown timeout is currently hard-coded to 30 seconds, as per:\r\n\r\n* https://github.com/lxc/lxd/blob/b588fe35c359eca860d5230919cb9818ed4d6dac/doc/daemon-behavior.md#sigpwr\r\n* https://github.com/lxc/lxd/blob/b588fe35c359eca860d5230919cb9818ed4d6dac/lxd/containers.go#L158\r\n\r\nIn case a container needs extra time to shutdown, it would be nice to be able to customize this with a configuration option (especially if, for whatever reason, some service inside the container has its own timeout that is longer than 30s).  It could be a per-server option, or a per-container option.\r\n\r\nA comparison from another project would be when using libvirt with KVM, we can edit `/etc/default/libvirt-guests` and set `SHUTDOWN_TIMEOUT` to a long value if we think the timeout is too short."},"comment":{"url":"https://api.github.com/repos/lxc/lxd/issues/comments/219446750","html_url":"https://github.com/lxc/lxd/issues/2027#issuecomment-219446750","issue_url":"https://api.github.com/repos/lxc/lxd/issues/2027","id":219446750,"user":{"login":"JohnstonJ","id":13113915,"avatar_url":"https://avatars.githubusercontent.com/u/13113915?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnstonJ","html_url":"https://github.com/JohnstonJ","followers_url":"https://api.github.com/users/JohnstonJ/followers","following_url":"https://api.github.com/users/JohnstonJ/following{/other_user}","gists_url":"https://api.github.com/users/JohnstonJ/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnstonJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnstonJ/subscriptions","organizations_url":"https://api.github.com/users/JohnstonJ/orgs","repos_url":"https://api.github.com/users/JohnstonJ/repos","events_url":"https://api.github.com/users/JohnstonJ/events{/privacy}","received_events_url":"https://api.github.com/users/JohnstonJ/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T14:56:51Z","updated_at":"2016-05-16T14:56:51Z","body":"That's true.  I know with systemd one could set the lxd service to have an infinite timeout, though it would mean a bug in lxd could mean that the system never shuts down.\r\n\r\nOn my libvirt installation:\r\n\r\n    $ systemctl cat libvirt-guests.service\r\n    [Service]\r\n    <snip>\r\n    TimeoutStopSec=0\r\n\r\nSo it looks like that's exactly how they did it there: tell the init system \"trust me, I have my own timeouts.\""}}