{"action":"created","issue":{"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/1776","repository_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv","labels_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/1776/labels{/name}","comments_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/1776/comments","events_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/1776/events","html_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/1776","id":241890021,"number":1776,"title":"Don't cause system to hang on halt/reboot when net-booting","user":{"login":"chrisnovakovic","id":2261519,"avatar_url":"https://avatars0.githubusercontent.com/u/2261519?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisnovakovic","html_url":"https://github.com/chrisnovakovic","followers_url":"https://api.github.com/users/chrisnovakovic/followers","following_url":"https://api.github.com/users/chrisnovakovic/following{/other_user}","gists_url":"https://api.github.com/users/chrisnovakovic/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisnovakovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisnovakovic/subscriptions","organizations_url":"https://api.github.com/users/chrisnovakovic/orgs","repos_url":"https://api.github.com/users/chrisnovakovic/repos","events_url":"https://api.github.com/users/chrisnovakovic/events{/privacy}","received_events_url":"https://api.github.com/users/chrisnovakovic/received_events","type":"User","site_admin":false},"labels":[{"id":340651678,"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/labels/BUGFIX","name":"BUGFIX","color":"fc2929","default":false},{"id":343716247,"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/labels/FEATURE","name":"FEATURE","color":"0052cc","default":false},{"id":429479367,"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/labels/LE%209.0","name":"LE 9.0","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-07-11T00:30:01Z","updated_at":"2018-02-13T16:26:15Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/pulls/1776","html_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/1776","diff_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/1776.diff","patch_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/1776.patch"},"body":"I ran into another problem while net-booting LibreELEC: with `/storage` mounted via NFS, halting or rebooting causes the system to hang. This is due to ConnMan exiting (and therefore bringing down the network) while processes still have open handles to files under `/storage` (including ConnMan itself: this can be verified with `lsof | grep /storage`, which shows that `connmand` has an open state file at `/storage/.cache/connman/*/data`).\r\n\r\nThis can be solved by lazy-unmounting `/storage` when LibreELEC is being net-booted (along with `/flash`, if that's also mounted remotely, since there's no reason not to) before ConnMan is stopped. This means that ConnMan doesn't have a chance to update its state file before it exits, but from a brief look at the ConnMan source code, it appears not to do that anyway.\r\n\r\nThis PR doesn't address the follow-up problem of `/flash` and `/storage` having disappeared after the system resumes from standby. I think one way to fix that would be to create two new systemd targets, one for `/flash` being mounted and one for `/storage` being mounted, and do the net-boot mounting operations currently performed in the initramfs init script in systemd unit files after switching to the new root filesystem - that would require substantial work from someone who understands both LibreELEC and systemd better than I do, I'm afraid, but at least this PR fixes halting and rebooting.\r\n\r\nTested and working fine on a RPi3 using the `RPi2` build."},"comment":{"url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/comments/365320341","html_url":"https://github.com/LibreELEC/LibreELEC.tv/pull/1776#issuecomment-365320341","issue_url":"https://api.github.com/repos/LibreELEC/LibreELEC.tv/issues/1776","id":365320341,"user":{"login":"chrisnovakovic","id":2261519,"avatar_url":"https://avatars0.githubusercontent.com/u/2261519?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisnovakovic","html_url":"https://github.com/chrisnovakovic","followers_url":"https://api.github.com/users/chrisnovakovic/followers","following_url":"https://api.github.com/users/chrisnovakovic/following{/other_user}","gists_url":"https://api.github.com/users/chrisnovakovic/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisnovakovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisnovakovic/subscriptions","organizations_url":"https://api.github.com/users/chrisnovakovic/orgs","repos_url":"https://api.github.com/users/chrisnovakovic/repos","events_url":"https://api.github.com/users/chrisnovakovic/events{/privacy}","received_events_url":"https://api.github.com/users/chrisnovakovic/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T16:26:15Z","updated_at":"2018-02-13T16:26:15Z","author_association":"CONTRIBUTOR","body":"@chewitt Actually I originally found that patch on the ConnMan mailing list, but there didn't seem to be any appetite for merging it. I'll post it again and emphasise the benefits of being able to choose not to repeatedly write a file that's not particularly useful to flash-backed storage :)"}}
{"actor":{"display_login":"chrisnovakovic"}}