{"action":"created","issue":{"url":"https://api.github.com/repos/snapcore/snapd/issues/6367","repository_url":"https://api.github.com/repos/snapcore/snapd","labels_url":"https://api.github.com/repos/snapcore/snapd/issues/6367/labels{/name}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/6367/comments","events_url":"https://api.github.com/repos/snapcore/snapd/issues/6367/events","html_url":"https://github.com/snapcore/snapd/pull/6367","id":398431318,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQ0MTMzNTcy","number":6367,"title":"cmd/snap-update-ns: allow switching to user mount namespace","user":{"login":"zyga","id":784262,"node_id":"MDQ6VXNlcjc4NDI2Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/784262?v=4","gravatar_id":"","url":"https://api.github.com/users/zyga","html_url":"https://github.com/zyga","followers_url":"https://api.github.com/users/zyga/followers","following_url":"https://api.github.com/users/zyga/following{/other_user}","gists_url":"https://api.github.com/users/zyga/gists{/gist_id}","starred_url":"https://api.github.com/users/zyga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyga/subscriptions","organizations_url":"https://api.github.com/users/zyga/orgs","repos_url":"https://api.github.com/users/zyga/repos","events_url":"https://api.github.com/users/zyga/events{/privacy}","received_events_url":"https://api.github.com/users/zyga/received_events","type":"User","site_admin":false},"labels":[{"id":1127336242,"node_id":"MDU6TGFiZWwxMTI3MzM2MjQy","url":"https://api.github.com/repos/snapcore/snapd/labels/Per-user%20mount%20ns%20%20%F0%9F%90%8E","name":"Per-user mount ns  🐎","color":"3c60bc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-01-11T19:58:24Z","updated_at":"2019-08-13T09:40:44Z","closed_at":"2019-08-13T09:40:44Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/6367","html_url":"https://github.com/snapcore/snapd/pull/6367","diff_url":"https://github.com/snapcore/snapd/pull/6367.diff","patch_url":"https://github.com/snapcore/snapd/pull/6367.patch"},"body":"When snap-update-ns is invoked with the (currently unused by snapd)\r\ncommand line option `-u` it is an indication that we are going to run as\r\nthe specified user ID. In addition the option `--from-snap-confine` is\r\nno longer attached to `--user-fstab` and now only implies that namespace\r\nhas already been set and that lock is already established.\r\n\r\nThis allows snap-update-ns to be used from two different contexts to\r\nachieve distinct tasks:\r\n\r\n    1) When invoked from snap-confine, it is always paired with\r\n    `--from-snap-confine`. This, as mentioned, indicates that the mount\r\n    namespace is already unshared and that locks are held by\r\n    snap-confine.\r\n\r\n    In this mode we can be called with no further options, to initialize\r\n    the system-wide snap mount namespace or with `--user-mounts` to\r\n    initialize the per-user snap mount namespace. Note that at this time\r\n    `-u` is redundant because snap-confine already runs with the\r\n    appropriate user ID.\r\n\r\n    2) When invoked from snapd it is invoked with or without `-u` and\r\n    `--user-mounts`. When those options are absent `snap-update-ns` will\r\n    acquire appropriate locks, freeze running processes of the affected\r\n    snap and perform an update to existing system-wide mount namespace\r\n    that is joined, as appropriate. When those options are used the same\r\n    flow will happen with the exception that per-user mount namespace\r\n    will be joined and updated, running as the specified user ID.\r\n\r\nThis allows using snap-update-ns to update existing, persisted per-user\r\nmount namespaces.\r\n\r\nSigned-off-by: Zygmunt Krynicki <me@zygoon.pl>\r\n"},"comment":{"url":"https://api.github.com/repos/snapcore/snapd/issues/comments/520765595","html_url":"https://github.com/snapcore/snapd/pull/6367#issuecomment-520765595","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/6367","id":520765595,"node_id":"MDEyOklzc3VlQ29tbWVudDUyMDc2NTU5NQ==","user":{"login":"zyga","id":784262,"node_id":"MDQ6VXNlcjc4NDI2Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/784262?v=4","gravatar_id":"","url":"https://api.github.com/users/zyga","html_url":"https://github.com/zyga","followers_url":"https://api.github.com/users/zyga/followers","following_url":"https://api.github.com/users/zyga/following{/other_user}","gists_url":"https://api.github.com/users/zyga/gists{/gist_id}","starred_url":"https://api.github.com/users/zyga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyga/subscriptions","organizations_url":"https://api.github.com/users/zyga/orgs","repos_url":"https://api.github.com/users/zyga/repos","events_url":"https://api.github.com/users/zyga/events{/privacy}","received_events_url":"https://api.github.com/users/zyga/received_events","type":"User","site_admin":false},"created_at":"2019-08-13T09:40:44Z","updated_at":"2019-08-13T09:40:44Z","author_association":"CONTRIBUTOR","body":"Closing to deal with master woes and refocus. Please make sure not to remove this branch though :)"}}
{"actor":{"display_login":"zyga"}}