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

Design and transition to new device interfaces #5819

Closed
stgraber opened this issue Jun 5, 2019 · 2 comments

Comments

@stgraber
Copy link
Member

commented Jun 5, 2019

As part of cleaning up the containerLXC struct and converting our existing container interface into a cleaner instance interface, we need to cleanup the heap of code that is our device handling code.

For this, we should take a close look at what we need each device type to do and design a Go interface around that, this Go interface should then go into a new devices package with one sub-package per device type.

Due to circular import issues, we can't have those packages use the container interface or containerLXC struct making things a bit trickier, though we can work around that by passing callback functions for specific actions we need.

I suspect we'll at least want functions for:

  • Hotplug to running container
  • Hotremove from running container
  • Get container configuration snippet
  • Hook into lifecycle events (get called by LXD prior to start, from OnStart, from OnStop, ...)

We also need to keep future LXD work in mind with the instance rework that's coming up soon.

@stgraber

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

@tomponline is drafting such an interface something you'd be interested to take a stab at?

@stgraber stgraber added this to the soon milestone Jun 5, 2019
@stgraber stgraber added the Feature label Jun 5, 2019
@tomponline

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

@stgraber sounds good.

@tomponline tomponline self-assigned this Jun 5, 2019
@tomponline tomponline referenced this issue Jul 2, 2019
5 of 5 tasks complete
@stgraber stgraber modified the milestones: soon, lxd-3.16 Jul 5, 2019
@stgraber stgraber modified the milestones: lxd-3.16, lxd-3.17 Aug 9, 2019
@tomponline tomponline referenced this issue Aug 14, 2019
This was referenced Aug 22, 2019
tomponline added a commit to tomponline/lxd that referenced this issue Sep 5, 2019
 Adds basic quota checks for zfs and lvm (dir, ceph and btrfs not supported)
 ZFS checks for live setting and resetting
 LVM doesn't support unsetting quota
 BTRFS doesn't support checking quota using df (AFAIK)

Closes lxc#5819

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
tomponline added a commit to tomponline/lxd that referenced this issue Sep 5, 2019
 Adds basic quota checks for zfs and lvm (dir, ceph and btrfs not supported)
 ZFS checks for live setting and resetting
 LVM doesn't support unsetting quota
 BTRFS doesn't support checking quota using df (AFAIK)

Closes lxc#5819

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
tomponline added a commit to tomponline/lxd that referenced this issue Sep 5, 2019
 Adds basic quota checks for zfs and lvm (dir, ceph and btrfs not supported)
 ZFS checks for live setting and resetting
 LVM doesn't support unsetting quota
 BTRFS doesn't support checking quota using df (AFAIK)

Closes lxc#5819

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
tomponline added a commit to tomponline/lxd that referenced this issue Sep 5, 2019
 Adds basic quota checks for zfs and lvm (dir, ceph and btrfs not supported)
 ZFS checks for live setting and resetting
 LVM doesn't support unsetting quota
 BTRFS doesn't support checking quota using df (AFAIK)

Closes lxc#5819

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
tomponline added a commit to tomponline/lxd that referenced this issue Sep 5, 2019
 Adds basic quota checks for zfs and lvm (dir, ceph and btrfs not supported)
 ZFS checks for live setting and resetting
 LVM doesn't support unsetting quota
 BTRFS doesn't support checking quota using df (AFAIK)

Closes lxc#5819

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
tomponline added a commit to tomponline/lxd that referenced this issue Sep 5, 2019
 Adds basic quota checks for zfs and lvm (dir, ceph and btrfs not supported)
 ZFS checks for live setting and resetting
 LVM doesn't support unsetting quota
 BTRFS doesn't support checking quota using df (AFAIK)

Closes lxc#5819

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
@stgraber stgraber closed this in 97e78c4 Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.