{"action":"created","issue":{"url":"https://api.github.com/repos/snapcore/snapcraft/issues/1916","repository_url":"https://api.github.com/repos/snapcore/snapcraft","labels_url":"https://api.github.com/repos/snapcore/snapcraft/issues/1916/labels{/name}","comments_url":"https://api.github.com/repos/snapcore/snapcraft/issues/1916/comments","events_url":"https://api.github.com/repos/snapcore/snapcraft/issues/1916/events","html_url":"https://github.com/snapcore/snapcraft/pull/1916","id":294734190,"number":1916,"title":"lxd: initialize remote lazily","user":{"login":"kalikiana","id":1204189,"avatar_url":"https://avatars0.githubusercontent.com/u/1204189?v=4","gravatar_id":"","url":"https://api.github.com/users/kalikiana","html_url":"https://github.com/kalikiana","followers_url":"https://api.github.com/users/kalikiana/followers","following_url":"https://api.github.com/users/kalikiana/following{/other_user}","gists_url":"https://api.github.com/users/kalikiana/gists{/gist_id}","starred_url":"https://api.github.com/users/kalikiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalikiana/subscriptions","organizations_url":"https://api.github.com/users/kalikiana/orgs","repos_url":"https://api.github.com/users/kalikiana/repos","events_url":"https://api.github.com/users/kalikiana/events{/privacy}","received_events_url":"https://api.github.com/users/kalikiana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-06T12:01:07Z","updated_at":"2018-02-13T17:58:29Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/snapcore/snapcraft/pulls/1916","html_url":"https://github.com/snapcore/snapcraft/pull/1916","diff_url":"https://github.com/snapcore/snapcraft/pull/1916.diff","patch_url":"https://github.com/snapcore/snapcraft/pull/1916.patch"},"body":"- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?\r\n- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?\r\n- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?\r\n- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?\r\n- [x] Have you successfully run `./runtests.sh static`?\r\n- [x] Have you successfully run `./runtests.sh unit`?\r\n\r\n-----\r\nFixes: [LP: #1746009](https://bugs.launchpad.net/snapcraft/+bug/1746009)"},"comment":{"url":"https://api.github.com/repos/snapcore/snapcraft/issues/comments/365350230","html_url":"https://github.com/snapcore/snapcraft/pull/1916#issuecomment-365350230","issue_url":"https://api.github.com/repos/snapcore/snapcraft/issues/1916","id":365350230,"user":{"login":"kyrofa","id":946674,"avatar_url":"https://avatars0.githubusercontent.com/u/946674?v=4","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T17:58:29Z","updated_at":"2018-02-13T17:58:29Z","author_association":"MEMBER","body":"I set up a fresh LXD container with the LXD snap nested within it to test this (since I can't on my host). I have a snap with two parts. I tried to clean one of them, and got this:\r\n\r\n```\r\n$ snapcraft clean part1\r\nCleaning priming area for part1 \r\nTraceback (most recent call last):\r\n  File \"/home/ubuntu/venv/snapcraft/bin/snapcraft\", line 9, in <module>\r\n    load_entry_point('snapcraft', 'console_scripts', 'snapcraft')()\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/pkg_resources/__init__.py\", line 542, in load_entry_point\r\n    return get_distribution(dist).load_entry_point(group, name)\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/pkg_resources/__init__.py\", line 2569, in load_entry_point\r\n    return ep.load()\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/pkg_resources/__init__.py\", line 2229, in load\r\n    return self.resolve()\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/pkg_resources/__init__.py\", line 2235, in resolve\r\n    module = __import__(self.module_name, fromlist=['__name__'], level=0)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/cli/__main__.py\", line 43, in <module>\r\n    run(prog_name='snapcraft')\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/click/core.py\", line 722, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/click/core.py\", line 697, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/click/core.py\", line 1066, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/click/core.py\", line 895, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/home/ubuntu/venv/snapcraft/lib/python3.5/site-packages/click/core.py\", line 535, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/cli/lifecycle.py\", line 184, in clean\r\n    metadata=config.get_metadata()).clean(parts, step)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/lxd/_project.py\", line 213, in clean\r\n    lifecycle.clean(self._project_options, parts, step)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/lifecycle/_clean.py\", line 195, in clean\r\n    _clean_parts(parts, step, config, staged_state, primed_state)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/lifecycle/_clean.py\", line 87, in _clean_parts\r\n    part_name, step, config, staged_state, primed_state)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/lifecycle/_clean.py\", line 50, in _clean_part_and_all_dependents\r\n    config.parts.clean_part(part_name, staged_state, primed_state, step)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/project_loader/_parts_config.py\", line 148, in clean_part\r\n    part.clean(staged_state, primed_state, step)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/pluginhandler/__init__.py\", line 651, in clean\r\n    step, hint)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/pluginhandler/__init__.py\", line 683, in _clean_steps\r\n    self.clean_prime(project_primed_state, hint)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/pluginhandler/__init__.py\", line 604, in clean_prime\r\n    project_primed_state)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/pluginhandler/__init__.py\", line 626, in _clean_shared_area\r\n    shared_directory)\r\n  File \"/home/ubuntu/snapcraft/snapcraft/internal/pluginhandler/__init__.py\", line 846, in _clean_migrated_files\r\n    os.remove(os.path.join(directory, snap_file))\r\nPermissionError: [Errno 13] Permission denied: '/tmp/foo/prime/file1'\r\n```\r\n\r\nAny ideas?"}}
{"actor":{"display_login":"kyrofa"}}