Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/snap-confine,snap-update-ns: discard quirks #6123

Merged
merged 4 commits into from Nov 15, 2018

Conversation

zyga
Copy link
Collaborator

@zyga zyga commented Nov 9, 2018

Recent discussion about LXD has resurrected the topic of quirks. Quirks
were created in response to a bug where a snap in devmode being unable
to interact with with LXD running as a classic package. At the time it
was a big deal so we implemented the quirk and everything was fine.

Time passed and LXD moved away from storing the socket in that place. It
also moved away from shipping as a classic package as well. Since we
never allowed access to /var/lib/lxd via any interfaces and it is
unlikely anyone still relies on this quirk I think it should be dropped
now.

Removing should speed up execution of all snaps by a small amount, since
we don't need to construct a writable mimic in /var/lib anymore. We
also shrink snap-confine by removing a good chunk of C code.

https://bugs.launchpad.net/snap-confine/+bug/1613845

Signed-off-by: Zygmunt Krynicki me@zygoon.pl

@zyga
Copy link
Collaborator Author

zyga commented Nov 13, 2018

I think this needs more tweaks. I suspect I removed too many apparmor permissions.

Recent discussion about LXD has resurrected the topic of quirks. Quirks
were created in response to a bug where a snap in devmode being unable
to interact with with LXD running as a classic package. At the time it
was a big deal so we implemented the quirk and everything was fine.

Time passed and LXD moved away from storing the socket in that place. It
also moved away from shipping as a classic package as well. Since we
never allowed access to /var/lib/lxd via any interfaces and it is
unlikely anyone still relies on this quirk I think it should be dropped
now.

Removing should speed up execution of all snaps by a small amount, since
we don't need to construct a writable mimic in /var/lib anymore.  We
also shrink snap-confine by removing a good chunk of C code.

https://bugs.launchpad.net/snap-confine/+bug/1613845

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Copy link

@jdstrand jdstrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and apparmor policy-wise, this looks fine. I'll let others decide if it is a good idea and on the timing.

@zyga zyga merged commit 4f3c029 into snapcore:master Nov 15, 2018
@zyga zyga deleted the feature/no-more-quirks branch November 15, 2018 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants